LWN.net Logo

Conflicting goals?

Conflicting goals?

Posted Nov 15, 2012 20:01 UTC (Thu) by glommer (subscriber, #15592)
In reply to: Conflicting goals? by Jonno
Parent article: LCE: The failure of operating systems and how we can fix it

Your description is precise and correct.

However, there are many scenarios where you actually want to limit the maximum amount of cpu used, even without contention. An example of this, is cloud deployments where you pay for cpu time and value price predictability over performance.

The cpu cgroup *also* allows one to set a maximum quota through the combination of the following knobs:

cpu.cfs_quota_us
cpu.cfs_period_us

If you define your quota as 50 % of your period, you will run for at most 50 % of the time. This is bandwidth based, in units of microseconds. So "use at most 2 cpus" is equivalent to 200 %. IOW, 2 seconds per second.
This is defaulted to -1, meaning "no upcap"

Equivalent mechanism exists for rt tasks: cpu.rt_quota_us, etc.

Cheers


(Log in to post comments)

Conflicting goals?

Posted Nov 19, 2012 3:14 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

How does/would the 200% percentage work with big.LITTLE?

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds