From: Guillaume T. <gui...@bu...> - 2004-07-01 08:18:50
|
Hello, Since kernel 2.6.6, nswap and cnswap task_struct fields have been removed because variable counters have never been incremented. If we look in the BSD accounting source code we can see that ac_io and ac_rw (repectively # of blocks read/written and # of chars read/written) are always equal to zero. Thus, I'd like to have your opinion about what kind of values are interesting to measure? As it's for accounting I am interested by metrics per process (or per application). For example, it's interesting to know how many physical pages are used by a process in order to do resources management. This metrics can easily be extended to a group of processes. Another example is the network bandwidth used by an application. This metrics can be useful if we need to make pay the service proportionally to the usage. Thus I'd like to establish a list of which metrics are required and why are they required in order to include them in BSD process accounting. I opened a page that can be accessed at http://elsa.sourceforge.net/cgi-bin/elsa-wiki.pl?AccountingValues Thank you very much for your participation. Guillaume |
From: Jay L. <jl...@en...> - 2004-07-01 17:40:49
|
Hi Guillaume, Yes, since linux does not do page swap, nswap and cnswap do not apply. CSA has remove those two field starting 2.6.6. CSA also make use of # of chars read/written and # of blkcs read/written as below: # ac_chr: This field will hold the number of bytes (characters) read via read, pread and readv syscalls. Put the counter in each syscall since there isn't a common lower level routine for the varying file systems until down to the device level. linux/fs/read_write.c: add ret bytes to current->rchar in sys_read(), sys_pread() and sys_readv() # ac_chw: This field will hold the number of bytes (characters) written via write, pwrite and writev syscalls. Handled similar to #3. linux/fs/read_write.c: add ret bytes to current->wchar in sys_write(), sys_pwrite() and sys_writev() # ac_bkr: This field will hold the number of blocks read by this process. This counter is added to code common to all file systems. This value will be converted to 4K blocks when the accounting record is written. linux/drivers/block/ll_rw_blk.c: add nr_sectors to current->rblk in drive_stat_acct() # ac_bkw: This field will hold the number of blocks written while this process was the current executing process. Because of caching, this number of blocks can, and likely will, include blocks not associated with the current process. This needs to be made clear in the documentation that the number of blocks written doesn't necessarily directly correlate with the process' own I/O operations. linux/drivers/block/ll_rw_blk.c: add nr_sectors to current->wblk in drive_stat_acct() I will be out on vacation 7/2-7/12, thus would not be able to participate further discussion until i come back... BTW, csa kernel patch for 2.6.6 and 2.6.7 have been released to oss.sgi.com. (http://oss.sgi.com/projects/csa) I have also updated the "kernel changes" page linked from the CSA project page. Cheers, - jay -- Jay Lan - Linux System Software <jl...@sg...> Mountain View, CA Silicon Graphics, Inc. Guillaume Thouvenin wrote: > Hello, > > Since kernel 2.6.6, nswap and cnswap task_struct fields have been > removed because variable counters have never been incremented. If we > look in the BSD accounting source code we can see that ac_io and ac_rw > (repectively # of blocks read/written and # of chars read/written) are > always equal to zero. Thus, I'd like to have your opinion about what > kind of values are interesting to measure? As it's for accounting I am > interested by metrics per process (or per application). > > For example, it's interesting to know how many physical pages are > used by a process in order to do resources management. This metrics can > easily be extended to a group of processes. Another example is the > network bandwidth used by an application. This metrics can be useful if > we need to make pay the service proportionally to the usage. > > Thus I'd like to establish a list of which metrics are required > and why are they required in order to include them in BSD process > accounting. I opened a page that can be accessed at > http://elsa.sourceforge.net/cgi-bin/elsa-wiki.pl?AccountingValues > > Thank you very much for your participation. > > Guillaume > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital > self defense, top technical experts, no vendor pitches, unmatched > networking opportunities. Visit www.blackhat.com > _______________________________________________ > Lse-tech mailing list > Lse...@li... > https://lists.sourceforge.net/lists/listinfo/lse-tech |
From: Guillaume T. <gui...@bu...> - 2004-07-02 11:48:17
|
Jay Lan wrote: > Hi Guillaume, > > Yes, since linux does not do page swap, nswap and cnswap do not apply. > CSA has remove those two field starting 2.6.6. > > CSA also make use of # of chars read/written and # of blkcs read/written > as below: Thank you Jay for your help. According to your input, I wrote a small patch to add this metrics in BSD accounting. If people are interested by other metrics that are not currently available in the Linux kernel mailing-list. I would be very interested to know which ones and why they are needed in order to add them. Thank you for your participation Guillaume |