Re: [RFC][PATCH] per-task I/O throttling

From: Andrea Righi
Date: Fri Jan 11 2008 - 11:33:18 EST


Balbir Singh wrote:
> On Jan 11, 2008 4:15 AM, Andrea Righi <righiandr@xxxxxxxxxxxxxxxxxxxxx> wrote:
>> Allow to limit the bandwidth of I/O-intensive processes, like backup
>> tools running in background, large files copy, checksums on huge files,
>> etc.
>>
>> This kind of processes can noticeably impact the system responsiveness
>> for some time and playing with tasks' priority is not always an
>> acceptable solution.
>>
>> This patch allows to specify a maximum I/O rate in sectors per second
>> for each single process via /proc/<PID>/io_throttle (default is zero,
>> that specify no limit).
>>
>> Signed-off-by: Andrea Righi <a.righi@xxxxxxxxx>
>
> Hi, Andrea,
>
> We have been thinking of doing control group based I/O control. I have
> not reviewed your patch in detail. I can suggest looking at openvz's
> IO controller. I/O bandwidth control is definitely interesting. How
> did you test your solution?

I don't have meaningful values right now, just did some quick tests with
my pc. Regarding openvz it seems to use the CFQ priority-based approach
(with the 3 priority classes: real time, best effort and idle class).

The interesting feature is that it allows to set a priority for each
process container, but AFAIK it doesn't allow to "partition" the
bandwidth between different containers (that would be a nice feature
IMHO). For example it would be great to be able to define per-container
limits, like assign 10MB/s for processes in container A, 30MB/s to
container B, 20MB/s to container C, etc.

-Andrea
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/