Created
March 10, 2016 21:45
-
-
Save justicel/b575386bc51beda734eb to your computer and use it in GitHub Desktop.
load-balancer optimizations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sysctl settings. | |
# Load-balancer required sysctl settings | |
sysctl::value { 'net.ipv4.ip_nonlocal_bind': | |
value => 1, | |
} | |
sysctl::value { 'net.ipv4.ip_forward': | |
value => 1, | |
} | |
sysctl::value { 'vm.max_map_count': | |
value => '262144', | |
} | |
sysctl::value { 'net.ipv4.tcp_rmem': | |
value => '4096 16060 262144', | |
} | |
sysctl::value { 'net.ipv4.tcp_wmem': | |
value => '4096 16060 262144', | |
} | |
sysctl::value { 'net.ipv4.tcp_tw_reuse': | |
value => '1', | |
} | |
sysctl::value { 'net.ipv4.tcp_fin_timeout': | |
value => '30', | |
} | |
sysctl::value { 'net.core.netdev_max_backlog': | |
value => '10000', | |
} | |
sysctl::value { 'net.ipv4.tcp_syncookies': | |
value => '1', | |
} | |
sysctl::value { 'net.ipv4.conf.all.rp_filter': | |
value => '1', | |
} | |
sysctl::value { 'net.core.somaxconn': | |
value => '60000', | |
} | |
sysctl::value { 'net.ipv4.tcp_max_syn_backlog': | |
value => '60000', | |
} | |
sysctl::value { 'net.ipv4.tcp_synack_retries': | |
value => '3', | |
} | |
sysctl::value { 'kernel.sem': | |
value => '250 32000 32 500', | |
} | |
sysctl::value { 'net.ipv4.ip_local_port_range': | |
value => '1024 65023', | |
} | |
sysctl::value { 'vm.swappiness': | |
value => '5', | |
} | |
sysctl::value { 'net.nf_conntrack_max': | |
value => '165536', | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment