Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.
This repository was archived by the owner on May 6, 2020. It is now read-only.

Implement --cpus mapped to QEMU -smp arguments #393

Open

Description

@grahamwhaley

We should map the docker run --cpus request do the QEMU VM command line -smp argument, as best we can.
It cannot be a 1:1 mapping, as --cpus takes a float argument, and implements partial CPU quotas using the CFS period and quota settings for instance.
A proposal is that we round up to the nearest whole CPU value, for the act of 'least surprise'.

Also see Issue #341 for more background and info, and how this relates in the future to the setup of POD cpu constraints.

Activity

  1. jodh-intel commented on Aug 10, 2017

    @jodh-intel

    Whatever we decide, we must also ensure https://github.com/clearcontainers/runtime/blob/master/docs/limitations.md gets updated with the details.

  2. grahamwhaley commented on Aug 10, 2017

    @grahamwhaley
    ContributorAuthor

    Ah, indeed, I meant to mention that - once we have implemented this we need to describe at least the non 1:1 mapping limitation on --cpus, and also probably call out more specifically the other things we don't support (quoata and slice things etc.)

  3. wcwxyz commented on Aug 10, 2017

    @wcwxyz
    Contributor

    I was thinking, maybe when --cpus 1.5 is requested, we should just fail instead of round up to 2. So user will not be confused or misled.

    How about we support --cpus int as the first step and fix --cpu float in the future if we have better idea how to handle it.

  4. grahamwhaley commented on Aug 10, 2017

    @grahamwhaley
    ContributorAuthor

    Yep, I'm happy with that as a first step @wcwxyz Better than no --cpus support at all :-)

  5. wcwxyz commented on Aug 11, 2017

    @wcwxyz
    Contributor

    I'd like to get #390 merged before I start working on this one. This docker --cpus CPU support is pretty like the docker -m MEMORY one. They can share the same design and code in some way.

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