Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk
To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk
You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."
Today's Topics:
1. Re: RAID options (Jamie Lokier)
----------------------------------------------------------------------
Message: 1
Date: Wed, 4 Dec 2013 10:53:45 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] RAID options
Message-ID: <20131204105345.GD16669@jl-vm1.vm.bytemark.co.uk>
Content-Type: text/plain; charset=us-ascii
Alex Butcher wrote:
> On Wed, 4 Dec 2013, Shane McEwan wrote:
>
> >On 04/12/13 09:40, Martin Moore wrote:
> >>So, Swap partition - (history shows it's probably not needed, but will be
> >>there anyway). Raided or not? Presumably it will slow things down if it is,
> >>but if the active disk dies then the system would have a big problem?
> >
> >If you've got tons of RAM then swap is usually unnecessary. I
> >usually configure a little bit of swap (a gig or two, at most) to
> >give me a little bit of headroom but basically if you're regularly
> >swapping then your machine is going to be pretty unresponsive. You
> >don't want to have too much swap because the Linux Out Of Memory
> >killer won't run until swap is full. That means your machine could
> >be unresponsive for hours while it's trashing away filling swap
> >before OOM killer finally kills the offending process.
> >
> >As far as putting swap on a RAID disk . . . with RAID-1 I don't
> >see the point. If the active disk fails you're gonna need a reboot
> >anyway to boot off the mirror.
>
> Eh? My expectation would be that if your swap is unRAIDed, and a disc
> providing it fails, then all the swapped-out pages will be unreadable, and
> the machine will panic the first time it needs to bring them back into
> memory and fails. RAIDing the discs that provide swap should prevent that
> (at the cost of disc space, and, presumably, slower swapping-out as writes
> have to be at least duplicated) and allow you to down the machine and
> replace the failed disc at your convenience. RAID levels >=1 are primarily
> about availability, not performance.
I wouldn't assume RAID-1 swap to be slower, or noticably so. The
writes are probably not much if at all slower as they are in parallel
to the discs and ideally ovar parallel I/O channels, which is where
the time goes. The writes are also async - in the background - so
nothing is waiting for them. Reads on the other hand can go up to
twice as fast over RAID-1 compared with single disc, as the OS sends
half the reads to each disc; and something is waiting for them to
complete.
Personally I always use RAID-1 swap in RAIDed servers (if using any
swap at all), as having the machine not die when a disc seems
worth the tiny space allocated to it.
For most data on RAID-1 I'd actually use "offset RAID-1", which is the
Linux name for what some things call RAID-1E. It has better read
performance for some access patterns. But I don't know if it is
useful for swap, which might be too random access.
Best,
-- Jamie
------------------------------
_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol
End of Bristol Digest, Vol 528, Issue 4
***************************************
Tidak ada komentar:
Posting Komentar