Re: Ability to limit or disable page caching?

From: Kevin Burton
Date: Mon May 05 2008 - 16:28:53 EST


We're actually running mlock which is native to MySQL.... of course I
didn't think about whether our secondary process is paging not our
MySQL process.

I'm going to have to look into that and figure out if it's possible to
figure out what apps are being paged.

Kevin

On Mon, May 5, 2008 at 1:10 PM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
> "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
>



--
Founder/CEO Tailrank.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com and http://tailrank.com
Blog: http://feedblog.org
Cell: 415-637-8078
Fax: 1-415-358-419 PIN: 0092
--
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/