You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
I know we have workaround, but it will be good to have --cpus.
set --cpus="1.5", the container will be guaranteed to be able to access at most one and a half of the CPUs. This is the equivalent of setting --cpu-period="100000" and --cpu-quota="150000". Available in Docker 1.13 and higher.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I was able to accomplish this with cpuPeriod and cpuQuota. --cpus doesn't seem to exist in the Docker API. It seems to be a convenience option in the Docker CLI for setting period and quota. I was able to confirm this by creating a container with --cpus and inspecting it. Perhaps someone wants to double-confirm with the Docker source code. I think issues here relating to the --cpus option can be closed.
Activity
davidxia commentedon Jan 13, 2018
@liuqiyuan Thanks for reporting. PRs are welcome :)
stale commentedon Sep 24, 2018
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
rwmajor2 commentedon Dec 12, 2018
@liuqiyuan Can someone please merge this request? Why hasn't this been incorporated?
davidxia commentedon Dec 12, 2018
@rwmajor2 We can't merge this bc #1034 isn't finished. If you want to pick it up, we can review it.
rwmajor2 commentedon Dec 12, 2018
@davidxia What's not finished with it? Just curious.
davidxia commentedon Dec 12, 2018
@rwmajor2 If someone can rebase it, answer my question in that PR, and test that it actually works, I'm happy to merge it.
laureled commentedon Jan 19, 2019
@davidxia I may be interested in picking this up. The field name in the PR seems incorrect. Should I update the PR or make a new one?
davidxia commentedon Jan 21, 2019
@laureled Whatever's easier for you :)
laureled commentedon Jun 5, 2019
I was able to accomplish this with cpuPeriod and cpuQuota. --cpus doesn't seem to exist in the Docker API. It seems to be a convenience option in the Docker CLI for setting period and quota. I was able to confirm this by creating a container with --cpus and inspecting it. Perhaps someone wants to double-confirm with the Docker source code. I think issues here relating to the --cpus option can be closed.
dmandalidis commentedon Oct 1, 2019
Hi @laureled ,
Since this project went on mature status, please re-open this issue (if it still stands) to https://github.com/dmandalidis/docker-client. Thanks