This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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









Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]