lkml.org 
[lkml]   [2004]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ~500 megs cached yet 2.6.5 goes into swap hell
Andrew Morton wrote:
> "Brett E." <brettspamacct@fastclick.com> wrote:
>
>> Or how about "Use ALL the cache you want Mr. Kernel. But when I want
>> more physical memory pages, just reap cache pages and only swap out when
>> the cache is down to a certain size(configurable, say 100megs or
>> something)."
>
>
> Have you tried decreasing /proc/sys/vm/swappiness? That's what it is for.
>
> My point is that decreasing the tendency of the kernel to swap stuff out is
> wrong. You really don't want hundreds of megabytes of BloatyApp's
> untouched memory floating about in the machine. Get it out on the disk,
> use the memory for something useful.

Well, if it's truly untouched, then it never needs to be allocated a
page or swapped out at all... just accounted for (overcommit on/off,
etc. here)

But I assume you are not talking about that, but instead talking about
_rarely_ used pages, that were filled with some amount of data at some
point in time. These are at the heart of the thread (or my point, at
least) -- BloatyApp may be Oracle with a huge cache of its own, for
which swapping out may be a huge mistake. Or Mozilla. After some
amount of disk IO on my 512MB machine, Mozilla would be swapped out...
when I had only been typing an email minutes before.

BloatyApp? yes. Should it have been swapped out? Absolutely not. The
'SIZE' in top was only 160M and there were no other major apps running.

Applications are increasingly playing second fiddle to cache ;-(

Regardless of /proc/sys/vm/swappiness, I think it's a valid concern of
sysadmins who request "hard cache limit", because they are seeing
pathological behavior such that apps get swapped out when cache is over
50% of all available memory.

Jeff


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

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:1.103 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site