this is source code for a tiny program I just wrote that traverses specified directories and removes them from file system cache.

There are few use cases for it. One is for all these people who benchmark stuff and want selective OS cache purges, another is for those who run high performance databases. Remember the O_DIRECT serialization everywhere? Well, XFS does direct I/O in parallel, unless there are cached pages (and they can happen because of any random outside-of-database activity, like ‘file’ command). Once you ‘uncache’ the files, XFS will be very much parallel again \o/ \o/

This entry was posted in mysql and tagged , . Bookmark the permalink.

6 Responses to uncache!

  1. Partha Dutta says:

    In new versions of linux, (and RHEL 4u6 and higher), you can also remove entries from the file system cache using /proc/sys/vm/drop_caches

  2. Partha, I know, but not individually.. ;-)

  3. Pingback: Uncaching bits in filesystem cache

  4. Pingback: Remova arquivos do cache de disco | George Guimarães on Tech

  5. Pingback: links for 2009-07-14 « Dan Creswell’s Linkblog

  6. Pingback: Aligning IO on a hard disk RAID – the Benchmarks - MySQL Performance Blog

Comments are closed.