All Products
Search
Document Center

:Enable TCP SACK on a Linux instance

Last Updated:Jul 30, 2024

This topic describes how to enable TCP selective acknowledgment (SACK) on a Linux Elastic Compute Service (ECS) instance.

Note

If TCP SACK is disabled on a Linux ECS instance, the network performance of the instance may be affected. You can perform the operations that are described in this topic to enable TCP SACK.

Procedure

Note

This section describes how to enable TCP SACK on an ECS instance that runs CentOS 7.4. The operations that you can perform to enable TCP SACK may slightly vary based on the operating system. For more information, see the official document for the actual operating system of your ECS instance.

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

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

  2. Run the following command to modify the /etc/sysctl.conf file:

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

    • If net.ipv4.tcp_sack settings exist in the /etc/sysctl.conf file, perform the following steps to enable TCP SACK:

      1. Press the I key to enter Insert mode.

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

      3. Press the Esc key to exit the Insert mode. Enter :wq and press the Enter key to save and close the file.

    • If net.ipv4.tcp_sack settings do not exist in the /etc/sysctl.conf file, perform the following steps to enable TCP SACK:

      1. Press the I key to enter Insert mode.

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

        net.ipv4.tcp_sack = 1

        The following figure shows how to add the configuration to the file.

        image

      3. Press the Esc key to exit the Insert mode. Enter :wq and press the Enter key to save and close the file.

  4. Run the following command to allow the changes to take effect:

    sysctl -p