Hi,

I am currently trying to allocate different CPU cores to the *main-core*
and *corelist-workers* in a container automatically, while this can be done
manually it is a bit difficult to achieve when a container environment is
used because I don't know which specific CPU cores will be allocated
beforehand.

Example below is a kubernetes manifest:























*apiVersion: v1kind: Podmetadata:  name: test-memif-cni  annotations:
k8s.v1.cni.cncf.io/networks <http://k8s.v1.cni.cncf.io/networks>:
mem-if-n3-conf  labels:    env: testspec:  containers:  - name: vpp
image: ligato/vpp-base:22.06-release    imagePullPolicy: IfNotPresent
command: ["sleep"]    args: [ "infinity" ]    resources:      requests:
    cpu: "7"        memory: 4Gi        hugepages-1Gi: 1Gi          limits:
      cpu: "7"        memory: 4Gi      *
        hugepages-1Gi: 1Gi

7 CPU cores are requested, checking the POD, the following is the cpu set
that was allocated:


*root@test-memif-cni:/vpp# cat /sys/fs/cgroup/cpuset/cpuset.cpus0-3,18-20*

How can the first core (i.e. 0 in this case) be always used for the
main-core while the remaining cores should be used by the corelist-workers
(3,18-20) without having to configure this manually?

*N.B - Set of CPU cores that will be allocated is controlled by kubernetes
and can change, for instance it can be 1,4-10.*

Thanks

Christopher
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21654): https://lists.fd.io/g/vpp-dev/message/21654
Mute This Topic: https://lists.fd.io/mt/92371362/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to