SUMMARY: Configuring swap space

From: Duncan Laidlaw (
Date: Wed Aug 17 1994 - 04:13:41 CDT

The original question was:

>I have a requirement to create a large amount of swap space
>and have available an entire 1.05GB FAST SCSI-2 drive
>to provide this space. The question is; what's the
>best way to do this ?
>One large partition ?
>Several partitions ? And if so what sizes?
>The drive will be the second internal disk in
>a SPARCstation10/41 under Solaris 1.1.1B with
>64MB RAM and a 120MB swap partition (sd0b)
>on the first internal disk.

Many thanks indeed to all who responded.

Almost without exception it was stated that multiple swap
partitions on the second drive should NOT be used since
this would lead to considerable unnecessary head motion.

Most considered that the best approach would be
to split the swap space between the two disks and
if this was not possible to make the 2nd disk one
swap partition.

Several respondents pointed out that a swap partition should not
use cylinder 0 as this would destroy the disk label. ( Been
there done that!)

As this seemed to be a question that generated a lot of
interest, I am including some edited replies:

From:Gregory Bond <>

Definitely one large partition. Saves a bunch of seeking, as the kernel will
attempt to spread the swap usage across all swap devices. If you split the
one disk into 4 swap partitions, it means seeking to four separate locations,
rather than one larger, possibly sequential, transfer.

From: Larry Chin <>

   If you are going to use a single disk I would vote for a single large

   Ideally if you need a large amount of swap, you would want to spread it
   over a couple of disks rather than have it all on one. The reason being
   access time. If more than one process needs access to the swap space
   it would be faster to have multiple disks read/write heads doing the
   disk access rather than a single disk's heads madly scampering back and
   forth across the disk surface.

   It is for similar reasons that I would say use a single large partition
   for the swap on the 1.05 GB disk.

From: (Robert Wolf)

Make it one big partition and put it on the 2nd scsi controller if possible.

The 2nd controller will make a significant difference.

From: stern@sunrise.East.Sun.COM (Hal Stern - NE Area Systems Engineer)

i think there's only a benefit to multiple swap partitions if they're
on different disks. the key is to maximize the number of random
i/os that you can do. if you slice a disk up, you don't change
that value -- so why bother with multiple partitions?

Again, many thanks to the following who took the time to respond. Not only
did I get the question answered but learned a great deal too.
Very rewarding!

Martin Lewald <mol@NSD.3Com.COM> (Donn MacCara)
Dave Fetrow <>
Gregory Bond <>
Frank Pronk <>
rootd@ohsu.EDU (Darrell Root) (Kurt Sussman)
james mularadelis <> (Ruud van Poelgeest)
bern@penthesilea.Uni-Trier.DE (Jochen Bern) (Raymond Trzaska)
Larry Chin <> (Syed Zaeem Hosain)
Fintan Keeling <> (John P. Linderman) (William P. Boland)
stern@sunrise.East.Sun.COM (Hal Stern - NE Area Systems Engineer) (Donald McLachlan)
emsca!libra!fge@Venezuela.Sun.COM (Francisco Gomez Escobar (emsca))
"Reggie Beavers" <vjq09r4@shoes.Bell-Atl.Com> (Paulo Licio de Geus)
Harish Malneedi <>
Ted Beatie <>
Stephen Kowalczyk <> (Birger A. Wathne) (Robert Wolf) (Lupemaria Beal) (Jay Lessert)
"David C. Woodruff" <dcw@WLV.IIPO.GTEGSC.COM>
Dave Wilmot <> (Adam Fox)
Sam Horrocks <sam@rome.ICS.UCI.EDU> (Perry Hutchison)
Gautam Das <>
Mike Raffety <> (Russ Poffenberger) (Ned Forrester)

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:08 CDT