Configuration
After deploying Fast Path Provider (FPP), you can further configure the resource usage.
Memory configuration
It is advised to have the following resources allocated for VPPSwitch pods for the most common cases:
The FPP 1.0 version is recommended to have the following settings:
CPU pinning
By default, FPP relies on Kubernetes CPU ManagerOpens in a new tab running in the static mode. In this mode, FPP Manager pods use Guaranteed QoS where requests are the same as the limits. As a result, the cpuset cgroup configuration is used to assign cores to the VPP process through startup.conf. You can check the cores assigned to the VPP processes in VPP switch pods using the following command:
Static CPU cores
It is possible to preallocate dedicated cores to VPP processes, excluding them from being used by any other process on the node. To do so:
Specify a subset of cores in the
isolcpuskernel parameter (for example in/etc/default/grub):shAfter adjusting the grub settings, run
grub-mkconfig -o /boot/grub/grub.cfgand reboot the host. To check if the setting is configured on node, run:bashThe cores must be specified together with their HyperThreading (HT) siblings in case HyperThreading is enabled on the system. To check the HT siblings, run:
bash(
hwlocpackage) or by looking at/sys/devices/system/cpu/cpu*/topology/thread_siblings_listfor each of the CPU cores to be used.After configuration done on node level, the cores can be specified through
vpp.staticCPUCoresinvalues.yaml, but note that from each HT sibling pair, just one core can be specified:yaml
It's possible to verify whether the desired cores are actually assigned to the VPP process by checking startup.conf inside FPP pod and also e.g. by adding PROCESSOR column in htop on node.
Max CPU cores
Another approach to VPP CPU allocation is to use vpp.maxCPUCores without isolcpus kernel parameter. In this case, like in normal FPP deployment, Guaranteed QoS class is used for FPP pods so that Kubernetes CPU Manager provides it with a dedicated cpuset. In this case FPP pod needs to be assigned more CPU than used for VPP itself, for example 14:
In this case, FPP pod will have 7 physical cores assigned, but only 5 of them will be used for VPP.
Resulting startup.conf:
Cores 6 and 7 will be used by the Linux scheduler to run other processes than VPP, most importantly, kernel threads that are created to serve TAP interfaces (vhost-<PID>).