Comments (11)
@przemeklal @phillyb7 The problem is conflict of isolcpu and taskset. I change to use systemd-Cpuaffinity then taskset and your code work well. Thanks
from cpu-manager-for-kubernetes.
Since most of the applications that consume the the ENV VARs do so through a script, would it be possible to convert the CPU IDs to a mask within such a script?
from cpu-manager-for-kubernetes.
Manipulations with bits are gentle in python, and not so nice in script. Besides it is common practice to put mask of cpus near list of cpus.
For example in /sys/devices/system/node/node0
cpulist and cpumask
from cpu-manager-for-kubernetes.
Hi @LilyaBu @lmdaly did you success using ENV_CPUS_ASSIGNED_MASK, I have problem with it like bellow:
I want to isolate a task into 4 thread 2,38,3,39
The ENV_CPUS_ASSIGNED_MASK run to C00000000C, it True
But when I using top 1 only CPU2 has 100% and notthing run into Cpu 3 38 39
Do you have any idea about this. Thanks
from cpu-manager-for-kubernetes.
Hi @anvien0111, thanks for using CMK.
Most likely your application doesn't use all allocated cores - this may happen if this is some kind of DPDK based application and there's only one packet polling thread there because e.g. there's only one network interface/port handled in that application, or the application has some extra args for pairing interfaces/CPUs. CMK only allocates the cores, it's up to the application to actually use them.
from cpu-manager-for-kubernetes.
Hi @przemeklal. Thanks for your answer, I have figure out I have problem with PythonLib psutil in here:
https://github.com/intel/CPU-Manager-for-Kubernetes/blob/master/intel/isolate.py#116
when I set isolcpus=2-17,38-53 in boot/grup.cfg then using psutil.Process().cpu_affinity([2,3,4,5])
It not work, the process only bind into core 2 not all 4 core.
If I remove isolcpu in boot/grub file It work well 100%CPU in all core 2,3,4,5
Do you have any idea about that or I need to set special config to my Pod to make it work.
Thanks
from cpu-manager-for-kubernetes.
@przemeklal when I set isolcpus=2-17,38-53 these Cpus would'nt show in command
print(psutil.Process().cpu_affinity()). Is this make some problem when I want to affinity more than 1 core into 1 process??
from cpu-manager-for-kubernetes.
Interesting findings. As a workaround you can add --no-affinity argument to cmk isolate
and wrap your application command with taskset
instead (passing either CPU list or the mask) and see if that works.
@phillyb7 - I'm tagging you here as it may be a valid bug
from cpu-manager-for-kubernetes.
@przemeklal @phillyb7 Sorry but I test taskset not work too. Because when I set isolcpus=2-17, 38-53 then I cannot use taskset to bind multi cores in this range to one tasks.
https://serverfault.com/questions/573025/taskset-not-working-over-a-range-of-cores-in-isolcpus
Thanks
from cpu-manager-for-kubernetes.
@przemeklal @phillyb7 I check my docker info and kubelet is using 'Cgroup Driver: systemd'
Do I need to change this setting to cgroupfs to make taskset work in Pod?
from cpu-manager-for-kubernetes.
@lamto20132223 great! And thanks for letting us now about the solution :)
from cpu-manager-for-kubernetes.
Related Issues (20)
- Only one node picked up by cluster-init which also fails with Forbidden Error HOT 1
- Cannot build CMK Docker image
- Issue about using hyper-thread in exclusive mode HOT 4
- Pin CPU for Pod on K8s
- INTERNAL ERROR: cannot create temporary directory! HOT 2
- can not run on the ARM v8 CPUs
- operator.md incorrectly states to set --insecure to false to revert back to regular TLS
- CMK Helm Chart Guidelines HOT 1
- CMK Configmap is hard to manage HOT 13
- CMK on Cluster Multi Node environment HOT 5
- CMK Isolation on different NUMA nodes HOT 6
- CMK crashes on Intel® Xeon® Processor E5-2690 HOT 1
- Error getting cmk-config-<node-name> Configmap HOT 2
- cmk-cluster-init-pod failed with CreateContainerConfigError HOT 3
- CMK reconfiguration function errors
- keyerror observed while running isolate command HOT 3
- Processes in shared pool not actually sharing the cores
- CMK resources are not showing after upgrading k8s
- Different pools for different containers
- CPU isolation from host daemons without isolcpus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpu-manager-for-kubernetes.