login
Header Space

 
 

Re: Ability to limit or disable page caching?

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: FD Cami <francois.cami@...>
Cc: <linux-kernel@...>
Date: Monday, May 5, 2008 - 3:42 pm

Yeah... I wanted to explain it in detail in a longer post.  If
necessary I'll do that as well.

I have a database process that's using 3G of memory. Then I have a
secondary process that's using about 500MB of memory.  This leaves
about 500MB free for anything else. The box has 4GB of memory total...
No swap is needed.

... swappiness is set to zero.

I've verified that overcommit or other issues aren't getting in the
way as I can run the box without swap.  This isn't possible when in
production though.

What's happening is that the kernel is deciding to swap out some
memory to disk in the (false) belief that it can free some up for
cache.

The problem is my database is already using its own cache so these are
conflicting philosophies here which make Linux perform in a
pathological way..

We're using O_DIRECT for our database which helps reduce the problem a
bit...... O_DIRECT bypasses the page cache and does all IO directly.
This means there isn't much pressure on the page cache and pages
aren't swapped out to disk.  However, MySQL still needs to do reads on
misc files which aren't O_DIRECT so I end up swapping but at a much
slower rate.

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.

Thoughts?

Kevin

On Mon, May 5, 2008 at 12:28 PM, FD Cami <francois.cami@free.fr> wrote:



-- 
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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 3:12 am)
Re: Ability to limit or disable page caching?, FD Cami, (Mon May 5, 7:16 am)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 2:34 pm)
Re: Ability to limit or disable page caching?, FD Cami, (Mon May 5, 3:28 pm)
Re: Ability to limit or disable page caching?, Tomasz Kłoczko, (Tue May 6, 7:02 am)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 3:42 pm)
Re: Ability to limit or disable page caching?, Rik van Riel, (Mon May 5, 4:44 pm)
Re: Ability to limit or disable page caching?, Chris Friesen, (Mon May 5, 5:03 pm)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 5:32 pm)
Re: Ability to limit or disable page caching?, Rik van Riel, (Mon May 5, 6:06 pm)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 5:00 pm)
split LRU kernel RPM, Rik van Riel, (Wed May 7, 10:08 pm)
Re: Ability to limit or disable page caching?, Rik van Riel, (Mon May 5, 6:08 pm)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 6:15 pm)
Re: Ability to limit or disable page caching?, Andi Kleen, (Mon May 5, 4:10 pm)
Re: Ability to limit or disable page caching?, Bernd Eckenfels, (Mon May 5, 5:24 pm)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 4:28 pm)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 4:31 pm)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 4:40 pm)
Re: Ability to limit or disable page caching?, Andi Kleen, (Mon May 5, 8:23 pm)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 8:30 pm)
Re: Ability to limit or disable page caching?, Kevin Burton, (Mon May 5, 3:33 pm)
speck-geostationary