From: Robert Mulley <gnscon@one.net.au>
Subject: Re: two swap disks versus one swap disk
Date: Wed, 10 Jan 2001 10:31:56 +0000 [thread overview]
Message-ID: <3A5C3A1C.25C9FA5C@one.net.au> (raw)
In-Reply-To: 93fpkg$bf9$1@mailint03.im.hou.compaq.com
"Alan Rollow - Dr. File System's Home for Wayward Inodes." wrote:
> In article <93fka9$1qf$1@nnrp1.deja.com>, estratosfera@my-deja.com writes:
>
> >Hello, I have to install a machine which has two hard disks so I would
> >like to install one swap area in each disk because I have heard that
> >the system will work faster than a system with only one swap area.
>
> >
> >A Compaq technical person has recommended don't do it but I don�t
> >believe him.
>
> I wouldn't believe him either, since the installation procedure
> give you the opportunity to setup two page/swap spaces. Many
> people setup more than just two.
>
> >What is your opinion or your experience with the swap
> >areas? Two swap areas in two hard disks or only one big swap area in
> >only one hard disk?
>
> Or one area mirrored on the two disks...
>
> You need page/swap space as a means to support some desired amount
> of virtual memory. Either as a maximum if you use the default (eager)
> mode of page/swap space reservation, or as an addition to available
> memory if you use lazy. The organization of it isn't really that
> relevant if the I/O rate to it is sufficiently low.
>
> When you start paging enough that the performance of the page/swap
> space becomes relevant the first question you should is "can I afford
> more memory"? I would expect that the performance difference between
> having more memory and not paging, and needing to page, is enough to
> make this serious consideration. Once you can't throw more memory
> at the problem, you're faced with how to make a *really bad* performance
> problem be merely *bad*.
>
> At that point spreading the page/swap I/O out over more disks and
> more controllers might offer some benefit over a single device.
> With two disks you can at least some overlapped seeking. With
> those two disks on separate controllers, you might get parallel
> transfers.
>
> >
> >Thank you for your help
> >
> >
> >Sent via Deja.com
> >http://www.deja.com/
> >
>
> --
> Alan Rollow alan@nabeth.cxo.dec.com
I remember reading or being told that it is better to have one large swap
partition versus two disparately sized partitions. e.g. swap1 being 50M and
swap2 being 8G. As the method of paging tries to write equally between the
swap partitions, therefore when swap1 fills up, the alogrithm wastes time
trying to write to it, before writing to swap2.
Granted it's probably not a great overhead, but on a system that is thrashing
swap it could be a problem. Also I could be mistaken in this belief. Obviously
two swap partitions the same size, on different disks, is better than one.
Robert Mulley
Unix admin
next prev parent reply other threads:[~2001-01-10 10:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-09 18:12 two swap disks versus one swap disk estratosfera
2001-01-09 18:34 ` Bob Koehler
2001-01-09 19:43 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
2001-01-10 10:31 ` Robert Mulley [this message]
2001-01-10 14:38 ` Tony Verhulst
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox