On Wed, 4 Nov 1998 email@example.com wrote:
> On Thu, Oct 22, 1998 at 07:44:42PM -0500, Mitchell Blank Jr wrote:
> > Eric Jorgensen wrote:
> > > Yes and no. Personally I find the concept of running a modern system
> > > without available swap somewhat perilous.
> > What about if you don't have any disk nor any rw filesystems? Not unusual
> > in imbedded applications. The only way to get around it now apparently is
> > to set up a ram disk and swap to that -- hardly effecient or useful
> > (except in the case where some RAM is slower).
Nowadays, there are two swap behaviours in Unixes and in Linux in
particular: old, when you should have at least as much swap space as ram
size and new, when you may have as much swap space as you need. In first
case, the system guarantees that all already running processes get memory
until they don't grow in size. In second case, a process may be
killed when there is no memory (ram and swap).
While the first behaviour is safer, it consumes a lot of disk space
especially when you have a lot of ram. On the other hand, if you know how
much memory you need (it's true for embedded systems, isn't it), the
second behaviour might be more appropriate. Certainly, in that case, swap
on ram disk is a bad thing.
By default Linux uses the second behaviour also called lazy swap or in
terms of Digital UNIX over-commitment.
> > A typical UNIX workstation or server should always have swap -- there are
> > always some gettys or something that might as well be swapped out to make
> > room for more disk cache. There are applications, however, where swap
> > is just not an option.
> Linux cannot swap to NFS, so that behaviour in absence is pretty much a
> showstopper for diskless apps.
Linux can or more strictly could swap to NFS. Look at
Another way to set up swap on remote disk is to use a network block device
(nbd). Look at
Unfortunately, nbd doesn't work on some architectures including mips and
sparc. Author misses the fact that C aligns fields in structures
differently on different architectures.