From 70d93625e886a45c9afe2aa748228c39c5897e22 Mon Sep 17 00:00:00 2001 From: "Reddy, Hemachandra (hr858f)" Date: Mon, 20 Jan 2020 19:05:05 +0000 Subject: [PATCH] Do not set CPU resources to ovs-vswitch DPDK pod When DPDK is enbaled, configuring CPU resource limits through Kubernetes affects packet throughput adversely. DPDK PMD cores could not get 100% busy. They need to be configured by isolating them in host grub and later through PMD core mask. Change-Id: Ia80880302b9c5c02fdb1c00cb62f6640860e898e --- openvswitch/templates/daemonset-ovs-vswitchd.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openvswitch/templates/daemonset-ovs-vswitchd.yaml b/openvswitch/templates/daemonset-ovs-vswitchd.yaml index 598dbae13..e47f1b152 100644 --- a/openvswitch/templates/daemonset-ovs-vswitchd.yaml +++ b/openvswitch/templates/daemonset-ovs-vswitchd.yaml @@ -94,15 +94,15 @@ spec: {{/* Run the container in priviledged mode due to the need for root permissions when using the uio_pci_generic driver. */}} {{- $_ := set $envAll.Values.pod.security_context.openvswitch_vswitchd.container.vswitchd "privileged" true -}} +{{/* Limiting CPU cores would severely affect packet throughput +It should be handled through lcore and pmd core masks. */}} +{{- if .Values.pod.resources.enabled }} +{{ $_ := unset $envAll.Values.pod.resources.ovs.vswitchd.requests "cpu" }} +{{ $_ := unset $envAll.Values.pod.resources.ovs.vswitchd.limits "cpu" }} +{{- end }} {{- end }} {{ tuple $envAll "openvswitch_vswitchd" | include "helm-toolkit.snippets.image" | indent 10 }} {{ dict "envAll" $envAll "application" "openvswitch_vswitchd" "container" "vswitchd" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} -{{- if .Values.conf.ovs_dpdk.enabled }} -{{/* When running with DPDK, we need to specify the type and amount of hugepages. -The following line enables resource handling in general, but the type and amount -of hugepages must still be defined in the values.yaml.*/}} -{{ $_ := set $envAll.Values.pod.resources "enabled" true }} -{{- end }} {{ tuple $envAll $envAll.Values.pod.resources.ovs.vswitchd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} # ensures this container can speak to the ovs database # successfully before its marked as ready