Linux - Network settings for high traffic generating application

less than 1 minute read

/etc/sysctl.conf

CENT OS example

1
# sysctl -w net.core.wmem_default=262144

# default socket memory buffer per a socker
net.core.wmem_default=131072(128KB)
net.core.rmem_default=131072(128KB)

# max socker memory buffer per a socker
net.core.wmem_max=2097152(2MB)
net.core.rmem_max=2097152(2MB)

# tcp buffer size (min, default, max) 4KB, 64KB, 2MB
net.ipv4.tcp_wmem=4096 65536 2048000

# enable TCP window scaling: client can transfer data more efficiently, it will be buffered in server side.
net.ipv4.tcp_window_scaling=1

# allow to accept simultaneous connections
net.ipv4.tcp_max_syn_backlog=1024