My Kingdom for Computed Linux Filesystem Page Cache Efficiency

OK lazy web…. You have to help me out!

I try to monitor every performance metric I can within my cluster. Memcached efficiency, MySQL key buffer efficiency, etc.

One thing I can’t benchmark is the efficiency of the Linux filesystem buffer (buffer cache).

From all the research I have done there’s no way to to see the number of hits or total reads done by the file system cache.

Has anyone solved this problem?

200702191220


  1. Switch to Solaris 10?

    mail-archives.apache.org runs on it, and there are very nice dtrace scripts in the dtrace toolkit that can show you the VFS cache hit ratio…

  2. Nah….. my stack is pretty much rock solid other than a few glitches…

    For the most part our Linux boxes are rock solid.

    64bit Debian is the next big change. We’re going to get some burn in boxes this week.

    w00t!

    I’m more concerned about MySQL and libc6 stability than anything else.

    Kevin

  3. See Section 3.2 of this:

    http://www.usenix.org/publications/library/proceedings/als00/2000papers/papers/full_papers/lever/lever_html/index.html

    Does that help? You might contact the folks who wrote it, as I’m not sure if their measurements were calculated from knowing the data being sent (they used benchmarking tools).

    Although they call the “buffer cache” the place in memory where files to be written are stored (in a journaled filesystem, I’m guessing?). I’m not sure that’s the actual name of the cache, it might be “page cache”, but that might just be me misunderstanding…you’ve been doing research for a while so I’m sure you know the difference, but in case you’re still baffled it might be the “magic word” that helps….who knows….

  4. what about in kernel debug ?

    CONFIG_BLK_DEV_IO_TRACE
    git://brick.kernel.dk/data/git/blktrace.git

    blktrace was integrated into the mainline kernel between 2.6.16 and 2.6.17-rc1.

    CONFIG_DM_DEBUG
    CONFIG_DEBUG_FS
    CONFIG_DEBUG_SLAB_LEAK
    CONFIG_DEBUG_SLAB

    also `mount -odebug`, more info in linux/Documentation/filesystem

    HTH a bit

  5. robin

    care to do a more detailed post about your performance monitoring setup? would love to hear more about it (incl config details) …

  6. iostat and sar of the sysstat package

  7. Peter Zaitsev

    Eric,

    How iostat or sar will show you Linux file cache efficiently ? It does not seems to have could of logical IOs. On some other OSes it does though.

    I agree with Kevin it is sad it can’t really be monitored easily. The other thing which I always wanted to have easy stats on is access distribution per files to see what is hot.






%d bloggers like this: