Appendix D - Network Performance Tuning

Network devices can pose problems for testing because of improper configuration. A few steps can help work around such problems. In particular, care must be paid to the configuration of high-speed network devices. In some rare cases, disabling Energy Efficient Ethernet settings may have beneficial effects, too.

Improving High-Speed Network Performance

Ubuntu’s default network configuration works fine for most 1 Gbps and 10 Gbps network devices; however, most servers require a little tweaking of settings to perform adequately at higher speeds. The iperf3 Target setup procedure described earlier, in Setting Up the iperf3 Server, configures most of the relevant options; however, in some cases you may need to further tweak the network settings.

The procedure outlined in Setting Up the iperf3 Server configures the iperf3 Target system to run multiple iperf3 instances. The reason for doing this is that a single iperf3 thread tends to max out the CPU at some level of throughput – somewhere between 10 Gbps and 20 Gbps using the servers in our test lab. This value may be different on other hardware, though. If either an iperf3 server or a SUT has less-powerful CPUs, more iperf3 instances may be required; and fewer may be optimal if a CPU is more powerful. The network performance test runs pre-tests to try to find the optimum number of iperf3 instances required, so manual adjustments should not be necessary; however, in extraordinary cases they may be. Consult your TPM if you believe you’re having problems caused by an incorrect number of instances being set.

If you can’t get adequate performance by setting jumbo frames and using multiple iperf3 instances, you may need to tweak additional network settings. This can be done with the optimize-network script, which is provided by the certification-tools package. This script takes the name of the network interface as a required argument, using -i or --interfaces, as in:

sudo optimize-network -i ens1f1

You may need to run this script on the iperf3 Target, on the SUT, or both. Be sure you do not reboot between running the script and running your network tests, since the configuration changes will not survive a reboot.

In extreme cases, additional configuration tweaks may be required. The full procedure is documented at https://certification.canonical.com/cert-notes/network-tuning/.

Disabling Energy Efficient Ethernet Settings

The Energy Efficient Ethernet (EEE; sometimes also called Green Ethernet) option is intended to save power in various ways. This feature can be present on network devices of any speed. Usually, it works fine; however, in some rare cases, enabling EEE can cause dropped packets and other problems. You can check a network device’s EEE settings with the following command (adjusting the network device name as appropriate):

ethtool --show-eee eno1
EEE settings for eno1:
        EEE status: enabled - active
        Tx LPI: disabled
        Supported EEE link modes:  100baseT/Full
                                   1000baseT/Full
        Advertised EEE link modes:  100baseT/Full
                                    1000baseT/Full
        Link partner advertised EEE link modes:  100baseT/Full
                                                 1000baseT/Full

This example shows that EEE is enabled and active on eno1, as shown on the second line of output. Other possible configurations include enabled but inactive (which happens when Ubuntu has enabled the feature but the switch doesn’t support it); disabled (when it’s disabled on the SUT); and unsupported (when the device doesn’t support EEE).

If you suspect that EEE is causing network test failures, you should first check to be sure it’s enabled and active. If so, you can disable it with the following command (adjusting the device name, of course):

sudo ethtool --set-eee eno1 eee off

If it’s successful, the command will produce no output. You can verify its success by re-issuing the ethtool --show-eee eno1 command.

Problems caused by EEE are extremely rare, so it’s unlikely you’ll need to resort to these procedures.