Hi all,
I noticed that among fellow linux users there is much confusion about the
2.4.x swap requirement. Some heard that it is a _requirement_ to have >=
2*memsize swap or none at all, and others heard that it is advisory in the
sense that performance/stability wil drop drastically when one does not
take this advice to heart.
There was a heated debate about the wisdom of the supposed requirement,
especially since many found it to be a major drawback compared to the
2.2.x series. However, I think there is a need for clarity on the real
status of the issue. Which brings me to my question: Can anyone shed some
light on how 'required' this requirement really is and what one could
expect to happen when this requirement is not met?
Regards,
Johan de Jong.
>From: "J.R. de Jong" <[email protected]>
>To: [email protected]
>Subject: 2.4.x swap >= 2*memsize requirement status.
>Date: Sat, 14 Jul 2001 13:42:46 +0200 (CEST)
>
>Hi all,
>
>I noticed that among fellow linux users there is much confusion about the
>2.4.x swap requirement. Some heard that it is a _requirement_ to have >=
>2*memsize swap or none at all, and others heard that it is advisory in the
>sense that performance/stability wil drop drastically when one does not
>take this advice to heart.
>
>There was a heated debate about the wisdom of the supposed requirement,
>especially since many found it to be a major drawback compared to the
>2.2.x series. However, I think there is a need for clarity on the real
>status of the issue. Which brings me to my question: Can anyone shed some
>light on how 'required' this requirement really is and what one could
>expect to happen when this requirement is not met?
>
>Regards,
>
>Johan de Jong.
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
It's not a requirement in the sense that you can't run a system where swap <
2 * RAM. It's afaik merely a strong suggestion, both for servers and
workstations. About the difference between 2.4 and 2.2: IIRC Rik van Riel
(maybe it was Alan Cox or some other person, I'm not sure) wrote some time
ago to the list, telling that the requirement is not here to stay. Current
VM is balanced around the 2*RAM-idea, but much work is being done on the
memory-subsystem, so it shouldn't take too long (as in: before the release
of 2.6/3.0...) before it's better. For some discussion about this subject,
take a look at http://gathering.tweakers.net/showtopic.php/172437 or
http://gathering.tweakers.net/showtopic.php/161652 (both in dutch, My nick
there is 'odysseus', as you'll see).
---
Disclaimer: all the above was written with experience only from real-life
situations.
---
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
On Sat, Jul 14, 2001 at 01:42:46PM +0200, J.R. de Jong wrote:
> Can anyone shed some
> light on how 'required' this requirement really is and what one could
> expect to happen when this requirement is not met?
Well, I just swapoffed my swap partitions and I am still able to compose this
email, so I guess its not actually required. I'm even building mozilla at
the same time. Ill have to add the swap back before the mozilla build gets
to the final link stage :-) I believe that the issue is that with 2.4 once
a process gets pages swapped out, it owns that area of swap until the process
dies. The 2.2 kernel would free the swap space up when it swapped the
processes pages back into memory. The 2.4 way performs much better than the
2.2 way. The problem is that if the swap space is less than the ram size, it
is possible to fill up the swap and then strange things happen. For example
consider a machine with 64M of ram and 64M of swap which is running 2 32M
processes. Now lets say we start a third process that grows to a large value
and causes both of the original 32M processes to be swapped out. Now the
third process dies a the two 32M process can run in memory again, but they
still own the swap space they were swapped into. This means that when we
start a third process, it can not be swapped out since the swap space is
owned the the two original processes, they will get swapped out instead when
memory gets tight.
I know that people have worked on changing this behavior, but I do not know
what the current state of those changes is.
Hope this helps,
Jim