Skip to content

Instantly share code, notes, and snippets.

@meghuizen
Created July 26, 2013 09:33
Show Gist options
  • Save meghuizen/6087569 to your computer and use it in GitHub Desktop.
Save meghuizen/6087569 to your computer and use it in GitHub Desktop.
Linux gigabit tuning
##
## Please make sure to change this according to your own needs/configuration
## Some values won't be helpful for some configurations (like routers or firewalls)
## If you have a normal server, these settings should work fine
##
## Tested on Dell PowerEdge/PowerVault servers with gigabit, iSCSI, multipathing with Citrix XenServer clients
## Large performance improvement on the default settings!
##
## Carefull selected values!
##
## Warning these settings should be avoided or used with carefull testing (broke some connections at our tests):
## net.ipv4.tcp_tw_recycle
## net.ipv4.tcp_tw_reuse
## Default they are 0 and be kept 0
##
## Quality source on tuning: http://fasterdata.es.net/host-tuning/linux/
##
# Uncomment the following to stop low-level messages on console
kernel.printk = 3 4 1 3
# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1
# Uncomment the next line to enable TCP/IP SYN cookies
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_synack_retries = 3
net.core.netdev_max_backlog = 5000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_keepalive_probes = 5
vm.min_free_kbytes = 67584
vm.vfs_cache_pressure = 50
vm.swappiness = 0
fs.file-max=500417
# good for datacenters and normal western networks
net.ipv4.tcp_congestion_control = cubic
# Settings for Gigabit connection
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.udp_rmem_min = 16384
net.ipv4.udp_wmem_min = 16384
# When using jumboframes (I don't on my 100/1000 network)
#net.ipv4.tcp_mtu_probing = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment