Pining CPUS to docker and isolation


footballmad

40 posts in this topic Last Reply

Recommended Posts

Depending on what you're trying to accomplish personally I don't see the point in pinning docker to any given cores, and would rather prioritize one over the other so that any given container can use what it wants unless the priority container wants them

Sent from my NSA monitored device

Link to post

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 !

Link to post
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 post
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 post
  • 2 weeks later...
  • 8 months later...

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.

 

 

Edited by Zotarios
Deleted redundant image
Link to post
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.

Link to post
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 post

Pinning a container to to an isolated core AND non isolated cores would either mean that the container would only execute on either the non isolated OR the isolated.   Not both.

Link to post
  • 8 months later...

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 ?

 

image.png.99f6f3f3deab0f2ffb32b9c3c30f69ea.png

image.png.67a7fd28cb45a5335afce2cf274e406e.png

Link to post
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 post

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 post

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.

Link to post

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.