Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. # Uncomment the next line to enable packet forwarding for IPv4
  2. net.ipv4.ip_forward=1
  3.  
  4. # Uncomment the next line to enable packet forwarding for IPv6
  5. # Enabling this option disables Stateless Address Autoconfiguration
  6. # based on Router Advertisements for this host
  7. net.ipv6.conf.all.forwarding=1
  8. net.ipv4.conf.all.proxy_arp = 1
  9. net.core.netdev_max_backlog = 250000
  10.  
  11.  
  12.  
  13. # Usually SIP uses TCP or UDP to carry the SIP signaling messages over the internet (<=> TCP/UDP sockets).
  14. # The receive buffer (socket receive buffer) holds the received data until it is read by the application.
  15. # The send buffer (socket transmit buffer) holds the data until it is read by the underling protocol in the network stack.
  16.  
  17. #net.core.rmem_max = 10485760
  18. #net.core.rmem_max = 12582912
  19. #net.core.rmem_max = 33554432
  20. net.core.rmem_max = 67108864
  21.  
  22. #net.core.wmem_max = 10485760
  23. #net.core.wmem_max = 12582912
  24. net.core.wmem_max = 33554432
  25.  
  26. #net.core.rmem_default = 10485760
  27. net.core.rmem_default = 31457280
  28. #net.core.wmem_default = 10485760
  29. net.core.wmem_default = 31457280
  30.  
  31. net.ipv4.tcp_rmem = 10240 87380 10485760
  32. net.ipv4.tcp_wmem= 10240 87380 10485760
  33.  
  34. # Increase the write-buffer-space allocatable
  35. net.ipv4.udp_rmem_min = 131072
  36. net.ipv4.udp_wmem_min = 131072
  37. # net.ipv4.udp_mem = 65536 131072 262144
  38. net.ipv4.udp_mem = 19257652 19257652 19257652
  39. net.ipv4.tcp_mem = 786432 1048576 26777216
  40.  
  41. # Increase the maximum amount of option memory buffers
  42. net.core.optmem_max = 25165824
  43.  
  44.  
  45.  
  46. # Set the value of somaxconn. This is the Max value of the backlog. The default value is 128.
  47. # If the backlog is greater than somaxconn, it will truncated to it.
  48. net.core.somaxconn = 65535
  49.  
  50. # The kernel parameter "netdev_max_backlog" is the maximum size of the receive queue.
  51. net.core.netdev_max_backlog = 300000
  52.  
  53.  
  54. # change the maximum number of open files
  55. # be sure that /proc/sys/fs/inode-max is 3-4 times the new value of
  56. # /proc/sys/fs/file-max, or you will run out of inodes.
  57. # The upper limit on fs.file-max is recorded in fs.nr_open (which is 1024*1024)
  58. fs.file-max = 500000
  59.  
  60. # The value 0 makes the kernel swap only to avoid out of memory condition.
  61. # Do less swapping
  62. vm.swappiness = 10
  63. vm.dirty_ratio = 60
  64. vm.dirty_background_ratio = 2
  65.  
  66. # The default operating system limits on mmap counts is likely to be too low
  67. # used by vmtouch
  68. vm.max_map_count=262144
  69.  
  70. # the maximum size (in bytes) of a single shared segment that a Linux process can allocate in its virtual address space.
  71. # 1/2 of physical RAM, shared memory segment theoretically is 2^64bytes. This is correspond to all physical RAM that you have.
  72. kernel.shmmax = 1073741824
  73.  
  74. # total port range
  75. net.ipv4.ip_local_port_range = 1024 65535
  76.  
  77.  
  78. # fast fast fast
  79. net.ipv4.tcp_fastopen = 3
  80.  
  81. # bbr
  82. net.core.default_qdisc=fq
  83. net.ipv4.tcp_congestion_control=bbr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement