Disk 100% busy

Dan Nelson dnelson at allantgroup.com
Thu Nov 3 22:47:52 PST 2005


In the last episode (Nov 04), Brad Knowles said:
> At 2:35 PM -0500 2005-11-03, Francisco Reyes wrote:
> >> If you're using maildir, that is one of the situations which works
> >> pretty well with RAID-5, although RAID-10 is also (always? :-) a
> >> good choice.
> >
> > How about for database? In particular postgresql. How bad would
> > RAID 5 be for it?
> 
> RAID-5 is usually about the worst case for most database
> applications, since you have to read and write entire blocks across
> all disks just to change a single bit.  You have to wait for all
> disks to read or write their respective data, before you can return. 
> Some RAID arrays will have intelligent controllers that allow you to
> cache writes and return before the data is actually written, but then
> intelligent controllers can be used with all RAID types.

Even though parity is calculated across all disks, you don't need to
read all the blocks to recompute parity during a write; you just need
to know the contents of the block you are about to update and the
contents of the parity block you're about to update.  This cuts write
speeds to 25% in a simple implementation, but with a large enough write
cache in your controller, it can delay the I/Os until idle times (or
avoid the penalty completely if an entire stripe of data gets
modified).

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-stable mailing list