Icon

Partager Envoyer

(Logiciel informatique)

Configuration du noyau Linux

FIchier /etc/sysctl.conf :

# Recycle Zombie connections 
net.inet.tcp.fast_finwait2_recycle=1 
net.inet.tcp.maxtcptw=200000 
# Increase number of files 
kern.maxfiles=65535 
kern.maxfilesperproc=16384 
# Increase page share factor per process 
vm.pmap.pv_entry_max=54272521 
vm.pmap.shpgperproc=20000 
# Increase number of connections 
vfs.vmiodirenable=1 
kern.ipc.somaxconn=3240000 
net.inet.tcp.rfc1323=1 
net.inet.tcp.delayed_ack=0 
net.inet.tcp.restrict_rst=1 
kern.ipc.maxsockbuf=2097152 
kern.ipc.shmmax=268435456 
# Host cache 
net.inet.tcp.hostcache.hashsize=4096 
net.inet.tcp.hostcache.cachelimit=131072 
net.inet.tcp.hostcache.bucketlimit=120 
# Increase number of ports 
net.inet.ip.portrange.first=2000 
net.inet.ip.portrange.last=100000 
net.inet.ip.portrange.hifirst=2000 
net.inet.ip.portrange.hilast=100000 
kern.ipc.semvmx=131068 
# Disable Ping-flood attacks 
net.inet.tcp.msl=2000 
net.inet.icmp.bmcastecho=1 
net.inet.icmp.icmplim=1 
net.inet.tcp.blackhole=2 
net.inet.udp.blackhole=1 
net.ipv4.tcp_fin_timeout = 1 
net.ipv4.tcp_tw_recycle = 1 
# Increase maximum amount of memory allocated to shm 
kernel.shmmax = 1073741824 
# This will increase the amount of memory available for socket input/output queues 
net.ipv4.tcp_rmem = 4096 25165824 25165824 
net.core.rmem_max = 25165824 
net.core.rmem_default = 25165824 
net.ipv4.tcp_wmem = 4096 65536 25165824 
net.core.wmem_max = 25165824 
net.core.wmem_default = 65536 
net.core.optmem_max = 25165824 
net.ipv4.tcp_syncookies = 1 
net.ipv4.tcp_max_orphans = 262144 
net.ipv4.tcp_max_syn_backlog = 262144 
net.ipv4.tcp_synack_retries = 2 
net.ipv4.tcp_syn_retries = 2 
# you shouldn't be using conntrack on a heavily loaded server anyway, but these are 
# suitably high for our uses, insuring that if conntrack gets turned on, the box doesn't die 
# net.ipv4.netfilter.ip_conntrack_max = 1048576 
# net.nf_conntrack_max = 1048576 
# For Large File Hosting Servers 
net.core.wmem_max = 1048576 
net.ipv4.tcp_wmem = 4096 87380 524288 
# Use swap when we have less than 5% of the physical memory available 
vm.swappiness=5

Note : un redémarrage du serveur est nécessaire


Ce document a été publié le 2018-06-28 14:25:35. (Dernière mise à jour : 2019-03-31 12:54:51.)




This website uses 'cookies' to enhance user experience and provide authentification. You may change which cookies are set at any time by clicking on more info. Accept
x