Tunning - shuwens/NetBricks GitHub Wiki

4.1. Reduce Context Switches

Use the isolcpus Linux kernel parameter to isolate them from Linux scheduler to reduce context switches. It prevents workloads of other processes than DPDK running on reserved cores with isolcpus parameter.

For Ubuntu 16.04, define isolcpus in /etc/default/grub.

GRUB_CMDLINE_LINUX_DEFAULT=“isolcpus=0-3,5,7”

The value of this isolcpus depends on your environment and usage. This example reserves six cores(0,1,2,3,5,7).

isolcpus

   [KNL,SMP] Isolate CPUs from the general scheduler.
                    The argument is a cpu list, as described above.

                    This option can be used to specify one or more CPUs
                    to isolate from the general SMP balancing and scheduling
                    algorithms. You can move a process onto or off an
                    "isolated" CPU via the CPU affinity syscalls or cpuset.
                    <cpu number> begins at 0 and the maximum value is
                    "number of CPUs in system - 1".

                    This option is the preferred way to isolate CPUs. The
                    alternative -- manually setting the CPU mask of all
                    tasks in the system -- can cause problems and
                    suboptimal load balancer performance.

irqaffinity

[SMP] Set the default irq affinity mask
                    The argument is a cpu list, as described above.

nohz && nohz_full

   nohz =           [KNL] Boottime enable/disable dynamic ticks
                    Valid arguments: on, off
                    Default: on

   nohz_full=      [KNL,BOOT]
                    The argument is a cpu list, as described above.
                    In kernels built with CONFIG_NO_HZ_FULL=y, set
                    the specified list of CPUs whose tick will be stopped
                    whenever possible. The boot CPU will be forced outside
                    the range to maintain the timekeeping.
                    The CPUs in this range must also be included in the
                    rcu_nocbs= set.

else

https://docs.windriver.com/bundle/Wind_River_Linux_Open_Virtualization_Features_Guide_LTS_19/page/lba1507756922111.html

https://community.mellanox.com/s/article/what-is-irq-affinity-x

⚠️ **GitHub.com Fallback** ⚠️