On Wed, Mar 22, 2006 at 11:37:22PM +0100, Simon Gabor Technical Support 
Engineer wrote:

> RAID-1-nel az olvasasi sebesesseg elvileg duplaja lehetne a fizikai
> diszk-nel (ha ket fizikai diszk alkotja a RAID-1-et), hiszen a 2 fizikai
> vincsit parhuzamosan (round-robin) lehetne olvasni az adatokert.
> (Elso szektort az elso vincsi, a masodikat a masodik vincsi olvassa ki,
>  idoben _egyszerre_.)

Egyetlen aprocska iciri-piciri problema, hogy a szektor atugrasahoz
szukseges seek _sokkal_ tovabb tart, mint egyszeruen ugyanarrol a
diszkrol folyamatosan olvasni a kovetkezo szektort. Emiatt szekvencialis
olvasast a RAID1 nem tud gyorsitani (valamikor regen a linux-kernelen
volt errol egy thread; ha bovebben erdekel, turkalj az archivumban).

A random I/O-t lehet gyorsitani, es valamennyire mukodik is, lasd kernel
forrasban drivers/md/raid1.c:

/*
 * This routine returns the disk from which the requested read should
 * be done. There is a per-array 'next expected sequential IO' sector
 * number - if this matches on the next IO then we use the last disk.
 * There is also a per-disk 'last know head position' sector that is
 * maintained from IRQ contexts, both the normal and the resync IO
 * completion handlers update this position correctly. If there is no
 * perfect sequential match then we pick the disk whose head is closest.
 *
 * If there are 2 mirrors in the same 2 devices, performance degrades
 * because position is mirror, not device based.
 *
 * The rdev for the device selected will have nr_pending incremented.
 */
static int read_balance(conf_t *conf, r1bio_t *r1_bio)
{
[...]

Gabor

-- 
     ---------------------------------------------------------
     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences
     ---------------------------------------------------------
_________________________________________________
linux lista      -      [email protected]
http://mlf2.linux.rulez.org/mailman/listinfo/linux

válasz