Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Support host config cpus #959

Open
Open

Description

@liuqiyuan

Description

Support host config --cpus=<value>

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.

Activity

  1. davidxia commented on Jan 13, 2018

    @davidxia
    Contributor

    @liuqiyuan Thanks for reporting. PRs are welcome :)

  2. stale commented on Sep 24, 2018

    @stale

    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.

  3. rwmajor2 commented on Dec 12, 2018

    @rwmajor2

    @liuqiyuan Can someone please merge this request? Why hasn't this been incorporated?

  4. davidxia commented on Dec 12, 2018

    @davidxia
    Contributor

    @rwmajor2 We can't merge this bc #1034 isn't finished. If you want to pick it up, we can review it.

  5. rwmajor2 commented on Dec 12, 2018

    @rwmajor2

    @davidxia What's not finished with it? Just curious.

  6. davidxia commented on Dec 12, 2018

    @davidxia
    Contributor

    @rwmajor2 If someone can rebase it, answer my question in that PR, and test that it actually works, I'm happy to merge it.

  7. laureled commented on Jan 19, 2019

    @laureled

    @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?

  8. davidxia commented on Jan 21, 2019

    @davidxia
    Contributor

    @laureled Whatever's easier for you :)

  9. laureled commented on Jun 5, 2019

    @laureled

    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.

  10. dmandalidis commented on Oct 1, 2019

    @dmandalidis
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions