[H-GEN] What size swap space is optimum?

Jason Henry Parker jasonp at uq.net.au
Mon Apr 23 06:21:08 EDT 2001


[ Humbug *General* list - semi-serious discussions about Humbug and  ]
[ Unix-related topics.  Please observe the list's charter.           ]
[ Worthwhile understanding: http://www.humbug.org.au/netiquette.html ]

Paul Gearon <pag at PISoftware.com> writes:

> That being said, 2.4.x is a very different beast.  There's been a bit of
> discussion about this on the kernel mailing list in recent weeks.

You have an odd idea of `recent', Paul.

> With the 2.4.x kernels you require at least 2 x RAM.  If you have
> any less then Linus says it won't get used.

Well, I found this post by Rik:

} On Thu, 15 Mar 2001, Mike A. Harris wrote:
} 
} > Is the fact that we're supposed to use double the RAM size as
} > swap a permanent thing or a temporary annoyance that will get
} > tweaked/fixed in the future at some point during 2.4.x perhaps?
} >
} > What are the technical reasons behind this change?
} 
} The reason is that the Linux 2.4 kernel no longer reclaims swap
} space on swapin (2.2 reclaimed swap space on write access, which
} lead to fragmented swap space in lots of workloads).
} 
} This means that a lot of memory ends up "duplicated" in RAM and
} in swap.
} 
} I plan on doing some code to reclaim swap space when we run out,
} but Linus doesn't seem to like that idea very much. His argument
} (when you're OOM, you should just fail instead of limp along)
} makes a lot of sense, however, and the reclaiming of swap space
} isn't really high on my TODO list ...
} 
} OTOH, for people who have swap < RAM and use it just as a small
} overflow area, Linus' argument falls short, so I guess some time
} in the future we will have code to reclaim swap space when needed.

(See
http://boudicca.tux.org/hypermail/linux-kernel/2001week11/0495.html)

I fact, the whole thread is interesting; I don't fully understand all
of it.

The thread that
http://boudicca.tux.org/hypermail/linux-kernel/2001week05/0403.html is
a part of makes interesting reading.
http://boudicca.tux.org/hypermail/linux-kernel/2001week05/0472.html
has Rik pretty much contradicting what you said Linus said.

However! he does appear to be saying something of the sort in
http://boudicca.tux.org/hypermail/linux-kernel/2001week02/0812.html .

I stopped searching for Linus saying `have twice as much swap as RAM'
when I reached `happy new year' announcements.

jason
-- 
Windows is user-friendly, but with friends like that . . .

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list