linux-mips-fnet
[Top] [All Lists]

Re: R5000 Unused memory (was: R4000SC...)

To: linux-mips@fnet.fr
Subject: Re: R5000 Unused memory (was: R4000SC...)
From: "Gleb O. Rajko" <rajko@mech.math.msu.su>
Date: Thu, 5 Nov 1998 14:38:48 +0300 (MSK)
In-reply-to: <19981027055731.I5892@uni-koblenz.de>
On Wed, 4 Nov 1998 ralf@uni-koblenz.de 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 
http://www.math1.rwth-aachen.de/~heine/nfs-swap/
ftp://iris1.math1.rwth-aachen.de/pub/linux/nfs-swap/

Another way to set up swap on remote disk is to use a network block device 
(nbd). Look at 
http://atrey.karlin.mff.cuni.cz/~pavel/nbd/nbd.html

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.

Regards,
Gleb. 

<Prev in Thread] Current Thread [Next in Thread>