Re: 2.4 and 2GB swap partition limit

From: LA Walsh (
Date: Fri Apr 27 2001 - 17:44:11 EST

Rik van Riel wrote:

> On Fri, 27 Apr 2001, LA Walsh wrote:
> > An interesting option (though with less-than-stellar performance
> > characteristics) would be a dynamically expanding swapfile. If you're
> > going to be hit with swap penalties, it may be useful to not have to
> > pre-reserve something you only hit once in a great while.
> This makes amazingly little sense since you'd still need to
> pre-reserve the disk space the swapfile grows into.

    Why?  Why not have a zero length file that you grow only if you spill?
If you can't spill, you are out of memory -- or reserve a 'safety'
margin ahead -- like reserve 32k at a time and grow it.  It may make
little sense, but I believe it is what is used on pseudo OS's
like Windows -- you *can* preallocate, but the normal case has
Windows managing the swap file and growing it as needed up to
available disk space.  If it is doable in windows, you'd think there'd
be some way of doing it in Linux, but perhaps linux's complexity
doesn't allow for that type of feature.

As for disk-space reserves, if you have 5% reserved for root' on a 20G ext disk, that still amounts to 1G reserved for root. Seems an automatically sizing swap file might be just fine for some people not me, I don't even like to use swap, but I'm not my mom using windows ME either).

But, conversely, if it's coming out of space I wouldn't normally use anyway -- say the "5%" -- i.e. the 5% is something I'd likely only use under *rare* conditions. I might have enough memory and the right system load that I also 'rarely' use swap -- so not reserving 1G/1G (2xMEM) on my laptop both of which will rarely get used seems like a waste of 2G. I suppose if I put it that way I might convince myself to use it,

-- The above thoughts and | They may have nothing to do with writings are my own. | the opinions of my employer. :-) L A Walsh | Trust Technology, Core Linux, SGI | Voice: (650) 933-5338

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Apr 30 2001 - 21:00:19 EST