Re: [PATCH 0/4] linux-2.6-block: deactivating pagecache for benchmarks

Badari Pulavarty
2005-12-05T16:54:05Z

On Thu, 2005-12-01 at 17:25 -0800, Andrew Morton wrote:
> Dirk Henning Gerdes <mail@dirk-gerdes.de> wrote:
> >
> > For doing benchmarks on the I/O-Schedulers, I thought it would be very
> > useful to disable the pagecache.
>
> That's an FAQ. Something like this?
>
>
> From: Andrew Morton <akpm@osdl.org>
>
> Add /proc/sys/vm/drop-pagecache. When written to, this will cause the kernel
> to discard as much pagecache and reclaimable slab objects as it can.
>
> It won't drop dirty data, so the user should run `sync' first.

BTW, (a while ago) I tried doing similar thing from user-space
using POSIX_FADV_DONTNEED on a file. While it worked great to
get rid of the pagecache pages for few files, since I had to
run this on each and every file in the filesystem - it ended
up bloating inode, dentry slabs :( I really wanted to find out
what files are really cached in the pagecache to run this on.

Thanks,
Badari