Advanced Performance Tuning
The Performance Tuning Guide can be used in the XLIO case for detailed instructions on how to optimally tune your machines for XLIO performance.
Check which NUMA is related to your interface.
cat /sys/
class/net/<interface_name>/device/numa_nodeExample:
[root
@r-host142 ~]# cat /sys/class/net/ens5/device/numa_node1The output above shows that your device is installed next to NUMA
Bind application to NUMA node:
#<host> numactl --cpunodebind=<NUMA_NODE> <your_application>
Check which CPU is related to the specific NUMA.
The output above shows that:
• CPUs 0-13 & 28-41 are related to NUMA 0• CPUs 14-27 & 42-55 are related to NUMA 1
Since we want to use NUMA 1, one of the following CPUs should be used: 14-27 & 42-55
Use the "taskset" command to run the XLIO process on a specific CPU.
Server-Side:
LD_PRELOAD=libxlio.so taskset -c
15sockperf sr -i < IP of FIRST machine MLXinterface>Client-Side:
LD_PRELOAD=libxlio.so taskset -c
15sockperf pp -i < IP of FIRST machine MLXinterface>
In this example, we use CPU 15 that belongs to NUMA 1. You can also use "numactl - -hardware".
XLIO can leverage Huge Pages to reduce TLB misses and improve memory allocation efficiency.
Check supported Huge Page sizes:
#(host) ls /sys/kernel/mm/hugepages/
Allocate Huge Pages:
#(host) echo <number_of_hugepages> | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
OR
#(host) echo <number_of_hugepages> | sudo tee /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
NUMA-aware Huge Pages allocation (recommended):
We recommend that Huge Pages be allocated on the same NUMA node as the application to reduce memory access latency and optimize performance.
#(host) echo <number_of_hugepages> | sudo tee /sys/devices/system/node/<NUMA_NODE>/hugepages/hugepages-2048kB/nr_hugepages
OR
#(host) echo <number_of_hugepages> | sudo tee /sys/devices/system/node/<NUMA_NODE>/hugepages/hugepages-1048576kB/nr_hugepages
Each machine has its own BIOS parameters. It is important to implement any server manufacturer and Linux distribution tuning recommendations.
When tuning the BIOS consider the tradeoff between performance and system power consumption to best address the application needs.
When configuring the BIOS, please pay attention to the following:
Turbo mode - Increases CPU core frequency when only portion of the cores is active.
Performance Mode
Max performance mode - A preset for maximum system performance - May increase system power consumption.
Power modes
C-states and P-states - Prevent/Allow CPU sleeping on idle - Disabling C/P states may reduce latency but increases system power consumption when the system is idle.
Hyperthreading – there is no right answer if you should have it ON or OFF.
• ON means more CPU to handle other application and Kernel tasks, so the amortized cost will be smaller for each CPU
• OFF means do not share cache with other tasks, so cache utilization may improve
SMI interrupts.
Look for "Processor Power and Utilization Monitoring" and "Memory Pre-Failure Notification" SMIs.
The OS is not aware of these interrupts, so the only way you might be able to notice them is by reading the CPU msr register.
Please make sure to carefully read your vendor BIOS tuning guide as the configuration options differ per vendor.
Disable cppc_cpufreq
rmmod cppc_cpufreq
The following table provides guidance for tuning XLIO parameters to reduce excessive CPU utilization. Please follow the recommendations below to adjust the XLIO behavior.
Issue | Recommended Tuning |
High CPU utilization caused by overly frequent CQ moderation |
|
Higher CPU utilization caused by faster TCP timer ticks |
|
higher CPU utilization observed in high-payload scenarios caused by excessive interrupt rates |
|