Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2006 09:16:33 +0300
From:      Vasil Dimov <vd@FreeBSD.org>
To:        Thiago Damas <tdamas@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: odd behavior with geom - gmirror - read/write simultaneously
Message-ID:  <20060406061633.GA79708@qlovarnika.bg.datamax>
In-Reply-To: <f8e3d83f0604051109s774f7e1cr90601e78e9a77d15@mail.gmail.com>
References:  <f8e3d83f0604051109s774f7e1cr90601e78e9a77d15@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Apr 05, 2006 at 03:09:56PM -0300, Thiago Damas wrote:
>   Hi,
>   I'm having a odd behavior while using geom_mirror.
>   I have the following situation:
> - RAID1 with 2 SATA disks
> # gmirror status
>         Name    Status  Components
> mirror/home0  COMPLETE  ad2
>                         ad3
>=20
> - home0 as /home
> # df -h
> Filesystem              Size    Used   Avail Capacity  Mounted on
> /dev/ad0s1a             1.9G     74M    1.7G     4%    /
> devfs                   1.0K    1.0K      0B   100%    /dev
> /dev/ad0s1d             989M     16K    910M     0%    /tmp
> /dev/ad0s1e             7.7G    1.9G    5.2G    27%    /usr
> /dev/ad0s1f              58G    139M     53G     0%    /var
> /dev/mirror/home0s1c    226G    7.4G    200G     4%    /home
>=20
>   I was testing the read/write speed on /home, with:
> # dd if=3D/dev/ad0 of=3D/home/test.data bs=3D4m
>   While running this, gstat shows me what I wanted:
> # gstat
>  L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
>     0    230    230  29383    1.9      0      0    0.0   42.8| ad0
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1
>     9    192      0      0    0.0    192  24529   21.0   65.3| ad2
>     7    196      0      0    0.0    196  25040   16.6   65.4| ad3
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1a
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1b
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1c
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1d
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1e
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1f
>     0      0      0      0    0.0      0      0    0.0    0.0| ad2s1
>     9    192      0      0    0.0    192  24529   21.2   65.4| mirror/hom=
e0
>     0      0      0      0    0.0      0      0    0.0    0.0| ad3s1
>     9    192      0      0    0.0    192  24529   21.2   65.4| mirror/hom=
e0s1
>     9    192      0      0    0.0    192  24529   22.0   66.6| mirror/hom=
e0s1c
>=20
>   After that, I test the read speed:
> # dd if=3D/home/test.data bs=3D4m of=3D/dev/null
> # gstat
> dT: 0.501  flag_I 500000us  sizeof 240  i -1
>  L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1
>     1    120    120  15329    3.7      0      0    0.0   44.9| ad2
>     0    122    122  15584    3.5      0      0    0.0   43.1| ad3
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1a
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1b
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1c
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1d
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1e
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1f
>     0      0      0      0    0.0      0      0    0.0    0.0| ad2s1
>     1    242    242  30913    3.7      0      0    0.0   88.4| mirror/hom=
e0
>     0      0      0      0    0.0      0      0    0.0    0.0| ad3s1
>     1    242    242  30913    3.7      0      0    0.0   88.7| mirror/hom=
e0s1
>     1    242    242  30913    3.7      0      0    0.0   90.0| mirror/hom=
e0s1c
>=20
>  And it shows again what was supposed to.
>=20
>   Now, I test read/write simultaneously:
> In on shell (1):
> # dd if=3D/dev/ad0 of=3D/home/test.data bs=3D4m
> After some time, in another shell(2)
> # dd if=3D/home/test.data bs=3D4m of=3D/dev/null
>   And gstat shows me the following:
> # gstat
> dT: 0.501  flag_I 500000us  sizeof 240  i -1
>  L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1
>     0    158    158  20183    3.0      0      0    0.0   47.6| ad2
>     1    158    158  20183    2.5      0      0    0.0   39.1| ad3
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1a
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1b
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1c
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1d
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1e
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1f
>     0      0      0      0    0.0      0      0    0.0    0.0| ad2s1
>     1    315    315  40367    2.8      0      0    0.0   87.4| mirror/hom=
e0
>     0      0      0      0    0.0      0      0    0.0    0.0| ad3s1
>     1    315    315  40367    2.8      0      0    0.0   87.8| mirror/hom=
e0s1
>     1    315    315  40367    2.8      0      0    0.0   89.4| mirror/hom=
e0s1c
>=20
>=20
>   I'm having NO writes in home0; even hitting ^C in shell(1) hangs,
> until I cancel the dd command in shell(2).
>   I think its happening some problem with geom code . Can someone
> verify this? I using 6.1 PRERELEASE, with GENERIC kernel.
>=20

Did you try the parallel dd commands on another partition which is not
gmirror'd? For example:

dd if=3D/dev/ad0 of=3D/var/tmp/test.data bs=3D4m
dd if=3D/var/tmp/test.data bs=3D4m of=3D/dev/null

So you can be sure that it is a gmirror issue.

When I try your test on my mirror gstat shows read and write activity,
but the reading dd quits very soon, because reading appears to be faster
than writing.

I would suggest that you write to one file and read from another file
when you do the parallel test.

Just a hint: for the write test you should better use /dev/zero instead
of /dev/ad0 - ``dd if=3D/dev/zero of=3D/home/test.data bs=3D4m'' for obvious
reasons.

--=20
Vasil Dimov
gro.DSBeerF@dv

Testing can show the presence of bugs, but not their absence.
                -- Edsger W. Dijkstra

--PEIAKu/WMn1b1Hv9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----

iD8DBQFENLJBFw6SP/bBpCARAvYIAKDEWTY4sMRQSgWPBDmq9TYt4u7ywgCgh+Ee
4Kg7y3qBpPFqP0egxMf1CJ8=
=2vfr
-----END PGP SIGNATURE-----

--PEIAKu/WMn1b1Hv9--



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