You are here: Supporting Documents > Stratus Cloud Installation Guide > OpenStack Installation and Configuration > Disabling Checksum Offload on OpenStack Component Nodes

Disabling Checksum Offload on OpenStack Component Nodes

Checksum offload (for example, the TCP offload engine (TOE)) improves performance by offloading checksum verification from the system processors to the network interfaces, but it can also lead to data corruption.

To prevent data corruption in your instances, the Stratus Cloud Availability Services installation script automatically disables checksum offload for all network interfaces in your KVM-FT compute nodes. Stratus also recommends that you disable checksum offload on KVM compute nodes that are not running Availability Services as well as other OpenStack components, including your OpenStack controller and any Neutron or Cinder nodes.

Checksum offload is enabled by default in most operating systems, but you can manually disable it as described in the following procedure.

To disable checksum offload for all network interfaces:

  1. Log on to the console of a KVM compute node (or other OpenStack component node) as the root user, or be prepared to use sudo to run commands as root.
  2. Switch to the /sbin directory:

    # cd /sbin
  3. Search for an existing /sbin/ifup-local startup script, which configures network interfaces at startup:

    # ls ifup-local
  4. If an /sbin/ifup-local startup script does not already exist, create a new script as follows:

    # touch /sbin/ifup-local
    # chmod +x /sbin/ifup-local
    # chcon --reference /sbin/ifup /sbin/ifup-local

    The first two commands create the file and mark it as an executable script. The last command sets the SELinux context for the script.

  5. Open the /sbin/ifup-local startup script in a text editor. Add the following lines to disable checksum offload on all network interfaces (except for the loopback interface) each time the system starts:

    #!/bin/bash
    if [ "$1" != "lo" ]; then
    /sbin/ethtool --offload $1 rx off tx off
    /sbin/ethtool -K $1 gso off
    /sbin/ethtool -K $1 gro off
    fi

    If you are adding the lines to an existing file, the #! /bin/bash line is already present. When adding the if then statement, ensure that it does not conflict with existing lines in the file.

  6. Save and close the /sbin/ifup-local startup script.
  7. To apply the network startup changes, either restart the system or restart the network.

    Caution: Restarting the system or network disrupts any running instances.

    For example, to restart the network:

    # service network restart

    If you need to avoid restarting for now, you can also manually disable checksum offloading by executing the following ethtool command for each network interface :

    # ethtool -K devname tso off lro off gro off gso off

    However, the checksum offload features will resume upon restart unless you have updated the ifup-local startup script.

  8. After disabling checksum offload, verify the status of each network interface, as follows:

    # ethtool --show-offload devname

    For example, to verify that all checksum offload settings are off for eth0:

    # ethtool --show-offload eth0
    Features for eth0:
    rx-checksumming: off
    tx-checksumming: off
    scatter-gather: off
    tcp-segmentation-offload: off
    udp-fragmentation-offload: off
    generic-segmentation-offload: off
    generic-receive-offload: off
    large-receive-offload: off
    ntuple-filters: off
    receive-hashing: off
  9. Repeat the preceding steps on additional KVM compute nodes and other OpenStack component nodes, as needed.
of