[448] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: Swap space and Memory

daemon@ATHENA.MIT.EDU (Andreas Kostyrka)
Tue Oct 22 17:03:11 1996

Date: Tue, 22 Oct 1996 16:47:07 +0200 (MET DST)
From: Andreas Kostyrka <andreas@ag.or.at>
To: "Hal L. DeVore Jr." <hdevore@crow.bmc.com>
cc: redhat-list@redhat.com
In-Reply-To: <199609301431.JAA09202@erehwon.bmc.com>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

On Mon, 30 Sep 1996, Hal L. DeVore Jr. wrote:

> Linux supports both dedicated swap partitions and swapping to a file within 
> a filesystem.  The Linux fdisk command can tag a partition as swap.  The 
> mkswap man page gives the sequence of commands needed to "format" and enable 
> a swap FILE.  A single swap file or partition is limited in size (128MB 
Nope. mkswap has to be used for a swap partition too. Tagging in fdisk is
actually something completely different. Classically (perhaps this has 
changed), you could make a swap partition with any file type, as the kernel
just relies on the swap signature written by mkswap. So what's this fdisk 
tagging? It's a mechanism, so that more sophisticated distributions can 
``automatically'' find which partitions are meant as swap partitions.
> Conventional wisdom says that a swap partition performs better than a swap 
> file because all the blocks are contiguous.  In a "real" system with one 
> physical disk, partitioned up into filesystems and swap partitions I'm not 
> sure this applies.
Yep. It's still true. It removes the file system overhead. Also be aware, 
that with IDE you can access only one disc (either master or slave) at a 
given time. So to speed up access of IDE discs for Linux (Program loaders 
and GUI-libraries aren't really affected *grin*), you should put the discs
on different controllers if available.

> If you are running out of virtual memory, try adding more swap space.  When 
> performance gets so bad due to swapping and paging take some other action 
> (run fewer programs, run smaller programs, limit the number of users, or add 
> more real memory).  Repeat ad infinitum.
Yep correct. Another consideration: Every Linux system (*grin* even one 
with 512MB RAM, ...) should have at least some swap. Why? That helps the 
performance. There are always some demons that are needed, but are usually
used rather seldom (and other demons have much functionality, but usually
just one simple function is used, ...), so basically after some running
2-4MB RAM are freed by moving them to swap. You can't remove statically the
demons usually, as their functionality may be needed, and usually it's to 
much hassle too.

Andreas


--
  PLEASE read the Red Hat FAQ, Tips, HOWTO and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-HOWTO 
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post