No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


eSight V300R009C00 Local HA System Software Installation Guide (SUSE Linux + MySQL + OMMHA) 10

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
How Do I Reduce the Time for Canceling TCP Connections in TIME_WAIT State on Linux

How Do I Reduce the Time for Canceling TCP Connections in TIME_WAIT State on Linux


In a large-scale Linux environment, a large number of Transmission Control Protocol (TCP) connections in TIME_WAIT state exist after Nginx reverse proxy service is adopted. By default, TCP connections in TIME_WAIT state are canceled in 2 minutes, which reduces system throughputs. How do I modify the kernel parameters of Linux to reduce the time for canceling TCP connections in TIME_WAIT states and increase the upper limit of nf_conntrack?


  1. Log in to the Linux OS as the root user.


    Remotely log in to the server as the ossuser and switch to the root user if the SUSE Linux is hardened.

  2. Modify the configuration file to modify the kernel parameters of Linux.

    1. Switch to the /etc directory.

      # cd /etc


      / is the root directory of Linux.

    2. You are advised to back up the configuration file sysctl.conf before modifying it. If the backup file name is sysctl.conf_bak, run the following command to back up the file:

      # cp sysctl.conf sysctl.conf_bak

    3. Open the sysctl.conf file in text mode.

      # vi sysctl.conf

    4. Add the following contents to the sysctl.conf file:
      net.ipv4.tcp_syncookies = 1 
      net.ipv4.tcp_tw_reuse = 1 
      net.ipv4.tcp_tw_recycle = 1 
      net.ipv4.tcp_timestamps = 1 
      net.ipv4.tcp_fin_timeout = 30 
      net.nf_conntrack_max = 655360 
      net.netfilter.nf_conntrack_tcp_timeout_established  = 1200     

      Set net.ipv4.tcp_tw_recycle to 0 in the NAT environment and to 1 in other environments.

    5. Run the following command for the parameters to take effect:

      # /sbin/sysctl -p

Updated: 2019-09-02

Document ID: EDOC1100011856

Views: 91669

Downloads: 53

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Previous Next