Re: Fwd: Multiple disks: RAID 5 or PG Cluster - Mailing list pgsql-performance

From Michael Stone
Subject Re: Fwd: Multiple disks: RAID 5 or PG Cluster
Date
Msg-id 20050618225748.GI25854@mathom.us
Whole thread Raw
In response to Fwd: Multiple disks: RAID 5 or PG Cluster  (Yves Vindevogel <yves.vindevogel@implements.be>)
Responses Re: Fwd: Multiple disks: RAID 5 or PG Cluster  (Greg Stark <gsstark@mit.edu>)
List pgsql-performance
On Sat, Jun 18, 2005 at 06:42:27PM +0200, Yves Vindevogel wrote:
>>With striping, each file is distributed over several disks, making
>>the physical write faster because several disks can do the work.
>>Same for reading, multiple disks return a part of the file.

A mirror behaves almost exactly the same for reads, with a caveat: for a
large enough file, multiple disks *must* be accessed in a striped
configuration, while in a mirrored configuration the controller may
access either one or more disks to read any file.

>>BTW: mirroring is always slower than striping.

That's simply not true. Striping speeds up writes but has no advantage
over a simlarly sized mirror for reading. In fact, the mirror will be
faster for pathological cases in which the reads are aligned in such a
way that they would all be have to be read from the same stripe of a
striped array. The striped configuration has an advantage when more than
two disks are used, but that derives from the number of spindles, not
from the striping; it is possible to have a mirror of more than two
disks (which would have the same read advantage as the striped
configuration with the same number of disks) but this is rarely seen
because it is expensive.

Mike Stone

pgsql-performance by date:

Previous
From: Yves Vindevogel
Date:
Subject: Fwd: Multiple disks: RAID 5 or PG Cluster
Next
From: "Ken Shaw"
Date:
Subject: How to determine whether to VACUUM or CLUSTER