Skip to content

Instantly share code, notes, and snippets.

@danveloper
Last active November 20, 2020 01:18
Show Gist options
  • Save danveloper/3440f151e44cfdda56040cc43890a1b9 to your computer and use it in GitHub Desktop.
Save danveloper/3440f151e44cfdda56040cc43890a1b9 to your computer and use it in GitHub Desktop.

Ratpack Production Tunings

# cat /etc/security/limits.conf

*         hard    nofile      500000
*         soft    nofile      500000
root      hard    nofile      500000
root      soft    nofile      500000
# cat /etc/sysctl.conf
fs.file-max = 10000000
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.core.netdev_max_backlog = 250000
net.ipv4.tcp_congestion_control=htcp
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.core.somaxconn=10000
net.ipv4.tcp_max_syn_backlog=10000
Note
You need to adjust the following settings according to the memory available on your system. Currently, the default value for max_user_watches is 1/25 (4%) of the available low memory, divided by the registration cost in bytes. epoll(7)
# cat /proc/sys/fs/epoll/max_user_watches
25323970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment