Dynamic CPU Isolation


jch

Recommended Posts

The desired behavior I'm looking for is to be able to isolate (as much as possible) host processes from a VM's cores dynamically. I'm aware of the `isolcpu` boot setting, but that's too rigid really doesn't play nicely with Docker containers. 

 

I've come across https://github.com/spheenik/vfio-isolate/tree/master which looks promising, but unfortunately doesn't quite seem to work. My understanding of cgroup is quite weak.

 

However, I've done some testing and it seems like `taskset -pc <CPUSET> <PID>` accomplishes what I'm looking for (i.e. it will schedule running tasks onto specific cores). I can fairly easily write a script that loops through all running processes and applies the correct cpuset isolation BUT I'm not familiar with how to ensure that _new_ processes are scheduled only on a specific cpuset for the duration of the VM's lifetime. It seems like cgroup is the right direction though, but the directory structure in unRAID's /sys/fs/cgroup/... doesn't seem to match what vfio-isolate is working for.

 

Does anybody know how to ensure that new processes are assigned to specific CPU cores by changing the "default" setup in /sys/fs/cgroup?

  • Upvote 1
Link to comment
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.