You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/vpp/configuration/dataplane/cpu.rst
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
:lastproofread: 2025-09-04
1
+
:lastproofread: 2025-09-05
2
2
3
3
.. _vpp_config_dataplane_cpu:
4
4
@@ -12,18 +12,30 @@ VPP can utilize multiple CPU cores to enhance packet processing performance. Pro
12
12
13
13
There are several parameters that can be configured to optimize CPU usage for VPP.
14
14
15
+
.. important::
16
+
17
+
Please read carefully the system configuration settings page before making any changes to CPU settings: :doc:`system`.
18
+
19
+
If CPU settings are not configured, VPP will start a single main thread on core 1 (``main-core``), without any additional worker threads.
20
+
15
21
CPU Configuration Parameters
16
22
============================
17
23
18
-
main-core
19
-
^^^^^^^^^
24
+
Mandatory settings
25
+
------------------
20
26
21
-
The main core is responsible for handling control plane operations and managing worker threads. It should be set to a core that is not heavily utilized by other processes. If not set, VPP will automatically select a core `1`.
27
+
``main-core``
28
+
^^^^^^^^^^^^^
29
+
30
+
The main core is responsible for handling control plane operations, managing worker threads, and processing packets. It should be set to a core that is not heavily utilized by other processes. The option should be always set if you apply any other CPU settings.
22
31
23
32
.. cfgcmd:: set vpp settings cpu main-core <core-number>
24
33
25
-
corelist-workers
26
-
^^^^^^^^^^^^^^^^
34
+
Manual cores selection
35
+
----------------------
36
+
37
+
``corelist-workers``
38
+
^^^^^^^^^^^^^^^^^^^^
27
39
28
40
This parameter specifies the list of CPU cores that will be used as worker threads for packet processing.
29
41
@@ -36,17 +48,17 @@ Automatic cores selection
36
48
37
49
There is a possibility to let VPP select CPU cores automatically. This can be done by configuring the following two parameters:
38
50
39
-
skip-cores
40
-
^^^^^^^^^^
51
+
``skip-cores``
52
+
^^^^^^^^^^^^^^
41
53
42
54
This parameter allows you to specify number of first CPU cores that should be excluded from being used for main or worker threads. The main thread will be assigned to the first available core after the skipped ones, and worker threads will be assigned to subsequent cores.
43
55
44
56
.. cfgcmd:: set vpp settings cpu skip-cores <cores>
45
57
46
58
Exclude cores that are reserved for other critical system processes to ensure that VPP does not interfere with their operation.
47
59
48
-
workers
49
-
^^^^^^^
60
+
``workers``
61
+
^^^^^^^^^^^
50
62
51
63
This parameter allows you to specify the number of worker threads that should be created. Each worker thread will be assigned to a separate CPU core after the skipped and main ones.
Copy file name to clipboardExpand all lines: docs/vpp/configuration/dataplane/lcp.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,15 @@ Pay attention that disabling this option leads to loss of connectivity to destin
26
26
27
27
Other configuration section crucial for integration between VPP and Kernel is netlink settings. It allows to configure how VPP management listen to netlink events and how it processes them.
28
28
29
-
.. cfgcmd:: set vpp settings lcp batch-delay-ms <value>
29
+
.. cfgcmd:: set vpp settings lcp netlink batch-delay-ms <value>
30
30
31
31
This parameter specifies the delay in milliseconds between processing batch netlink messages. If you expect to get frequent and intensive netlink events, you may need to decrease this value to ensure that VPP processes netlink events in a timely manner.
32
32
33
-
.. cfgcmd:: set vpp settings lcp batch-size <value>
33
+
.. cfgcmd:: set vpp settings lcp netlink batch-size <value>
34
34
35
35
This parameter specifies the maximum number of netlink messages to process in a single batch. If you have a high volume of netlink events, increasing this value can improve throughput by allowing more messages to be processed at once. However, setting it too high may increase latency for individual messages.
36
36
37
-
.. cfgcmd:: set vpp settings lcp rx-buffer-size <value>
37
+
.. cfgcmd:: set vpp settings lcp netlink rx-buffer-size <value>
38
38
39
39
This parameter specifies the size of the receive buffer for netlink messages. Increasing this value can help accommodate bursts of netlink messages, but setting it too high may lead to increased memory usage.
Copy file name to clipboardExpand all lines: docs/vpp/configuration/dataplane/system.rst
+112Lines changed: 112 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,3 +52,115 @@ Both settings are automatically calculated based on configured hugepages.
52
52
Kernel Tuning
53
53
=============
54
54
55
+
VPP performance greatly benefits from proper kernel tuning, especially CPU isolation and disabling unnecessary kernel features. These optimizations ensure dedicated CPU cores are available exclusively for VPP dataplane processing without interference from the kernel scheduler or other system processes.
56
+
57
+
.. warning::
58
+
59
+
Kernel tuning changes require a system reboot to take effect.
60
+
61
+
Improper CPU isolation can lead to system instability if essential system processes are starved of CPU resources.
62
+
63
+
CPU Isolation and Optimization
64
+
-------------------------------
65
+
66
+
CPU isolation is crucial for VPP performance as it dedicates specific CPU cores exclusively to VPP dataplane processing. The isolated cores are removed from the kernel scheduler and will not run regular system processes.
67
+
68
+
**Disable NMI Watchdog**
69
+
70
+
The NMI (Non-Maskable Interrupt) watchdog can interfere with VPP performance by generating interrupts on isolated cores and is not compatible with nohz-full mode:
71
+
72
+
.. cfgcmd:: set system option kernel cpu disable-nmi-watchdog
73
+
74
+
Disables the NMI watchdog for detecting hard CPU lockups. This prevents unnecessary interrupts on VPP worker cores.
75
+
76
+
**CPU Core Isolation**
77
+
78
+
.. cfgcmd:: set system option kernel cpu isolate-cpus <cpu-range>
79
+
80
+
Isolates specified CPUs from the kernel scheduler. Isolated cores will not run regular system processes and are dedicated to applications like VPP.
81
+
82
+
The ``<cpu-range>`` can be:
83
+
84
+
* Single core: ``2``
85
+
* Range: ``2-5``
86
+
* Mixed: ``1,3-5,7``
87
+
88
+
..important::
89
+
90
+
Always reserve at least 1-2 cores for the operating system to ensure system stability. For example, on a 4-core system, isolate cores 2-3 for VPP and leave cores 0-1 for the OS.
91
+
92
+
Assign the first isolated core as the VPP main core and the remaining isolated cores as VPP worker cores. Ensure that VPP CPU assignments match the isolated CPU range.
93
+
94
+
**Adaptive-Tick Mode**
95
+
96
+
.. cfgcmd:: set system option kernel cpu nohz-full <cpu-range>
97
+
98
+
Enables adaptive-tick mode (NO_HZ_FULL) for specified CPUs. This causes the kernel to avoid sending scheduling-clock interrupts to CPUs that have only one runnable task, significantly reducing interrupt overhead for dedicated workloads like VPP.
99
+
100
+
Use the same CPU range as configured for ``isolate-cpus``.
101
+
102
+
**RCU Callback Offloading**
103
+
104
+
.. cfgcmd:: set system option kernel cpu rcu-no-cbs <cpu-range>
105
+
106
+
Offloads Read-Copy-Update (RCU) callback processing from specified CPUs. This ensures that RCU callbacks do not prevent the specified CPUs from entering dyntick-idle or adaptive-tick mode, which is essential for nohz-full functionality.
107
+
108
+
Use the same CPU range as configured for ``isolate-cpus``.
109
+
110
+
System Optimization
111
+
--------------------
112
+
113
+
Additional kernel optimizations can further improve VPP performance by disabling unnecessary features and reducing system overhead.
114
+
115
+
**Disable High Precision Event Timer**
116
+
117
+
.. cfgcmd:: set system option kernel disable-hpet
118
+
119
+
Disables the High Precision Event Timer (HPET). HPET can cause additional interrupts and overhead that may impact VPP performance.
120
+
121
+
**Disable Machine Check Exceptions**
122
+
123
+
.. cfgcmd:: set system option kernel disable-mce
124
+
125
+
Disables Machine Check Exception (MCE) reporting and handling. While MCE provides hardware error detection, it can introduce latency in high-performance scenarios.
126
+
127
+
**Disable CPU Power Saving**
128
+
129
+
.. cfgcmd:: set system option kernel disable-power-saving
130
+
131
+
Disables CPU power saving mechanisms (C-states). This keeps CPU cores at maximum performance levels, eliminating latency from power state transitions.
132
+
133
+
**Disable Soft Lockup Detection**
134
+
135
+
.. cfgcmd:: set system option kernel disable-softlockup
136
+
137
+
Disables the soft lockup detector for kernel threads. This prevents false positives when VPP worker threads are busy processing packets.
138
+
139
+
**Disable CPU Mitigations**
140
+
141
+
.. cfgcmd:: set system option kernel disable-mitigations
142
+
143
+
Disables all optional CPU mitigations for security vulnerabilities (e.g., Spectre, Meltdown). This may improve performance on some platforms.
144
+
145
+
Optimal Configuration Example
146
+
-----------------------------
147
+
148
+
For a system with 4 CPU cores (0-3) where cores 2-3 are dedicated to VPP:
0 commit comments