[openib-general] Re: Re: performance counters in /sys
Michael S. Tsirkin
mst at mellanox.co.il
Tue May 24 00:06:36 PDT 2005
Quoting r. Mark Seger <Mark.Seger at hp.com>:
> Subject: Re: Re: performance counters in /sys
>
> Since I was the one who originally created this topic I'd like to
> restate what I said that got this all started. I'm trying to do
> relatively lightweight monitoring of lots of system performance counters
> (on the order of 100-200 or more) across a number of subsystems using
> standard interfaces. While I don't feel the need to be able to take
> 10Ks of samples/sec I would like to at least run efficiently at 1-10/sec
> range. I also want to avoid writing custom kernel code and/or talking
> directly to hardware.
>
> As I said in my base note I'm currently reading from /proc while some
> sets of counters are better organized than others, I can still access
> them relatively efficiently. While I could certainly "get by" reading
> one variable per file, I do worry about the overhead as the sampling
> frequency goes down. This will also be a problem as the number of
> counters and devices grow. The suggestion about using perfquery would
> certainly work, but I'd also be concerned about the overhead in running
> it at smaller sampling intervals.
>
> I certainly understand the desire to move to sysfs and that
> /usr/src/linux/Documentation/filesystems/sysfs.txt states that "Mixing
> types, expressing multiple lines of data, and doing fancy formatting of
> data is heavily frowned upon. Doing these things may get you publically
> humiliated and your code rewritten without notice." However, I don't
> read this to mean you must only have one data item per file. For
> example, I took a look at /sys/block/hda/stat because one of the types
> of data I collect is disk stats and I was wondering how sysfs dealt with
> them. Sure enough, they're all in one file per disk as shown below:
>
> dl380-2: cat /sys/block/hda/stat
> 0 0 0 0 0 0 0
> 0 0 0 0
>
> Also note some of these count bytes, some sectors and other jiffies, so
> even the units need not be identical.
>
> -mark
So, what about an actual benchmark for the two approaches that were proposed
(perfquery / sysfs)?
--
MST - Michael S. Tsirkin
More information about the general
mailing list