sysctl.conf
Ubuntu server out of box is not optimized to make full use of available hardware. This means “out-of-box” setup might fail under high load.
So we need to tweak system configuration for maximum concurrancy.
Sysctl Tweaks
Open
vim /etc/sysctl.conf
Add following towards bottom
### IMPROVE SYSTEM MEMORY MANAGEMENT ### # Increase size of file handles and inode cache fs.file-max = 2097152 # Do less swapping vm.swappiness = 10 vm.dirty_ratio = 60 vm.dirty_background_ratio = 2 ### GENERAL NETWORK SECURITY OPTIONS ### # Number of times SYNACKs for passive TCP connection. net.ipv4.tcp_synack_retries = 2 # Allowed local port range net.ipv4.ip_local_port_range = 2000 65535 # Protect Against T