From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 6 06:16:40 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7952716A420; Thu, 6 Apr 2006 06:16:40 +0000 (UTC) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5EBD43D69; Thu, 6 Apr 2006 06:16:34 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2]) by jengal.datamax.bg (Postfix) with SMTP id 85D44B859; Thu, 6 Apr 2006 09:16:33 +0300 (EEST) Received: (nullmailer pid 79811 invoked by uid 1002); Thu, 06 Apr 2006 06:16:33 -0000 Date: Thu, 6 Apr 2006 09:16:33 +0300 From: Vasil Dimov To: Thiago Damas Message-ID: <20060406061633.GA79708@qlovarnika.bg.datamax> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 6.0-STABLE User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: odd behavior with geom - gmirror - read/write simultaneously X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2006 06:16:40 -0000 --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--