Pining CPUS to docker and isolation


Recommended Posts

Well When I have a intensive task like 150mb/s write, or a parity check, my dockers are not responding. I found that by isolating core I do not have this issue (i7-7700). I was thinking that is I did not pin dockers to core, they would use full CPU...

 

THanks for your help !

  • Like 1
Link to comment
7 hours ago, yendi said:

Well When I have a intensive task like 150mb/s write, or a parity check, my dockers are not responding. I found that by isolating core I do not have this issue (i7-7700). I was thinking that is I did not pin dockers to core, they would use full CPU...

If your are running 6.7.x you could be hitting an issue a number of us have experienced.  When writing to the array, performance of docker, VMs, other writes goes down to the point they stop responding.. 
 

Rolling back to 6.6.7 gets everything working again..

Link to comment
1 hour ago, bytchslappa said:

If your are running 6.7.x you could be hitting an issue a number of us have experienced.  When writing to the array, performance of docker, VMs, other writes goes down to the point they stop responding.. 
 

Rolling back to 6.6.7 gets everything working again..

i think it's the issue i'm facing. I don't like to downgrade so I will wait for a fix. Thanks

Link to comment
  • 2 weeks later...
  • 8 months later...
5 minutes ago, Zotarios said:

This is still not clear for me. Spaceinvader's video shows that you can have unRAID OS pinned on the first core and use plex on the first and second, or more.

Isolating a core (Settings - CPU Pinning) means that unRaid AND docker containers will not use those cores at all.

 

Docker pinning means that a container(s) will only use those cores which are allocated to it.  BUT, those cores cannot also be isolated.

 

VM pinning - a VM will only use the cores allocated to it.  Generally used with isolation.

  • Like 1
  • Thanks 2
Link to comment
On 6/5/2020 at 8:08 AM, Squid said:

Isolating a core (Settings - CPU Pinning) means that unRaid AND docker containers will not use those cores at all.

 

Docker pinning means that a container(s) will only use those cores which are allocated to it.  BUT, those cores cannot also be isolated.

 

VM pinning - a VM will only use the cores allocated to it.  Generally used with isolation.

So i think i understand the above, but I have a question. lets say I have 8 cores and isolate 1 of them and then in a docker I pin the isolated core and 2 other cores, would that mean the docker is always going to have at least the 1 core, but would use the other 2 if available.

Link to comment
  • 8 months later...
3 hours ago, Sungray said:

So, please validate this. I'm running a dedicated game server in a docker container (Valheim). I want it to have exclusive access to one core, so I'm pinning it to the docker, and isolating the core right ?

Almost.  It'll run on core 0, but will not run on core 8. 

Link to comment

Right. It's a 3700x, so 8 cores/16 threads. This will give the docker full use of the physical core 0 ?

 

image.png.4247923c989bcb2e5fe76ee4338f1893.png

image.png.277a344fb64a650f6bbcf826c9d97f78.png

 

I suppose this will not work, since it won't have access to HT 8. The only solution seems to be to disable isolated cpu and enable pinning on 0 and 8, but then the system will be able to "steal" the cpu0/ht8. How should I approach this ?

 

Maybe it works different for docker comapred to VMs, and it's not a passthrough but rather a virtual core, and cpu/HT doesn't matter in this case, and I can only assign one CPU or HT if I want to give exclusive access. So yes isolate and pin 0, but the docker can't use two cores, only one ? Is that how you would approach this for a docker game server ?

Edited by Sungray
Link to comment

If you want a container to use multiple cores, then you can't pin it to the same isolated cores.  Sure the OS will possibly take some cycles on the cores, but since you're not running any VM, the hit would be minimal.  If you really want it to have more or less unhindered access to certain cores, then you pin it to those cores, and then pin every other container to all the cores except for those ones.

  • Like 1
Link to comment
  • 6 months later...
  • 1 year later...

Another resurrection. Sorry. 😅

Read the thread, but I do have one question. 

Let's say I have 2 VM's (one for the wife and one for myself) with shared cores (6C/6T). When I isolate the corresponding cores, will they be exclusive to Both of the VM's or just for one? 

Link to comment
On 1/4/2019 at 8:48 PM, Squid said:

To be honest,  I argued for when a core is isolated to not allow the GUI to let you select it for a container, as I knew that this question was going to happen over and over again. (which it has). 

 

The issue is that the HELP section of Core Isolation mentions VM AND Dockers and thats what makes this confusing.

I Isolated bunch of cores for VM and gave some of them to Dockers, but then community application said it will only use a SINGLE core if i give Dockers isolated cores.

So you see where the confusion is? The Core Isolation Help specifically mentions dockers.

 

Now after i know all of the above, i think the word Docker should be deleted from core isolation Help section.

Link to comment
On 1/10/2023 at 11:27 PM, XisoP said:

Another resurrection. Sorry. 😅

Read the thread, but I do have one question. 

Let's say I have 2 VM's (one for the wife and one for myself) with shared cores (6C/6T). When I isolate the corresponding cores, will they be exclusive to Both of the VM's or just for one? 

 

If you run both VMs at same time you better split the cores 50/50

Otherwise there is no point in core isolation since both use them.

Link to comment
7 hours ago, Hexenhammer said:

 

If you run both VMs at same time you better split the cores 50/50

Otherwise there is no point in core isolation since both use them.

That's not really an issue in my case. Yes, the VM's share the cores and are running in parallel but we actually don't use them at the same time.

Edited by XisoP
Link to comment
On 1/18/2023 at 9:44 AM, XisoP said:

That's not really an issue in my case. Yes, the VM's share the cores and are running in parallel but we actually don't use them at the same time.

well to replay your original answer, they wont be used by unRaid and plugins.

It will be "exclusive" for all running VMs, if you pin them

you need to both isolate and pin them in the VM settings

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.