converged-edge-experience-kits
converged-edge-experience-kits copied to clipboard
Using CMK to pin cores..
Hi,
For this example pod spec, is this the right way to ensure the container gets the desired cores ?, the documentation says the cmk argument should be deployed_app, what does that mean ?, the other examples show using 'sleep', so would this be the root process and other processes can now use the resources reserved for the sleep process ?
apiVersion: v1 kind: Pod metadata: labels: app: nginx name: nginx annotations: k8s.v1.cni.cncf.io/networks: sriov-openness spec: nodeName: opennesswkn-1 containers:
- args:
- "/opt/bin/cmk isolate --conf-dir=/etc/cmk --pool=exclusive sleep inf" command:
- "bash"
- "-c" image: nginx #command:
- sleep
- "3600"
env:- name: CMK_PROC_FS value: "/host/proc" imagePullPolicy: IfNotPresent name: nginx resources: requests: memory: 4Gi hugepages-1Gi: 4Gi cmk.intel.com/exclusive-cores: 1 intel.com/intel_sriov_netdevice: '1' intel.com/intel_fec_5g: '1' limits: hugepages-1Gi: 4Gi memory: 4Gi cmk.intel.com/exclusive-cores: 1 intel.com/intel_sriov_netdevice: '1' intel.com/intel_fec_5g: '1' restartPolicy: Never
This is from your documentation:cat <<EOF | kubectl create -f - apiVersion: v1 kind: Pod metadata: labels: app: cmk-isolate-DEPLOYED-APP-pod name: cmk-isolate-DEPLOYED-APP-pod spec: nodeName: <NODENAME> containers:
- args:
- "/opt/bin/cmk isolate --conf-dir=/etc/cmk --pool=exclusive DEPLOYED-APP" command:
- "/bin/bash"
- "-c" env:
- name: CMK_PROC_FS value: "/host/proc" image: DEPLOYED-APP-IMG:latest imagePullPolicy: "Never" name: cmk-DEPLOYED-APP resources: limits: cmk.intel.com/exclusive-cores: 1 requests: cmk.intel.com/exclusive-cores: 1 restartPolicy: Never EOF