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

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

Open
grahamwhaley opened this issue Aug 10, 2017 · 5 comments
Open

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

grahamwhaley opened this issue Aug 10, 2017 · 5 comments

Comments

@grahamwhaley
Copy link
Contributor

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.

@jodh-intel
Copy link
Contributor

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

@grahamwhaley
Copy link
Contributor Author

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.)

@wcwxyz
Copy link
Contributor

wcwxyz commented Aug 10, 2017

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.

@grahamwhaley
Copy link
Contributor Author

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

@wcwxyz
Copy link
Contributor

wcwxyz commented Aug 11, 2017

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants