public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Question on the rmap VM
@ 2002-03-03  9:17 T. A.
  2002-03-03 13:40 ` Alan Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: T. A. @ 2002-03-03  9:17 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

    I have a question on the rmap VM.  What is the swap requierment for it?
I remember the previous Rik van Riel VM required twice the amount of
swapspace as memory to run effectively as many people were complaining about
that.  I read a while ago that the switch in 2.4.10 to the new AA VM fixed
that issue.  Will rmap bring back that 2x requirement?  Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question on the rmap VM
  2002-03-03  9:17 Question on the rmap VM T. A.
@ 2002-03-03 13:40 ` Alan Cox
  2002-03-04  4:52   ` Mike Fedyk
  2002-03-03 19:02 ` Rik van Riel
  2002-03-04  2:49 ` Mike Fedyk
  2 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2002-03-03 13:40 UTC (permalink / raw)
  To: T. A.; +Cc: Linux Kernel Mailing List

>     I have a question on the rmap VM.  What is the swap requierment for it?
> I remember the previous Rik van Riel VM required twice the amount of
> swapspace as memory to run effectively as many people were complaining about
> that.  I read a while ago that the switch in 2.4.10 to the new AA VM fixed
> that issue.  Will rmap bring back that 2x requirement?  Thanks.

That issue was fixed before the VM was changed - its actually a seperate
matter of when the kernel went to the trouble of trying to dig stuff out
of swap.

If you have a 2.4.18-ac2 kernel you can also see the worst case swap 
usage requirement at the current moment in /proc/meminfo as
"Committed AS" 

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question on the rmap VM
  2002-03-03  9:17 Question on the rmap VM T. A.
  2002-03-03 13:40 ` Alan Cox
@ 2002-03-03 19:02 ` Rik van Riel
  2002-03-04  2:49 ` Mike Fedyk
  2 siblings, 0 replies; 5+ messages in thread
From: Rik van Riel @ 2002-03-03 19:02 UTC (permalink / raw)
  To: T. A.; +Cc: Linux Kernel Mailing List

On Sun, 3 Mar 2002, T. A. wrote:

> I read a while ago that the switch in 2.4.10 to the new AA VM fixed that
> issue.

The thing was fixed around 2.4.8-pre, about 2 or 3 months
before Linus made the switch to -aa.

> Will rmap bring back that 2x requirement?

No.

Rik
-- 
"Linux holds advantages over the single-vendor commercial OS"
    -- Microsoft's "Competing with Linux" document

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question on the rmap VM
  2002-03-03  9:17 Question on the rmap VM T. A.
  2002-03-03 13:40 ` Alan Cox
  2002-03-03 19:02 ` Rik van Riel
@ 2002-03-04  2:49 ` Mike Fedyk
  2 siblings, 0 replies; 5+ messages in thread
From: Mike Fedyk @ 2002-03-04  2:49 UTC (permalink / raw)
  To: T. A.; +Cc: Linux Kernel Mailing List

On Sun, Mar 03, 2002 at 04:17:31AM -0500, T. A. wrote:
> Hi,
> 
>     I have a question on the rmap VM.  What is the swap requierment for it?
> I remember the previous Rik van Riel VM required twice the amount of
> swapspace as memory to run effectively as many people were complaining about
> that.  I read a while ago that the switch in 2.4.10 to the new AA VM fixed
> that issue.  Will rmap bring back that 2x requirement?  Thanks.

All three 2.4 VMs run best with swap at the same size as ram.

Let me define some VM names:
mainline (latest from Marcelo (currently based on an older version of -aa))
rik-vscan (latest in 2.4.13-ac7 (ac8 has some probs))
rik-rmap (latest patch from rik is still in development but stable (ie,
         running in production for me))
-aa (andrea) (latest patch against mainline)

The 2x ram requirement has been removed in all of the latest versions of the
VM implementations.

Let's compare this part of the 2.2 VM with the base concept of what the 2.4
VMs are doing.

2.2:
  o swap page (4k on most arches) to disk
  o swap page from disk
  o remove from swap
On a system that has a lot of swap activity it is common for the swap areas
to become fragmented.  Also, if the same page needs to be swapped out again,
(and hasn't been modified while in memory) it has to write to disk again.

2.4:
  o swap page (4k on most arches) to disk
  o swap page from disk
  o leave page in swap
With this solution, the pages are left in place there is less chance to get
a fragmented swap area.  Also, if the same page needs to be swapped out
again, (and hasn't been modified while in memory) it is *not* written to
disk again, just simply marked as swapped and freed for other purposes.

===========

Now, if the swap space is smaller than RAM, then when swap space gets low
the kernel will have to start freeing pages that are both in swap and
memory (remember, this is possible now in the 2.4 VMs).  This causes
fragmentation and extra overhead and slows you down at what is probably the
worst time possible to slow down.

Of course I might've left something out, so if I did, please fill in the
blanks...

Hope this helps.

Mike

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question on the rmap VM
  2002-03-03 13:40 ` Alan Cox
@ 2002-03-04  4:52   ` Mike Fedyk
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Fedyk @ 2002-03-04  4:52 UTC (permalink / raw)
  To: Alan Cox; +Cc: T. A., Linux Kernel Mailing List

On Sun, Mar 03, 2002 at 01:40:44PM +0000, Alan Cox wrote:
> >     I have a question on the rmap VM.  What is the swap requierment for it?
> > I remember the previous Rik van Riel VM required twice the amount of
> > swapspace as memory to run effectively as many people were complaining about
> > that.  I read a while ago that the switch in 2.4.10 to the new AA VM fixed
> > that issue.  Will rmap bring back that 2x requirement?  Thanks.
> 
> That issue was fixed before the VM was changed - its actually a seperate
> matter of when the kernel went to the trouble of trying to dig stuff out
> of swap.
> 
> If you have a 2.4.18-ac2 kernel you can also see the worst case swap 
> usage requirement at the current moment in /proc/meminfo as
> "Committed AS" 
> 

Can "Committed AS" be easily ported to mainline or -aa?  IOW, does it have an
effective requirement for rmap?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-03-04  4:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-03  9:17 Question on the rmap VM T. A.
2002-03-03 13:40 ` Alan Cox
2002-03-04  4:52   ` Mike Fedyk
2002-03-03 19:02 ` Rik van Riel
2002-03-04  2:49 ` Mike Fedyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox