[comp.unix.wizards] swapon

mike@erix.UUCP (Mike Williams) (12/09/86)

The normal way to indicate to the system which partitions it should
use for swapping / paging is to put this information in /etc/fstab
and then do a swapon -a in /etc/rc

If you have a system with several disks which have b partitions of
of different sizes and with different performance does the order
in which these partions are put in /etc/fstab have any effect.
Ie should the faster disks come first in the assumtion that they
will be used first?

For example, we have 2 RM05's and an eagle, should the eagle
come first or last? (We have root on an RM05). Would it be
better to have only one big swap partition on the eagle and
none on the slower RM05?

In other words how do the following effect swapping /paging
performance

	order in which swapon is done

	speed of disks

	size of swap partitions

	which disks are on what bus (in are case the eagle is on its own
	mba1 and the RM05 on mba0)

Is there any literature about 4.2 4.3 about this?

Mike Williams
mike@erix.UUCP
...mcvax!enea!erix!mike
Ericsson, 126 25 Stockholm, Sweden

(This question maybe should have been put in comp.unix.questions
but I thought it was more a question for wizards who might otherwise
have missed it)

dem@uwslh.UUCP (12/10/86)

Recently Mike Williams asked about swapping performance with several
disks of varying speed.  We tried this experiment once.
We had an eagle and a CDC9730-82 (equivalent to a 67 Meg RM0something).
The CDC drive had an access time about 50% longer than the eagle.
We had been swapping just on the eagle, but the literature (and the
kernel (4.2 BSD) every time we booted) said we should split the swap
space over multiple devices.
We split it between the eagle and the CDC drive and the performance
became dramatically WORSE.  We shut down, rebooted and took out the
split swapping within several hours because it was so bad.
From this I concluded that splitting your swap space is beneficial
only if your disks are of similar speed, otherwise you should just
swap on the fastest one.
I found this particulary suprising because we are running a VAX 750
with 8 Meg of memory and we almost never have more than 4 Meg in use.
I would be interested in any explanation from the net of:
1.  Why did performance get so much worse?
2.  Under what circumstances does splitting the swap space help.
    Does it matter if you have too little memory or more than enough?
-- 
David E. Miran         ...!{seismo,harvard,topaz,ihnp4}!uwvax!uwslh!dem
Wisconsin State Hygiene Lab    or    uwslh!dem@rsch.wisc.edu
University of Wisconsin          (608) 262-0019
465 Henry Mall
Madison, WI  53706

dan@kfw.COM (Dan Mick) (03/24/90)

Just noticed the swapon(8), mkfile(8), and swapon(2) utils/syscalls in
SunOS 4.x (and, apparently, BSD 4.2 or 3).  

Would anyone care to post some practical experience with them?  

Is it a good idea, say, for example, to increase the swap space on my 
Sun-3/50 from the default swap partition?

If I have swaps on different physical disks, will I see a better performance
increase than on the same disk?

What sort of tradeoffs are there for number vs size on swap areas?

How about files vs. partitions?  Is there any reason to make partitions, or
is swapping on a mkfile'd file as good?

What sort of metric would one use for "good" for swap space, anyway, besides
not running out of it?

steve@ektools.UUCP (Steve Bochinski) (03/27/90)

In article <1990Mar24.045813.5611@kfw.COM>, dan@kfw.COM (Dan Mick) writes:
> Just noticed the swapon(8), mkfile(8), and swapon(2) utils/syscalls in
> SunOS 4.x (and, apparently, BSD 4.2 or 3).  
> 
> Would anyone care to post some practical experience with them?  
> 

I have used swapon to increase the amount of swap space on a running system
to see if it additional swap does make a difference.  As far as I can tell,
(on sunOS 4.01) you cannot deallocate swap short of rebooting.

> Is it a good idea, say, for example, to increase the swap space on my 
> Sun-3/50 from the default swap partition?

If you are running out of swap space.  Try running pstat -T and look at the
last line of the output to see if you are approaching your swap size

> 
> If I have swaps on different physical disks, will I see a better performance
> increase than on the same disk?
> 
I think it depends on the speed of the disks involved, number of controllers, etc.

> What sort of tradeoffs are there for number vs size on swap areas?

unknown.

> 
> How about files vs. partitions?  Is there any reason to make partitions, or
> is swapping on a mkfile'd file as good?

unknown.

> 
> What sort of metric would one use for "good" for swap space, anyway, besides
> not running out of it?

I generally allocate 3x phys. mem and go from there to see how much has been used.
So far, it seems pretty conservative(I have increased allocation though)
-- 
Steve Bochinski				|  ...!rochester!ektools!steve
Product Software Engineering		|  
Eastman Kodak Company			|  39 Cambridge St, Rochester NY 14607