cpu models as millisecond per second

49 views
Skip to first unread message

Chris Burroughs

unread,
Jun 23, 2014, 2:22:07 PM6/23/14
to lmc...@googlegroups.com
In CpuSpec users need to specify a limit (amount of CPU requested) and
max_limit (point after which throttling occurs). Both of these are
measured in milliseconds per second. Currently limit maps to cpu.shares
and max_limit to cpu.cfs_period_us/cpu.cfs_quota_us.

I'm curious why milliseconds per second was chosen as the abstract model
instead of abstract cpu shares (such as docker or mesos use). I would
guess due to loss aversion people would be inclined to ask for more
millis (don't take time from my code!) than they would for shares for
cpu resources (this is how much I can afford).

Victor Marmol

unread,
Jun 23, 2014, 2:30:37 PM6/23/14
to Chris Burroughs, lmc...@googlegroups.com
The primary reason was for simplicity since it is much easier to reason about number of cores rather than shares of a resource (which depends on availability, machine size, and usage of that resource). However, it is true that it only makes sense if we don't over-allocate cores (which we think is true and makes sense, overcommitting can be done, but it requires an agent to manage it).


On Mon, Jun 23, 2014 at 11:22 AM, Chris Burroughs <chris.b...@gmail.com> wrote:
In CpuSpec users need to specify a limit (amount of CPU requested) and max_limit (point after which throttling occurs).  Both of these are measured in milliseconds per second.  Currently limit maps to cpu.shares and max_limit to cpu.cfs_period_us/cpu.cfs_quota_us.

I'm curious why milliseconds per second was chosen as the abstract model instead of abstract cpu shares (such as docker or mesos use).  I would guess due to loss aversion people would be inclined to ask for more millis (don't take time from my code!) than they would for shares for cpu resources (this is how much I can afford).


--
You received this message because you are subscribed to the Google Groups "lmctfy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lmctfy+unsubscribe@googlegroups.com.
To post to this group, send email to lmc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmctfy/53A8704E.8080301%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages