From Gracious Owl, 5 Months ago, written in Plain Text.
  1. net.core.rmem_default = 1048576
  2. net.core.rmem_max = 16777216
  3. net.core.wmem_default = 1048576
  4. net.core.wmem_max = 16777216
  5. net.core.optmem_max = 65536
  6. net.ipv4.tcp_rmem = 4096 1048576 2097152
  7. net.ipv4.tcp_wmem = 4096 65536 16777216
  8.  
  9.  
  10. net.ipv4.udp_rmem_min = 8192
  11. net.ipv4.udp_wmem_min = 8192
  12. net.ipv4.tcp_fastopen = 3
  13.  
  14. net.ipv4.tcp_max_syn_backlog = 30000
  15. # Also increase the max packet backlog
  16. net.core.netdev_max_backlog = 100000
  17. net.core.netdev_budget = 50000
  18. #
  19. # # Make room for more TIME_WAIT sockets due to more clients,
  20. # # and allow them to be reused if we run out of sockets
  21. net.ipv4.tcp_max_syn_backlog = 30000
  22. net.ipv4.tcp_max_tw_buckets = 2000000
  23. net.ipv4.tcp_tw_reuse = 1
  24. net.ipv4.tcp_fin_timeout = 10
  25.  
  26. #
  27. # # Disable TCP slow start on idle connections
  28. # Set max to 16MB for 1GE and 32M (33554432) or 54M (56623104) for 10GE
  29. # Don't set tcp_mem itself! Let the kernel scale it based on RAM.
  30. net.core.rmem_max = 16777216
  31. net.core.wmem_max = 16777216
  32. net.core.rmem_default = 16777216
  33. net.core.wmem_default = 16777216
  34. net.core.optmem_max = 40960
  35.  
  36. # cloudflare uses this for balancing latency and throughput
  37. # https://blog.cloudflare.com/the-story-of-one-latency-spike/
  38. net.ipv4.tcp_rmem = 4096 1048576 2097152
  39. net.ipv4.tcp_wmem = 4096 65536 16777216
  40.  
  41. # Also increase the max packet backlog
  42. net.core.netdev_max_backlog = 100000
  43. net.core.netdev_budget = 50000
  44. net.core.netdev_budget_usecs = 5000
  45. # Make room for more TIME_WAIT sockets due to more clients,
  46. # and allow them to be reused if we run out of sockets
  47. net.ipv4.tcp_max_syn_backlog = 30000
  48. net.ipv4.tcp_max_tw_buckets = 2000000
  49. net.ipv4.tcp_tw_reuse = 1
  50. net.ipv4.tcp_fin_timeout = 10
  51.  
  52. # Disable TCP slow start on idle connections
  53. net.ipv4.tcp_slow_start_after_idle = 0
  54.  
  55. # If your servers talk UDP, also up these limits
  56. net.ipv4.udp_rmem_min = 8192
  57. net.ipv4.udp_wmem_min = 8192
captcha