All Products
Search
Document Center

:Enable TCP SACK on Linux instances

Last Updated:Jan 28, 2026

This topic shows you how to enable TCP Selective Acknowledgment (SACK) on Linux Elastic Compute Service (ECS) instances.

Note

Disabling TCP SACK on an ECS instance can degrade its network performance.

Procedure

Note

These steps use CentOS 7.4 as an example. The procedure may differ for other operating systems. For specific instructions, refer to the official documentation for your OS.

  1. Connect to the Linux ECS instance by using Virtual Network Computing (VNC).

    For more information, see Connect to an instance using VNC.

  2. Edit the /etc/sysctl.conf file.

    vim /etc/sysctl.conf
  3. Enable TCP SACK.

    • If the net.ipv4.tcp_sack parameter already exists:

      1. Press i to enter Insert mode.

      2. Change net.ipv4.tcp_sack = 0 to net.ipv4.tcp_sack = 1.

      3. Press Esc to exit Insert mode, then enter :wq and press Enter to save the file and exit.

    • If the net.ipv4.tcp_sack parameter does not exist:

      1. Press i to enter Insert mode.

      2. Add the following line to the end of the file:

        net.ipv4.tcp_sack = 1

        Your file should now look similar to the following:

        image

      3. Press Esc to exit Insert mode, then enter :wq and press Enter to save the file and exit.

  4. To apply the changes, run the following command:

    sysctl -p