[CentOS] Shrinking a volume group

Wed Sep 13 11:23:50 UTC 2006
Aleksandar Milivojevic <alex at milivojevic.org>

Steve Bergman wrote:
> On Tue, 2006-09-12 at 15:25 -0500, Les Mikesell wrote:
>> If the disks are scsi the writes happen pretty much in parallel and
>> you only read one copy when you read.  It should only slow you down
>> if you are using 2 ide drives on the same controller for the mirrors
>> in which case you have to wait for one write to complete before
>> the other starts.
> They are SATA. My original thinking today was that performance would be
> better if I had 2 swap partitions: /dev/sda2, /dev/sdb2 set at the same
> priority so that *different* pages could be swapped simultaneously
> to/from the 2 drives.  But as Matt pointed out, that would be less
> robust.

The best performance is if you don't swap at all.  Avoid swapping, don't 
relay on "fast swap".  There's no such thing as "fast swap" ;-)

Anyhow, theoretically when you read from RAID1, you read different pages 
from different drives in parallel.  That's why RAID1 theoretically has 
two times faster reads than single drive.  Writing to RAID1 is 
theoretically the same speed as writing to single drive.  Of course, as 
Les pointed out, it all depends on the actual hardware.  If hardware 
isn't capable of doing read/writes in parallel (for example two IDE 
drives on the same controller), you get slower performance. 
Historically, SCSI with its command queuing was very good in doing 
things in parallel to several devices (even though it was chain-type of 
bus), hence its popularity in high performance applications.  Some (not 
all) SATA devices come with support for queuing (they call it "native 
command queuing"), however I've no idea if Linux supports it or not.