Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #increase File Descriptor limit
- fs.file-max = 100000
- # increase network connections
- net.ipv4.netfilter.ip_conntrack_max = 1048576
- net.nf_conntrack_max = 1048576
- net.core.somaxconn = 1048576
- # reduce VM Swappiness
- vm.swappiness = 10
- vm.vfs_cache_pressure = 50
- # adjust dirty background ratio
- vm.dirty_background_ratio = 5
- # Increase ephemeral IP ports
- net.ipv4.ip_local_port_range = 10000 65000
- # Increase Linux autotuning TCP buffer limits
- # Set max to 16MB 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.tpc_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 = 100000
- net.ipv4.tcp_max_syn_backlog = 100000
- net.ipv4.tcp_max_tw_buckets = 2000000
- net.ipv4.tcp_tw_reuse = 1
- net.ipv4.tcp_fin_timeout = 10
- # Disable TCP slow start on idle connections
- net.ipv4.tcp_slow_start_after_idle = 0
- # If your servers talk UDP, also up these limits
- net.ipv4.udp_rmem_min = 8192
- net.ipv4.udp_wmem_min = 8192
- #Disable source routing and redirects
- #net.ipv4.conf.all.send_redirects = 0
- #net.ipv4.conf.all.accept_redirects = 0
- #net.ipv4.conf.all.accept_source_route = 0
- # Log packets with impossible addresses for security
- net.ipv4.conf.all.log_martians = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement