Swap performance statistics in 2.6 -- which /proc file has it?

From: Stephen Satchell
Date: Tue Dec 09 2003 - 08:21:21 EST


OK, color me stupid. I just grepped the entire Documentation directory
for 2.6.0-test11, and couldn't find anywhere where the number of disk
requests for swap, or the swap transfer volume, is provided. In 2.4 I
had a single place where all swap activity (whether it was to a separate
partition or to a file on a mounted file system) is recorded.

I also grepped the proc filesystem source (linux/fs/proc) for "swap" and
"Swap" and didn't find anything that had to do with swap request accounting,
only with swap memory allocation (which I do use, but which for me is only
half the story).

My purpose for wanting this performance metric is to try to detect when
a server has entered a thrashing mode (lots of swaps for an extended
period of time, possibly coupled with an ever-increasing amount of swap
used as the server falls further and further behind) so that I can take
some form of corrective action before the OOM killer starts committing
processicide, perhaps incorrectly.

Now, I could try to identify swap partitions using /proc/swaps,
totalling up the RIO+WIO and RBLK+WBLK from /proc/diskinfo for those
partitions that are swap partitions to get some measure, but that
doesn't help when an after-the-build swap file is added because the
original swap partition is too small.

(The person who answered this when I had a blinkered subject line of
"Re: balanced interrupts" neglected to indicate which source file he
was quoting to when providing what he thought was an answer.)

Someone please point out the obvious oversight to this feeble old fool
of a programmer.

Stephen Satchell


-
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/