Configure resource usage
You can configure the resource usage of Fast Path Provider (FPP).
Memory configuration
For the most common cases, allocate the following resources to FPP node pods:
For FPP 1.0, use 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 pods use the Guaranteed QoS class, where requests are the same as the limits. As a result, FPP reads the cpuset cgroup configuration and assigns cores to the Vector Packet Processing (VPP) process through startup.conf. To check the cores of the VPP process, run the following command in the VPP switch pod:
The output shows the CPU cores that FPP pins for the VPP process:
The output shows that FPP pins the VPP main thread to core 27 (main-core 27). Without main-core, VPP uses the first available core. The line corelist-workers 28,29,30,31 means VPP automatically assigns those CPU cores to worker threads.
Max CPU cores
Another approach to VPP CPU allocation is to use vpp.maxCPUCores without the isolcpus kernel parameter. As in a regular FPP deployment, FPP pods use the Guaranteed QoS class, so Kubernetes CPU Manager gives them a dedicated cpuset. Assign the FPP pod more CPU than VPP uses, for example, 14:
In this case, the FPP pod gets seven physical cores, and VPP uses five of them. To check the cores of the pod, run the following command in the FPP pod:
See the output example:
This output lists the CPU cores that the Kubernetes CPU Manager assigns to the FPP pod. In this case, the pod has cores 1–7 and 49–55. VPP uses five of these cores, as vpp.maxCPUCores: "5" sets.
The resulting startup.conf file contains the following CPU section:
The Linux scheduler uses cores 6 and 7 for processes other than VPP. The most important of them are the kernel threads that serve TAP interfaces (vhost-<PID>).
Hyper-threading siblings
spec.vpp.allowHtSiblings sets how much CPU one VPP thread takes. With the default false, a thread takes a whole physical core, which is two logical CPUs on a host with hyper-threading. With true, a thread takes a single sibling, so the same spec.resources.cpu gives twice as many threads. The field exists on both FPPDeployment and CGWDeployment.
Thread 0 is the VPP main thread. The main thread forwards traffic only when it is the only thread. When at least one worker thread exists, the worker threads forward the traffic.
The following table lists the threads that each allocation gives on a host with two siblings per physical core:
Important
The schema marks spec.vpp.allowHtSiblings for testing purposes only. Set it to true only in test environments.
The following snippet sets spec.vpp.allowHtSiblings to true and gives VPP five threads on 2.5 physical cores:
A thread on a sibling forwards less than a thread on a whole physical core. A physical core with two threads forwards more than a physical core with one thread. Performance lists both figures, for the memif (in-memory interface) path and for the single root I/O virtualization (SR-IOV) uplink. These results cover throughput only, not latency.
Verification
To verify that FPP applies the resource configuration correctly, check DaemonSet or StatefulSet on the target Core Cluster. FPPDeployment creates a DaemonSet, while CGWDeployment creates a StatefulSet. See deployment modes for more details.
Check resource requests and limits on
FPPDeploymentpods:bashSample output:
textFor
CGWDeployment, check the resources using the value of spec.releaseName as{CGW_RELEASE_NAME}in akubectlquery (by defaultcgw-instance):bashSample output:
text