Re: Ability to limit or disable page caching?

From: Andi Kleen
Date: Mon May 05 2008 - 16:11:22 EST


"Kevin Burton" <burton@xxxxxxxxxxxx> writes:
>
> What I want to do is either disable the page cache entirely or just
> tell the OS to cache at max 10% of the available memory.

FYI page cache includes the memory your program uses. No page
cache would mean no user space, 10% would mean user space uses only
10%. One way that would fulfil your request literally is to boot with
mem=<10% of your ram>, but I guess you don't really want that.

If you don't want your application to be swapped at all you
should probably investigate mlock(2)/mlockall(2)

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/