public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Kevin Burton" <burton@tailrank.com>
To: "Andi Kleen" <andi@firstfloor.org>
Cc: "FD Cami" <francois.cami@free.fr>, linux-kernel@vger.kernel.org
Subject: Re: Ability to limit or disable page caching?
Date: Mon, 5 May 2008 13:40:17 -0700	[thread overview]
Message-ID: <30c6373b0805051340h35034de2i378558ea8a9d6cd2@mail.gmail.com> (raw)
In-Reply-To: <30c6373b0805051331l11a71eacv5cb9a5221f8f26f9@mail.gmail.com>

... and here's another point I don't fully grok:

http://www.westnet.com/~gsmith/content/linux-pdflush.htm

"By default, Linux will aggressively swap processes out of physical
memory onto disk in order to keep the disk cache as large as possible.
This means that pages that haven't been used recently will be pushed
into swap long before the system even comes close to running out of
memory, which is an unexpected behavior compared to some operating
systems. The /proc/sys/vm/swappiness parameter controls how aggressive
Linux is in this area. "

...

"A value of 0 will avoid ever swapping out just for caching space.
Using 100 will always favor making the disk cache bigger. Most
distributions set this value to be 60, tuned toward moderately
aggressive swapping to increase disk cache. "

..... but we're running on zero and this machine still has 500MB of
free memory.  Why is it swapping?

Kevin

On Mon, May 5, 2008 at 1:31 PM, Kevin Burton <burton@tailrank.com> wrote:
> Though mlockall isn't going to fix this problem because the OOM killer
> will still kill it if it runs out of memory.
>
> I want to preserve the scenario where we go 10 bytes over memory and
> the kernel just swaps out those 10 bytes.
>
> Kevin
>
> On Mon, May 5, 2008 at 1:28 PM, Kevin Burton <burton@tailrank.com> wrote:
>> 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.
>
>
> --
> 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
>



-- 
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

  reply	other threads:[~2008-05-05 20:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05  7:12 Ability to limit or disable page caching? Kevin Burton
2008-05-05 11:16 ` FD Cami
2008-05-05 18:34   ` Kevin Burton
2008-05-05 19:28     ` FD Cami
2008-05-05 19:42       ` Kevin Burton
2008-05-05 20:10         ` Andi Kleen
2008-05-05 20:28           ` Kevin Burton
2008-05-05 20:31             ` Kevin Burton
2008-05-05 20:40               ` Kevin Burton [this message]
2008-05-06  0:23                 ` Andi Kleen
2008-05-06  0:30                   ` Kevin Burton
2008-05-05 21:24           ` Bernd Eckenfels
2008-05-05 20:44         ` Rik van Riel
2008-05-05 21:00           ` Kevin Burton
2008-05-05 22:08             ` Rik van Riel
2008-05-05 22:15               ` Kevin Burton
2008-05-08  2:08             ` split LRU kernel RPM Rik van Riel
2008-05-05 21:03           ` Ability to limit or disable page caching? Chris Friesen
2008-05-05 21:32             ` Kevin Burton
2008-05-05 22:06               ` Rik van Riel
2008-05-06 11:02       ` Tomasz Kłoczko
2008-05-05 19:33     ` Kevin Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30c6373b0805051340h35034de2i378558ea8a9d6cd2@mail.gmail.com \
    --to=burton@tailrank.com \
    --cc=andi@firstfloor.org \
    --cc=francois.cami@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox