After reading this thread on swap and RAID, I have the following remarks:
1. With kernel 2.2.x you can use swap partitions larger than 128MB (this
was actually true starting with the 2.1.x developemtn kernels)
2. The kernel automatically stripes across equal priority swap spaces.
(from the software RAID howto
http://metalab.unc.edu/LDP/HOWTO/mini/Software-RAID-8.html)
For example, the following entries from /etc/fstab stripe swap space across
five drives in three groups:
/dev/sdg1 swap swap pri=3
/dev/sdk1 swap swap pri=3
/dev/sdd1 swap swap pri=3
/dev/sdh1 swap swap pri=3
/dev/sdl1 swap swap pri=3
/dev/sdg2 swap swap pri=2
/dev/sdk2 swap swap pri=2
/dev/sdd2 swap swap pri=2
/dev/sdh2 swap swap pri=2
/dev/sdl2 swap swap pri=2
/dev/sdg3 swap swap pri=1
/dev/sdk3 swap swap pri=1
/dev/sdd3 swap swap pri=1
/dev/sdh3 swap swap pri=1
/dev/sdl3 swap swap pri=1
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of MadHat
Sent: Thursday, July 15, 1999 9:54 AM
To: [EMAIL PROTECTED]
Subject: Re: Swap on Raid ???
A James Lewis wrote:
>
> I don't think the 128Meg swap limit applies any more!
>
I think it is possible to create swap 'spaces' larger than 128M, but it
will only take advantage of the first 128M (but I can't find an exact
answer in the kernel right now). Can you point me to a page or kernel
source that says you can use more that 128M, I can't find it. Thanks.
I know you can up to 8 swap 'spaces' total which would allow for more
than 128M of swap, according to the kernel
(/usr/src/linux/include/linux/swap.h), but that could be changed.
> On 15 Jul 1999, Osma Ahvenlampi wrote:
>
> > Paul Jakma <[EMAIL PROTECTED]> writes:
> > > well, i'm just testing at the moment to see if it's feasible. Anyway,
> > > i never mentioned an amount of swap, i didn't say anything about
> > > 384mb. I actually have 4 partitions of 40MB = 160MB total. After
> > > RAID5 -> 120MB, which is reasonable.
> >
> > Funny, you should consider using 128MB partitions since that's how
> > much Linux can deal with in one swap device.
> >
> > > I really recommend you to configure two RAID1 devices that you use
for
> > > swap instead of one RAID5. It's much faster,
> > > RAID-1 is faster? since when? RAID-5 should be faster at reads. I get
> > > ~25MB/s sustained read across 4 U/W disks, 16MB/s sustained write
> > > according to bonnie. (i've never tried RAID-1 to be honest).
> >
> > Ahah, but Bonnie is not swapping. Bonnie tests sustainable read/write
> > to a single stream from one thread, plus very simplistic seek testing
> > from 5 threads. Swapping doesn't need high sustained bandwidth, it
> > needs FAST ACCESS. The faster you can get, the better. Parallel RAID1
> > devices is by far the best fault-tolerant configuration available.
> >
> > > well, md is single threaded AFAIK. So i think there's absolutely no
> > > advantage in having multiple md devices instead of a single device.
> >
> > Wrong again. Even if md was single threaded, disks are much slower
> > than CPU, and DMA disks (especially with SCSI's tagged queuing) are
> > very easily parallelized.
> >
> > --
> > Osma Ahvenlampi
> >
>
> A.J. ([EMAIL PROTECTED])
> Sometimes you're ahead, somtimes you're behind.
> The race is long, and in the end it's only with yourself.
--
Lee Heath (aka MadHat)