3 ms·
Some other tricks that were not touched upon in the article, but which may apply depending on the nature of your traffic: 1) If you have lots of short connecti
by evgen 16y ago
Some other tricks that were not touched upon in the article, but which may apply depending on the nature of your traffic:
1) If you have lots of short connections and you want to tune the amount of time that the kernel will keep half-closed connections around then you can play around with changing the values of net.ipv4.tcp_fin_timeout, net.ipv4.tcp_tw_reuse, net.ipv4.tcp_tw_recycle, and net.ipv4.tcp_max_tw_buckets.
2) If you have a modern NIC then you probably need to tweak the txqueuelen in your ifconfig options.
3) If you are get hits from a large number of random browsers then sometimes setting net.ipv4.tcp_no_metrics_save and net.ipv4.tcp_moderate_rcvbuf to turn off cacheing of flow metrics helps.
4) Increase net.core.somaxconn to increase your listen queue size.
5) If you have a local firewall like iptables in place make sure you increase net.ipv4.ip_conntrack_max, direct your high-traffic ports to the NOTRACK table, and play around with all of the various net.ipv4.netfilter.ip_conntrack_tcp_timeout_* settings.
- bnoordhuis 16y agoGood tips. The only thing I would recommend against is setting net.core.somaxconn too high - a too large backlog at a time when your server is already resource constrained might just push it over the brink.