[clug] Q: Linux process accounting?

Alex Satrapa grail at goldweb.com.au
Thu Sep 1 04:25:27 GMT 2005


On 1 Sep 2005, at 12:56, Martin Pool wrote:

> Yes; Linux doesn't attribute IOs to processes.  (there may be some
> patches which add this somewhere)

Do any of the OSS operating systems provide IO accounting? The  
machine is a mail server after all, so monitoring IO (especially disk  
I/O) is going to be essential to performance tuning. I've heard/read  
that some people find Free/OpenBSD idea for mail or database servers  
due to their handling of disk I/O - does this sound right?

The two metrics I can imagine would be important are the total number  
of calls to disk I/O, and the wait times between request and response  
(eg: longer wait times would indicate busier disk, meaning time to  
upgrade to RAID, get a caching controller, etc, while extreme wait  
times mean the disk is breaking/broken).

Other things I'd like to be able to do are "nice" a process in terms  
of disk I/O rather than CPU utilisation (ie: "updatedb" and all its  
children go to the very bottom of the disk I/O queue, while "syslog"  
has ultimate priority over everything, with "deliver" being a very  
close second).

For the meantime, I've found sar (from the sysstat package) with  
atsar - I get some raw disk I/O numbers which aren't linked to  
anything just yet:

> mendel:~# sar -d
>
> Linux  mendel  2.4.27  #1 Wed Nov 3 11:27:48 EST 2004  i686   
> 09/01/2005
>
> 00:00:02  device            read/s rdKb/s   write/s wrKb/s         
> rdwr/s _disk_
> 00:10:01  disk003-000         0.58   2.52      4.02  37.98           
> 4.60
> 00:20:01  disk003-000         0.00   0.00      4.74  41.15           
> 4.74
> 00:30:02  disk003-000        22.44  89.80     10.82 155.22          
> 33.26
> 00:40:01  disk003-000        52.91 212.07     55.05 671.67         
> 107.96
> 00:50:01  disk003-000        52.02 208.19     54.58 662.76         
> 106.60
> 01:00:13  disk003-000        32.55 130.70     97.26 1180.52         
> 129.81
> 01:10:01  disk003-000         5.52  22.28    104.14 1216.32         
> 109.66
> 01:20:07  disk003-000        19.54  78.57     92.74 1053.57         
> 112.28
> 01:30:11  disk003-000         5.70  23.21     98.99 1003.54         
> 104.69

(and before anyone asks, yes my machines will be upgraded to 2.6 real  
soon now, since I've discovered that the 2.4 -> 2.6 upgrade process  
is painless).

If anyone knows of Linux disk-accounting experiments or development  
going on, I'd love to hear about it, and perhaps even volunteer one  
or two of my systems (development and test environment for internal  
applications) as test beds.

Alex Satrapa             M: +61 4 0770 5332
grail at goldweb.com.au     W: http://homepage.mac.com/alexsatrapa





More information about the linux mailing list