Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Aug 2011 15:10:57 +0200
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        freebsd-fs@FreeBSD.org
Cc:        jeremie@le-hen.org
Subject:   zfs mirror reads only on one disk
Message-ID:  <20110809131057.GA53580@felucia.tataz.chchile.org>

next in thread | raw e-mail | index | archive | help
Hi,

Please Cc: me when replying, as I've not subscribed.  Thanks.

I'm using FreeBSD 8.2-STABLE, with a mirrored ZFS pool v15:

        NAME        STATE     READ WRITE CKSUM
        data        ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            ad10s1  ONLINE       0     0     0
            ad6s1   ONLINE       0     0     0

    ad6: 1907729MB <Hitachi HDS723020BLA642 MN6OA180> at ata3-master UDMA100 SATA 3Gb/s
    ad10: 1907729MB <WDC WD2002FAEX-007BA0 05.01D05> at ata5-master UDMA100 SATA 3Gb/s

(For those who wonder why I use a sliced disk, this is because the disks
are not the same and this allows me to get the same size on each side.
Besides, ZFS v15 doesn't have the autoexpand property, this is a
workaround.)

The mirror is correctly synchronized and when I write on it, I get the
following iostat(8) output (3 seconds interval):

                            extended device statistics
    device     r/s   w/s    kr/s    kw/s wait svc_t  %b
    ad6        0.0 682.8     0.0 41593.3   16  18.7  77
    ad10       0.3 686.8    21.3 41465.4   19  19.4  80
                            extended device statistics
    device     r/s   w/s    kr/s    kw/s wait svc_t  %b
    ad6        0.0 680.9     0.0 41910.7   16  17.3  78
    ad10       0.0 671.2     0.0 41228.1   16  19.6  80


However, when I read on the mirror, only ad10 is being used:

                            extended device statistics
    device     r/s   w/s    kr/s    kw/s wait svc_t  %b
    ad6        0.0   0.0     0.0     0.0    0   0.0   0
    ad10     762.7   0.0 48796.7     0.0    2   1.8  82
                            extended device statistics
    device     r/s   w/s    kr/s    kw/s wait svc_t  %b
    ad6        0.0   0.0     0.0     0.0    0   0.0   0
    ad10     740.2   0.0 47373.1     0.0    1   1.9  81
                            extended device statistics
    device     r/s   w/s    kr/s    kw/s wait svc_t  %b
    ad6        0.0   0.3     0.0     1.3    0   0.2   0
    ad10     716.2   0.3 45836.0     1.3    2   1.9  82


One of my colleagues told me this was maybe an optimization of ZFS for
sequentials reads, so I tried to run two reading processes in parallel,
with the same unfortunate outcome.

I also tried to run "cat *" in a highly populated Maildir, so I'm sure
the reads are not sequential, same outcome.

Do you have any idea why this happens?

Thanks,
-- 
Jeremie Le Hen

Humans are born free and equal.  But some are more equal than others.
					    Coluche



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110809131057.GA53580>