System parameter Optimization and interpretation

Source: Internet
Author: User

Server Optimization Policy:

Net.ipv4.tcp_max_tw_buckets = 6000
Net.ipv4.ip_local_port_range = 1024 65000
Net.ipv4.tcp_tw_recycle = 1
Net.ipv4.tcp_tw_reuse = 1
Net.ipv4.tcp_syncookies = 1
Net.core.somaxconn = 262144
Net.core.netdev_max_backlog = 262144
Net.ipv4.tcp_max_orphans = 262144
Net.ipv4.tcp_max_syn_backlog = 262144
Net.ipv4.tcp_synack_retries = 1
Net.ipv4.tcp_syn_retries = 1
Net.ipv4.tcp_fin_timeout = 1
Net.ipv4.tcp_keepalive_time = 30


Net.ipv4.tcp_max_tw_buckets: Used to set the number of timewait, default is 180000
Net.ipv4.ip_local_port_range: Used to set the range of ports allowed for the system to open
Net.ipv4.tcp_tw_recycle: Used to set enable timewait Quick Recycle
Net.ipv4.tcp_tw_reuse: For setting up re-use, allow see time-wait sockets re-use for new TCP connections
Net.ipv4.tcp_syncookies: Set turn on SYN cookies to enable cookie process processing when a SYN wait queue overflow occurs
Net.core.somaxconn: The default value is 128, which is used to adjust the number of simultaneous TCP connections initiated by the system, and in high-concurrency requests, the default value may cause the connection to time out or retransmit, so this value needs to be adjusted in conjunction with the number of concurrent requests

Net.core.netdev_max_backlog: Indicates the maximum number of packets that are allowed to be sent to a queue when each network interface receives a database package at a rate that is faster than the rate at which the kernel processes these packets

Net.ipv4.tcp_max_orphans: Used to set up how many TCP sockets in the system are not associated to any one user file handle, if more than this number, orphaned links will be immediately reset and output a warning message, this limit is only to prevent a simple Dos attack, You can't rely too much on this limit, or even think of reducing this value, and more of this is increasing the value


Net.ipv4.tcp_max_syn_backlog: The maximum value of a link request that is used to record the client acknowledgement information that has not yet been received, which defaults to 1024 for systems with 128M of memory and 128 for small memory systems

Net.ipv4.tcp_synack_retries: Determines the number of Syn+ack packets sent before the kernel discards the link

Net.ipv4.tcp_syn_retries: The number of SYN packets sent before the kernel abandons the connection

Net.ipv4.tcp_fin_timeout: Determines the time the socket remains in the Fin-wait-2 state, the default value is 60 seconds, it is important to set this value correctly, and sometimes even a Web server with a small load There is also a risk of memory overflow due to a large number of dead sockets

Net.ipv4.tcp_keepalive_time: Indicates the frequency at which TCP sends keepalive messages when KeepAlive is enabled. The default value is 2 (in hours)

This article is from the "528" blog, please be sure to keep this source http://3175113.blog.51cto.com/3165113/1585091

System parameter Optimization and interpretation

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.