Advertisement
Guest User

netdev

a guest
Jun 6th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. #increase File Descriptor limit
  2. fs.file-max = 100000
  3.  
  4. # increase network connections
  5. net.ipv4.netfilter.ip_conntrack_max = 1048576
  6. net.nf_conntrack_max = 1048576
  7. net.core.somaxconn = 1048576
  8.  
  9. # reduce VM Swappiness
  10. vm.swappiness = 10
  11. vm.vfs_cache_pressure = 50
  12.  
  13. # adjust dirty background ratio
  14. vm.dirty_background_ratio = 5
  15.  
  16. # Increase ephemeral IP ports
  17. net.ipv4.ip_local_port_range = 10000 65000
  18.  
  19. # Increase Linux autotuning TCP buffer limits
  20. # Set max to 16MB for 1GE and 32M (33554432) or 54M (56623104) for 10GE
  21. # Don't set tcp_mem itself! Let the kernel scale it based on RAM.
  22. net.core.rmem_max = 16777216
  23. net.core.wmem_max = 16777216
  24. net.core.rmem_default = 16777216
  25. net.core.wmem_default = 16777216
  26. net.core.optmem_max = 40960
  27. net.ipv4.tcp_rmem = 4096 87380 16777216
  28. net.ipv4.tpc_wmem = 4096 65536 16777216
  29.  
  30. # Make room for more TIME_WAIT sockets due to more clients,
  31. # and allow them to be reused if we run out of sockets
  32. # Also increase the max packet backlog
  33. net.core.netdev_max_backlog = 100000
  34. net.ipv4.tcp_max_syn_backlog = 100000
  35. net.ipv4.tcp_max_tw_buckets = 2000000
  36. net.ipv4.tcp_tw_reuse = 1
  37. net.ipv4.tcp_fin_timeout = 10
  38.  
  39. # Disable TCP slow start on idle connections
  40. net.ipv4.tcp_slow_start_after_idle = 0
  41.  
  42. # If your servers talk UDP, also up these limits
  43. net.ipv4.udp_rmem_min = 8192
  44. net.ipv4.udp_wmem_min = 8192
  45.  
  46. #Disable source routing and redirects
  47. #net.ipv4.conf.all.send_redirects = 0
  48. #net.ipv4.conf.all.accept_redirects = 0
  49. #net.ipv4.conf.all.accept_source_route = 0
  50.  
  51. # Log packets with impossible addresses for security
  52. net.ipv4.conf.all.log_martians = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement