Sunday, July 13, 2008

cgroup: block device i/o bandwidth controller

I've posted to the LKML ([1], [2], [3], [4]) the latest version of my patch to provide I/O bandwidth controlling for Linux cgroups. The objective of this patch is to improve I/O performance predictability of different cgroups sharing the same block devices.

Some advantages of providing this feature:
  • Allow I/O traffic shaping for block device shared among different cgroups
  • I/O performance predictability allows to better satisfy timing requirements for real-time applications
  • Limiting rules do not depend of the particular I/O scheduler (anticipatory, deadline, CFQ, noop) and/or the type of the underlying block devices
  • The bandwidth limitations are guaranteed both for synchronous and asynchronous operations, even the I/O passing through the page cache or buffers and not only direct I/O
  • It is possible to implement a simple user-space application to dynamically adjust the I/O workload of different process containers at run-time, according to the particular users' requirements and applications' performance constraints
  • It is even possible to implement event-based performance throttling mechanisms; for example the same user-space application could actively throttle the I/O bandwidth to reduce power consumption when the battery of a mobile device is running low (power throttling) or when the temperature of a hardware component is too high (thermal throttling)