The following configuration options are applicable to RHEL8 systems.
First, set some configuration options that decrease latency for Onload acceleration technologies. On both machines:
- Add the following options to the kernel configuration line in /boot/grub/grub.conf:
isolcpus=<comma separated cpu list> nohz=off iommu=off intel_iommu=off mce=ignore_ce nmi_watchdog=0 - Stop the following services on the server:
systemctl stop cpupower systemctl stop irqbalance systemctl stop firewalld - Allocate huge pages. For example, to configure 1024 huge pages:
# sysctl -w vm.nr_hugepages=1024To make this change persistent, update /etc/sysctl.conf. For example:
# echo "vm.nr_hugepages = 1024" >> /etc/sysctl.confFor more information refer to Allocating Huge Pages.
- Consider the selection of the NUMA node, as this affects latency on a NUMA-aware system. Refer to Onload Deployment on NUMA Systems.
- Disable interrupt moderation.
# ethtool -C <interface> rx-usecs 0 adaptive-rx off
Now perform the following configuration to improve latency without Onload.
Note: These configuration changes have minimal effect on the performance of Onload.
- Set interrupt affinity such that interrupts and the application are running on different CPU cores but on the same processor package.
- Use the following command to identify the interrupts used by the receive queues
created for an interface:
# cat /proc/interrupts | grep <interface>The output lists the IRQs. For example:
46: 75744 68481 60581 90520 PCI-MSI 524288-edge enp1s0f0np0-rx-0 48: 77959 109946 51941 55480 PCI-MSI 524289-edge enp1s0f0np0-rx-1 50: 68880 70980 90226 65240 PCI-MSI 524290-edge enp1s0f0np0-rx-2 52: 117159 96120 47240 34807 PCI-MSI 524291-edge enp1s0f0np0-rx-3 54: 0 0 0 0 PCI-MSI 524292-edge enp1s0f0np0-tx-4 - Direct the listed IRQs to unused CPU cores that are on the same processor
package as the application. For example, to direct the IRQs in the previous example to CPU core 2
(where cores are numbered from 0 upwards), using
bash:# for irq in {46..54..2} > do > echo 04 > /proc/irq/$irq/smp_affinity > done
- Use the following command to identify the interrupts used by the receive queues
created for an interface:
- Set an appropriate tuned profile:
- The tuned network-latency profile produces better kernel latency results:
# tuned-adm profile network-latency - If available, the cpu-partitioning profile includes the network-latency profile, but also makes it easy to isolate cores that can be dedicated to interrupt handling or to an application. For example, to isolate cores 1-3:
# echo "isolated_cores=1-3" \ > /etc/tuned/cpu-partitioning-variables.conf # tuned-adm profile cpu-partitioning
- The tuned network-latency profile produces better kernel latency results:
- Enable the kernel “busy poll” feature to disable interrupts and allow polling of the socket receive queue. The following values are recommended:
# sysctl net.core.busy_poll=50 && sysctl net.core.busy_read=50