My original question:
I have a Sparcstation IPX running SunOS 4.1.2 (someday 4.1.3),
with 16MB RAM and a 400MB disk having a 32MB swap (b) partition.
I use this primarily single user and while my applications don't
run out of memory, they do a lot of paging. I will be upgrading
to 32MB RAM and adding a local 1GB disk. I have read the
appropriate FAQs and searched the sun-managers gopher site to
learn that I should distribute swap space on the second disk (at
least an equal 32MB) for maximum performance.
My question is: What are the advantages of the following two
methods of creating swap space?
1. Create a separate swap (b) PARTITION on the new disk.
2. Use mkfile to create a swap FILE in a larger general use
I know of two considerations already:
1. A swap file is easier to change the size of at a later date.
2. Any level of dump of a device (partition) that contains a swap
file will cause the (large) swap file to be dumped because it
Are there other considerations? Is there a performance difference
between the two methods?
The consensus of 18 responses is that partitions are faster than files
because the disk driver is called directly without having to call the
file system routines first. Opinions varied about how much faster, from
negligible to very significant; the most credible reporters (those
with quotable experts or seminars) aggree that the performance hit is
small (10-20%, 100's of usec out of 10 msec, etc.).
One reporter pointed out that a swap partition is more space efficient
than a swap file because there is no overhead for inodes and such.
Another issue mentioned is security. Some felt that a swap file is
more vulnerable to deletion or modification by malicious users.
I will certainly install a swap partition on the second disk, and then
I can always expand with a file if necessary.
Anyone wishing to receive the complete responses may send a request to
either my address above or below.
firstname.lastname@example.org.AU (Brett Lymn)
Casper Dik <email@example.com>
Tom Reingold <firstname.lastname@example.org>
email@example.com (Eric William Burger)
jason andrade <firstname.lastname@example.org>
"Lewis E. Wolfgang" <wolfgang@email@example.com>
Barry Margolin <firstname.lastname@example.org>
Mike Raffety <email@example.com>
Eckhard.Rueggeberg@ts.go.dlr.de (Eckhard Rueggeberg)
firstname.lastname@example.org (Pawel Marczewski)
email@example.com (Brian Sommers)
ye@Software.ORG (Jian Ye)
firstname.lastname@example.org (Michael D. Reynolds)
poffen@San-Jose.ate.slb.com (Russ Poffenberger)
Paul.Bellan-Boyer@dss.fw.gs.com (Paul Bellan-Boyer)
email@example.com (Michael Sullivan)
Dan Stromberg - OAC-DCS <firstname.lastname@example.org>
Ned Forrester email@example.com
Applied Ocean Physics and Engineering Dept. / Oceanographic Systems Lab
Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:04 CDT