Probing linux buffer/cache hit rates ?
Dushyanth
dushyanth@gmail.com
Mon Jul 27 19:35:00 GMT 2009
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
More information about the Systemtap
mailing list