suppression page obsolète et relecture partie réseau « haute perf »
This commit is contained in:
parent
2a2ae86694
commit
fe45d1b4d6
|
@ -303,13 +303,21 @@ On désactive/stop networkd et on relance le service networking :
|
||||||
|
|
||||||
## Haute Performance
|
## Haute Performance
|
||||||
|
|
||||||
Optimisations pour la haute performance :
|
Si besoin de « haute performance », on appliquera la configuration [sysctl](https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt) suivante :
|
||||||
|
|
||||||
|
* `net.nf_conntrack_max=262144` (utiliser `conntrack -L` pour bien ajuster la valeur)
|
||||||
|
* `net.core.somaxconn=1024`
|
||||||
|
* `net.ipv4.tcp_max_syn_backlog=1024`
|
||||||
|
* `net.ipv4.tcp_tw_reuse=1`
|
||||||
|
* `net.ipv4.tcp_fin_timeout=30`
|
||||||
|
* `net.ipv4.ip_local_port_range=2000 65000`
|
||||||
|
|
||||||
|
Si cela ne suffit pas, voici quelques pistes pour aller plus loin :
|
||||||
|
|
||||||
|
* lire <https://vincent.bernat.ch/fr/blog/2014-tcp-time-wait-state-linux>
|
||||||
|
* lire <http://www.nateware.com/linux-network-tuning-for-2013.html> et notamment les options `net.core.*mem*`, `net.core.optmem_max`, `net.ipv4.tcp_*mem`, `net.core.netdev_max_backlog`, `net.ipv4.tcp_max_tw_buckets`
|
||||||
|
* augmenter le buffer de certains cartes réseau avec [ethtool]() : voir `ethtool -g eth0` et modifier avec `ethtool -G eth0 rx/rx-mini/rx-jumbo/tx NNNN`
|
||||||
|
|
||||||
* conntrack -L ; net.nf_conntrack_max=262144
|
|
||||||
* net.core.somaxconn=1024
|
|
||||||
* net.ipv4.tcp_max_syn_backlog=1024
|
|
||||||
* net.ipv4.tcp_tw_reuse=1, net.ipv4.tcp_fin_timeout=30, net.ipv4.ip_local_port_range=2000 65000
|
|
||||||
* relire <https://vincent.bernat.ch/fr/blog/2014-tcp-time-wait-state-linux>
|
|
||||||
|
|
||||||
## arp-sk
|
## arp-sk
|
||||||
|
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.**
|
|
||||||
|
|
||||||
# Howto NetworkTuning
|
|
||||||
|
|
||||||
Doc officiel du kernel : <https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt>
|
|
||||||
|
|
||||||
/!\ À partir de Linux 2.6.7 il a des routines de « tuning automatique », et il n'est pas recommandé de modifier certaines valeurs.
|
|
||||||
|
|
||||||
## TCP
|
|
||||||
|
|
||||||
Quelques optimisations basés sur <http://www.nateware.com/linux-network-tuning-for-2013.html>
|
|
||||||
|
|
||||||
~~~
|
|
||||||
# Increase Linux autotuning TCP buffer limits
|
|
||||||
# Set max to 16MB (16777216) for 1GE and 32M (33554432) or 54M (56623104) for 10GE
|
|
||||||
# Don't set tcp_mem itself! Let the kernel scale it based on RAM.
|
|
||||||
net.core.rmem_max = 16777216
|
|
||||||
net.core.wmem_max = 16777216
|
|
||||||
net.core.rmem_default = 16777216
|
|
||||||
net.core.wmem_default = 16777216
|
|
||||||
net.core.optmem_max = 40960
|
|
||||||
net.ipv4.tcp_rmem = 4096 87380 16777216
|
|
||||||
net.ipv4.tcp_wmem = 4096 65536 16777216
|
|
||||||
~~~
|
|
||||||
|
|
||||||
|
|
||||||
~~~
|
|
||||||
# Make room for more TIME_WAIT sockets due to more clients,
|
|
||||||
# and allow them to be reused if we run out of sockets
|
|
||||||
# Also increase the max packet backlog
|
|
||||||
net.core.netdev_max_backlog = 50000
|
|
||||||
net.ipv4.tcp_max_syn_backlog = 30000
|
|
||||||
net.ipv4.tcp_max_tw_buckets = 2000000
|
|
||||||
net.ipv4.tcp_tw_reuse = 1
|
|
||||||
net.ipv4.tcp_fin_timeout = 10
|
|
||||||
~~~
|
|
||||||
|
|
||||||
## Carte réseau
|
|
||||||
|
|
||||||
Augmentation du buffer de la carte réseau, cela permet de stocker plus de paquets dans son cache si le système n'y arrive plus (machine trop chargé, …).
|
|
||||||
On regarde la conf avec « -g » et on la modifie avec « -G rx N » et « -G tx N ».
|
|
||||||
|
|
||||||
~~~
|
|
||||||
# ethtool -g eth0
|
|
||||||
Ring parameters for eth0:
|
|
||||||
Pre-set maximums:
|
|
||||||
RX: 4096
|
|
||||||
RX Mini: 0
|
|
||||||
RX Jumbo: 0
|
|
||||||
TX: 4096
|
|
||||||
Current hardware settings:
|
|
||||||
RX: 256
|
|
||||||
RX Mini: 0
|
|
||||||
RX Jumbo: 0
|
|
||||||
TX: 256
|
|
||||||
~~~
|
|
||||||
|
|
||||||
/!\ Attention ce n'est pas géré par toutes les cartes réseau. Il faut des cartes « PRO », de type Intel ou Broadcom.
|
|
||||||
|
|
Loading…
Reference in a new issue