Docker Hardware Allocation


Recommended Posts

Hello

 

Is it possible to set allocated hardware resources to a docker container, extra cores ram etc or will it just take the resources it needs ?

 

Kind Regards

 

Ryan

You can limit everything.  Cores, memory, etc.

 

To limit cores add to extra parameters:

 

--cpuset-cpus=0

 

to limit memory

 

--memory=4G

 

Additionally you can prioritize one docker app's cpu resources over another.  Google docker run for a complete breakdown of everything possible.

 

Personally, I think its in everyone's best interests to limit the resources of every app with the exception of Plex

  • Like 1
Link to comment

Additionally you can prioritize one docker app's cpu resources over another.  Google docker run for a complete breakdown of everything possible.

I read the docker run reference but still can't figure out how to priority one docker cpu over another. Please can you share how.

 

Is it the --cpu-shares?

 

Just based on the information provided on the reference, I set Handbrake to 128, Plex to 8192 and the rest to 1024.

Link to comment

Additionally you can prioritize one docker app's cpu resources over another.  Google docker run for a complete breakdown of everything possible.

I read the docker run reference but still can't figure out how to priority one docker cpu over another. Please can you share how.

 

Is it the --cpu-shares?

 

Just based on the information provided on the reference, I set Handbrake to 128, Plex to 8192 and the rest to 1024.

Iirc everything is based upon 1024.  Or setting 2 containers to 512 will each allow them to max out at 50% if they both want to run full bore.  If only one wants to run full bore it will max out at 100%  there is no way to prioritize or set a max cpu usage for a container. 

 

Things get more complicated using 3 or more containers but the concept is the same

 

Sent from my LG-D852 using Tapatalk

 

 

Link to comment
  • 3 years 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.