This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Probing linux buffer/cache hit rates ?
- From: Dushyanth <dushyanth at gmail dot com>
- To: systemtap at sources dot redhat dot com
- Date: Mon, 27 Jul 2009 17:49:21 +0000 (UTC)
- Subject: Probing linux buffer/cache hit rates ?
Hey all,
I have been trying to get approximate (if not accurate) buffer/cache hit rates
to analyze performance of a busy database server with 128G RAM.
First, i used disktop.stp
(http://sourceware.org/systemtap/examples/io/disktop.stp) as a example and wrote
the tap at http://pastebin.com/m3d90fa0. This doesn't work as devname is not set
in vfs.read tapset but disktop.stp suggests otherwise. The output of disktop.stp
also doesn't return the device name.
@leitao at freenode #systemtap suggested to use __find_get_block function in the
kernel (http://lxr.linux.no/linux+v2.6.30/fs/buffer.c#L1344). The stap code is
at http://pastebin.com/m19173246. Recommendation was to check if the return
value (bh) is NULL or not. This provides weird results.
To test this out i dropped all caches, read a big file from the disk and it was
still showing cachehits of about 90%. I further decided to run this on the
database server itself and test it out and it consistently shows above 90% cache
hit rates which i think is very unlikely.
Is there a better more accurate approach to instrument buffer/cache hit rates ?
TIA
Dushyanth