how does cpu pinning/isolation work


Recommended Posts

Hey guys!
 

I have a question about how CPU pinning and isolation work. Is it right that when you pin a thread that it will just use that thread. And with CPU isolation that it will not use that thread? 

The reason I'm asking this is because that I always thought that it was the same thing.

Link to comment

@brainbudt , @sbo365web

 

If you switch on the help in the GUI on the isolation page, you will find this;
 

Quote

 

CPU isolation allows the user to specify CPU cores that are to be explicitly reserved for assignment (to VMs or Docker containers).

This is incredibly important for gaming VMs to run smoothly because even if you manually pin your Docker containers to not overlap with your gaming VM, the host OS can still utilize those same cores as the guest VM needs for things like returning responses for the webGui, running a parity check, btrfs operations, etc.

 

 

 

So, when you pin a core to a VM or Docker, that core is allocated to the VM/Docker, but the unRAID OS may still access it and use it for various tasks.

 

When you isolate a core, it is no longer accessible even by unRaid for routine tasks and should therefore be 100% dedicated to wherever it's pinned.

 

You can pin cores without requiring a system restart. You must restart your unRaid server to effect any isolation changes.

 

 

 

 

Edited by meep
emphasis and @
  • Like 1
  • Thanks 1
Link to comment
5 hours ago, meep said:

@brainbudt , @sbo365web

 

If you switch on the help in the GUI on the isolation page, you will find this;
 

 

 

So, when you pin a core to a VM or Docker, that core is allocated to the VM/Docker, but the unRAID OS may still access it and use it for various tasks.

 

When you isolate a core, it is no longer accessible even by unRaid for routine tasks and should therefore be 100% dedicated to wherever it's pinned.

 

You can pin cores without requiring a system restart. You must restart your unRaid server to effect any isolation changes.

 

 

 

 

Thanks!
Would it be okay when you give the OS 2-4 thread and would there be any negatives in the file transfer speed with going to low?

Link to comment
1 hour ago, brainbudt said:

Thanks!
Would it be okay when you give the OS 2-4 thread and would there be any negatives in the file transfer speed with going to low?

 

That should be fine. I believe the recommendations are to give unRaid at least core 0, and alway include core 0 as there is some benefit in that (i'm not sure what).

 

Remember, the above guidance is specifically around isolating cores for high performance VMs such as gaming. If you have a few dokers that are not computationally intensive, you can pin non-isolated cores to them, leaving a bit of headroom for unRaid to take as needed.

 

Also, you don't need to isolate ALL the cores assigned to a VM. You can, say, assign 4x threads to a VM, but only isolate 2 of them. The VM then has two dedicated threads form its exclusive use and two others that may or may not have other tasks assigned.

 

There's also a TON of esoteric analysis on here about performance benefits of assigning specific threads / cores to VMs based on how the CPU is constructed etc. Its as bit over my head, but some peeps seem to have eeked out a bit more horsepower by paying close attention to how core assignment is managed. based on CPU architecture.

  • Thanks 1
Link to comment

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.