Linux kernel parameter adjustment indicates that all TCP/IP optimization parameters are in the/proc/sys/net/directory. For example, the following are some of the most important tuning parameters, followed by their meanings: 1./proc/sys/net/core/rmem_max & mdash; the maximum TCP data receiving buffer. 2./proc/sys/ne... Linux kernel parameter adjustment indicates that all TCP/IP optimization parameters are in the/proc/sys/net/directory. For example, the following are some of the most important tuning parameters, followed by their meanings: 1./proc/sys/net/core/rmem_max-maximum TCP data receiving buffer. 2./proc/sys/net/core/wmem_max-maximum TCP data sending buffer. 3./proc/sys/net/ipv4/tcp_timestamps-the timestamp is added to the TCP header (see RFC 1323) by 12 bytes. 4./proc/sys/net/ipv4/tcp_sack-select a response. 5./proc/sys/net/ipv4/tcp_window_scaling-supports larger TCP windows. if the maximum number of TCP windows exceeds 65535 (64KB), you must set this value to 1. 6. rmem_default-default receiving window size. 7. rmem_max-maximum size of the receiving window. 8. wmem_default-default size of the sending window. 9. wmem_max-maximum size of the sending window. All contents in the/proc directory are temporary, so any modifications will be lost after the system is restarted. We recommend that you automatically modify the TCP/IP parameters when starting the system: add the following code to/etc/rc. local file, and then save the file. when the system restarts, the following TCP/IP parameters will be automatically modified: echo 256960>/proc/sys/net/core/rmem_defaultecho 256960>/proc/sys/net/core/rmem_maxecho 256960>/proc/sys/net/core/wmem_defaultecho 256960>/ proc/sys/net/core/wmem_maxecho 0>/proc/sys/net/ipv4/tcp_timestam1_cho 1>/proc/sys/net/ipv4/tcp_sackecho 1>/proc/sys/ net/ipv4/tcp_window_scalingtcp/ip parameters are self-explanatory, TCP window size settings It is 256960, and the TCP timestamp is disabled (12 bytes are removed from the header of each packet). it supports a larger TCP window and a selected response from TCP. The above value is determined based on the internet connection and the maximum bandwidth/latency rate. Note: the value in the above instance can be used in practice, but it only contains some parameters. Another method: Use/etc/sysctl. when the system starts, conf configures the parameter to the value you set: net. core. rmem_default = 256960net. core. rmem_max = 256960net. core. wmem_default = 256960net. core. wmem_max = 256960net. ipv4.tcp _ timestamps = 0net. ipv4.tcp _ sack = 1net. ipv4.tcp _ window_scaling = 1 set Linux kernel parameters to configure Linux kernel parameters (two methods). after modification, you do not need to restart update:/sbin/sysctl-p; first, enable/etc/sysctl. replace the following contents with the conf file. shmall = 2097152kernel. shmmax = 2147483648kernel. shmmni = 4096kernel. sem = 250 32000 100 fs. file-max = 65536net. ipv4.ip _ local_port_range = 1024 65000net. core. rmem_default = 262144net. core. wmem_default = 262144net. core. rmem_max = 262144net. core. wmem_max = 262144 Type 2: Open the terminal cat>/etc/sysctl. conf
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service