2002-07-22 21:59:48

by Rick Parada

[permalink] [raw]
Subject: Rik Van Riel Patch - rmap-12h - Memory Issues - VM

Original message (07/11/2002)


I installed patch rmap-12h to a 2.4.18 vanilla kernel, and we will see how
things run in about 4 days. That's how long it takes cache to fill up (4gb
of memory) and available memory to reach almost nil. This will be a perfect
box to test out your patch. We have about 4+ million images we rsync
everyday. Well we don't rsync that many a day, but rsync loads the file list
in memory. So hopefully kswapd and rsync won't reek havoc on the cpu load
when rsync tries to suck my memory dry.


With the rmap-12h patch to 2.4.18 (07/22/2002)

Rik,

After 11 days of uptime your patch is working GREAT. Although cache is
filled up again and there is only 70 megs free of memory top is reporting. I
assume that this is just normal behavior. When rsync runs, memory from buff
is free allowing rsync the memory to run seamless. And I notice that the
kswapd time that top is reporting is far less than say the 2.4.18 kernel
vanilla or 2.4.8 vanilla (two other boxes with the same configurations). Why
is this? If you have time maybe you could explain to me in layman's terms
what your patch actually does. Your patch actually saved us from having to
buy newer and faster equipment which probably wouldn't have help.

Thanks Again
Rick Parada
Systems Administrator
BizRate.com


2002-07-22 22:06:11

by Rik van Riel

[permalink] [raw]
Subject: Re: Rik Van Riel Patch - rmap-12h - Memory Issues - VM

On Mon, 22 Jul 2002, Rick Parada wrote:

> After 11 days of uptime your patch is working GREAT. Although cache is
> filled up again and there is only 70 megs free of memory top is
> reporting. I assume that this is just normal behavior. When rsync runs,
> memory from buff is free allowing rsync the memory to run seamless.

Yes, the cache is allowed to take all memory in the system, but
when something needs to run the memory will be reclaimed.

Of course it's also possible that program memory will be swapped
out instead of reclaiming from the cache, but the way rmap is
balanced means that the system is more likely to swap out cache
memory .. unless the memory from the cache is heavily accessed.

> And I notice that the kswapd time that top is reporting is far less than
> say the 2.4.18 kernel vanilla or 2.4.8 vanilla (two other boxes with the
> same configurations). Why is this?

Kswapd removes the right pages from RAM, that is: pages that will
not be used again soon (most likely). This also means it doesn't
need to read those pages in again from disk and the VM is less
busy as a result.

It also changes some data structures inside the kernel to remove
some of the complexity in chosing which page to evict from RAM,
meaning that it can choose the right page to evict with less CPU
usage.

kind regards,

Rik
--
Bravely reimplemented by the knights who say "NIH".

http://www.surriel.com/ http://distro.conectiva.com/