Linux VFS cache hit rate script v2
Jake Maul
jakemaul@gmail.com
Sat Apr 30 02:35:00 GMT 2011
Hello all,
Based on the list's feedback about the previous script (particularly
in relation to the "N/A" assumption), as well as a modified version
from Dave Wright, I have rewritten this script as attached. Also
included is a new 'probe end' block, inspired by 'entropo' from
Serverfault (http://serverfault.com/questions/157612/is-there-a-way-to-get-cache-hit-miss-ratios-for-block-devices-in-linux).
Note that this link is where I first started out from a couple weeks
ago.
This seems to offer much more repeatable and sane results, although
it's not without fault. For instance, it's possible for an
ioblock.request probe to register without a corresponding
vfs.read.return hit. Hence, there's a check in here for cache_bytes <
0, which should (in theory) not be necessary. Fortunately, in my
testing it appears to be a very small discrepancy, so I feel mostly
safe about just pretending it didn't happen- it seems to be dwarfed by
real I/O, and I probably wouldn't have noticed it if I wasn't testing
on a totally-idle server.
http://sourceware.org/systemtap/wiki/WSCacheHitRate is updated as
well, including props for those who've helped out in some way. :)
Thanks,
Jake
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cache-hit-rate.stp
Type: application/octet-stream
Size: 1607 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20110430/741398fb/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cache-hit-rate.meta
Type: application/octet-stream
Size: 532 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20110430/741398fb/attachment-0001.obj>
More information about the Systemtap
mailing list