lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jan 2008 13:58:11 +0100 (MET)
From:	Andrea Righi <righiandr@...rs.sourceforge.net>
To:	Balbir Singh <balbir@...ux.vnet.ibm.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>, Valdis.Kletnieks@...edu,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] per-uid/gid I/O throttling (was Re: [RFC][PATCH]
 per-task I/O throttling)

Balbir Singh wrote:
> * Andrea Righi <righiandr@...rs.sourceforge.net> [2008-01-15 17:49:36]:
> 
>> Allow to limit the I/O bandwidth for specific uid(s) or gid(s) imposing
>> additional delays on those processes that exceed the limits defined in a
>> configfs tree.
>>
>> Examples:
>>
>> Limit the I/O bandwidth for user www-data (UID 33) to 4MB/s:
>>
>> root@...ux:/config/io-throttle# mkdir uid:33
>> root@...ux:/config/io-throttle# cd uid:33/
>> root@...ux:/config/io-throttle/uid:33# cat io-rate
>>      io-rate: 0 KiB/sec
>>    requested: 0 KiB
>> last_request: 0 jiffies
>>        delta: 388202 jiffies
>> root@...ux:/config/io-throttle/uid:33# echo 4096 > io-rate
>> root@...ux:/config/io-throttle/uid:33# cat io-rate
>>      io-rate: 4096 KiB/sec
>>    requested: 0 KiB
>> last_request: 389271 jiffies
>>        delta: 91 jiffies
>>
>> Limit the I/O bandwidth of group backup (GID 34) to 512KB/s:
>>
>> root@...ux:/config/io-throttle# mkdir gid:34
>> root@...ux:/config/io-throttle# cd gid:34/
>> root@...ux:/config/io-throttle/gid:34# cat io-rate
>>      io-rate: 0 KiB/sec
>>    requested: 0 KiB
>> last_request: 0 jiffies
>>        delta: 403160 jiffies
>> root@...ux:/config/io-throttle/gid:34# echo 512 > io-rate
>> root@...ux:/config/io-throttle/gid:34# cat io-rate
>>      io-rate: 512 KiB/sec
>>    requested: 0 KiB
>> last_request: 403618 jiffies
>>        delta: 80 jiffies
>>
>> Remove the I/O limit for user www-data:
>>
>> root@...ux:/config/io-throttle# echo 0 > uid:33/io-rate
>> root@...ux:/config/io-throttle# cat uid:33/io-rate
>>      io-rate: 0 KiB/sec
>>    requested: 0 KiB
>> last_request: 419009 jiffies
>>        delta: 568 jiffies
>>
>> or:
>>
>> root@...ux:/config/io-throttle# rmdir uid:33
>>
>> Future improvements:
>> * allow to limit also I/O operations per second (instead of KB/s only)
>> * extend grouping criteria (allow to define rules based on process containers,
>>   process command, etc.) 
>>
>> Signed-off-by: Andrea Righi <a.righi@...eca.it>
> 
> Hi, Andrea,
> 
> Thanks for doing this. I am going to review the patches in greater
> detail and also test them. Why do you use configfs when we have a
> control group filesystem available for grouping tasks and providing a
> file system based interface for control and accounting?
> 

Well... I didn't choose configfs for a technical reason, but simply
because I'm more familiar with it, respect to the other equivalent ways
to implement this. But I'll try to look also at the control group
approach, I don't know in details all the advantages/disadvantages, but
it seems interesting anyway.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ