Tag:linux sysctl.conf kernel parameter
cat /etc/sysctl.confsysctl -pfs.file max = 999999# represents the maximum number of handles that a process, such as a worker process, can open at the same time. Limit the maximum number of concurrent connections directly net.ipv4.tcp_tw_reuse = 1#1 represents allowing a socket connection with a status of Time-wait to be re-used for a new connection. It is meaningful for the server because there is a large number of connections to the time-wait state net.ipv4.tcp_keepalive_time = 600# when KeepAlive is enabled, The frequency at which TCP sends keepalive messages. The default is 2 hours. Make it smaller and get rid of useless connections faster net.ipv4.tcp_fin_timeout = 30# the maximum time that the socket remains fn-wait-2 when the server actively closes the link net.ipv4.tcp_max_tw_buckets = 5000# the maximum number of time-wait sockets allowed. More than a few digits, the time-wait socket is immediately cleared and the warning message is printed. The default is 180000, and too many time-wait sockets make webserver slower net.ipv4.ip_local_port_range = 1024 61000# Range of values for local ports (not including remote connections) in UDP and TCP connections net.ipv4.tcp_rmem = 4096 32768 262142net.ipv4.tcp_wmem = 4096 32768 262142#TCP receive/Send cache minimum value, default value, maximum value net.core.netdev_max_backlog = 8096# When a network card receives a packet that is faster than the kernel processing speed, a queue holds the packets. This parameter is the maximum value for this queue. net.core.rmem_default = 262144net.core.wmem_default = 262144# default value of the kernel socket receive/send buffer Net.core. rmem_max = 2097152net.core.wmem_max = 2097152# the maximum value of the core socket receive/send buffer net.ipv4.tcp_ syncookies = 1# resolves a syn attack on TCP. Performance independent net.ipv4.tcp_max_syn_backlog = 1024# The maximum length of the SYN request queue for the three-time handshake establishment phase, which defaults to 1024. Set a larger number of requests that can be processed too late in the queue without losing client requests
linux-Optimizing kernel Parameters/etc/sysctl.conf