Share Pastebin
Guest
Public paste!

dirkos

By: a guest | Jul 23rd, 2008 | Syntax: None | Size: 1.09 KB | Hits: 17 | Expires: Never
Copy text to clipboard
  1. Some settings for broadband networking are adjustable from /etc/sysctl.conf. Open that file and add these lines to the end.
  2.  
  3. net.core.rmem_default = 524288
  4. net.core.rmem_max = 524288
  5. net.core.wmem_default = 524288
  6. net.core.wmem_max = 524288
  7. net.ipv4.tcp_wmem = 4096 87380 524288
  8. net.ipv4.tcp_rmem = 4096 87380 524288
  9. net.ipv4.tcp_mem = 524288 524288 524288
  10. net.ipv4.tcp_rfc1337 = 1
  11. net.ipv4.ip_no_pmtu_disc = 0
  12. net.ipv4.tcp_sack = 1
  13. net.ipv4.tcp_fack = 1
  14. net.ipv4.tcp_window_scaling = 1
  15. net.ipv4.tcp_timestamps = 1
  16. net.ipv4.tcp_ecn = 0
  17. net.ipv4.route.flush = 1
  18.  
  19. Those numbers are inclined toward a traditional DSL connection with a maximum speed of roughly 512Kbps. Connections that are faster than that will benefit from some different settings. The Gentoo wiki suggests these:
  20.  
  21. net.core.rmem_max=16777216
  22. net.core.wmem_max=16777216
  23. net.ipv4.tcp_rmem=4096 87380 16777216
  24. net.ipv4.tcp_wmem=4096 65536 16777216
  25. net.ipv4.tcp_no_metrics_save=1
  26.  
  27. Experiment and see what gives you the best results.
  28.  
  29. You can apply these settings without a reboot; this command will insert new settings into a running system.
  30.  
  31. sudo sysctl -p