dotcloud/docker — pull request #5381 by rjnagal (2014-04-24 15:02:43+00:00)
Title: Add support for cpu hardcapping to cgroups.

Initial support for adding cpu hardcapping to cgroups. This PR just changes the cgroups library and adds the ability to set both period and quota for throttling cpu usage.

For exposing the feature to users, we can add a single knob - CpuHardcapLimit - instead of quota and period cgroup internals. A limit of 1.5 would hardcap the container to 1.5 cpu worth of usage over all available cpus (or 1500 milli-cpus if you don't like floats). We can use a default period of 100ms (default on most images). Maybe add a flag to configure default period.

Docker-DCO-1.1-Signed-off-by: Rohit Jnagal (github: rjnagal)