From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 6 19:10:35 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 73E8D16A49C for ; Thu, 6 Apr 2006 19:10:35 +0000 (UTC) (envelope-from tdamas@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEE434610A for ; Thu, 6 Apr 2006 18:43:52 +0000 (GMT) (envelope-from tdamas@gmail.com) Received: by nproxy.gmail.com with SMTP id m18so152517nfc for ; Thu, 06 Apr 2006 11:43:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YhXN4UGNZSchcwh3nNPT/fA1UwG/q8qnYprN1mEx7/76uhz6wl7adX6QSGBDs39fihaoTP0jUFOpEbdPRYZv5nLHUB+azd+A7EMppDp9UvzSw9BXBseN2sMVPWb7mtTiY5YSQpxlZOBleY7Faau4AYo+q9mxL31/GAhjF+Z4JLo= Received: by 10.49.36.8 with SMTP id o8mr278930nfj; Thu, 06 Apr 2006 11:37:24 -0700 (PDT) Received: by 10.48.212.4 with HTTP; Thu, 6 Apr 2006 11:37:24 -0700 (PDT) Message-ID: Date: Thu, 6 Apr 2006 15:37:24 -0300 From: "Thiago Damas" To: vd@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060406061633.GA79708@qlovarnika.bg.datamax> 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 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 19:10:37 -0000 I made a similar test with FreeBSD 4.11, and the results are OK. This problem didnt happen. On 4/6/06, Thiago Damas wrote: > Hi, > same problem: > * in shell(1): > # dd if=3D/dev/zero of=3D/var/tmp/test bs=3D4m > * after some time (=3D~ 20seconds), in shell(2) > # dd if=3D/var/tmp/test bs=3D4m of=3D/dev/null > > gstat shows no writes again, only reads; hitting ^C in shell(1), it > hangs until the dd in shell(2) finishes. > > Using diferents files (after rebooting the machine to prevent some cach= e): > > > In: > same problem: > * in shell(1): > # dd if=3D/dev/zero of=3D/var/tmp/test bs=3D4m > * after some time (=3D~ 20seconds), in shell(2) > # dd if=3D/var/tmp/test bs=3D4m of=3D/dev/null > > gstat shows no writes again, only reads; hitting ^C in shell(1), it > hangs until the dd in shell(2) finishes. > > Using diferents files (after rebooting the machine to prevent some > cache), I found the inverse situation: > * in shell(1): > # dd if=3D/dev/zero of=3D/var/tmp/test2 bs=3D4m > * in shell(2): > # dd if=3D/var/tmp/test of=3D/dev/null bs=3D4m > > gstat shows 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 > 11 357 0 0 0.0 357 45737 14.2 99.7| ad0 > 11 357 0 0 0.0 357 45737 14.3 99.7| ad0s1 > 0 0 0 0 0.0 0 0 0.0 0.0| ad2 > 0 0 0 0 0.0 0 0 0.0 0.0| 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 > 11 357 0 0 0.0 357 45737 15.1 99.7| ad0s1f > 0 0 0 0 0.0 0 0 0.0 0.0| ad2s1 > 0 0 0 0 0.0 0 0 0.0 0.0| mirror/hom= e0 > 0 0 0 0 0.0 0 0 0.0 0.0| ad3s1 > 0 0 0 0 0.0 0 0 0.0 0.0| mirror/hom= e0s1 > 0 0 0 0 0.0 0 0 0.0 0.0| mirror/hom= e0s1c > > Hitting ^C in shell(2), it hangs until I cancel the dd of shell(1), > and shows the following: > # dd if=3D/var/tmp/test of=3D/dev/null bs=3D4m > ^C0+0 records in > 0+0 records out > 0 bytes transferred in 23.318283 secs (0 bytes/sec) > > In: > > 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 faste= r > > than writing. > try waiting a little more before execute the dd command. > > > After those tests, the problem isnt relationated with GEOM, I think. > What can I do now? > > > > > > 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 faste= r > > 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 ob= vious > > reasons. > > > > -- > > Vasil Dimov > > gro.DSBeerF@dv > > > > Testing can show the presence of bugs, but not their absence. > > -- Edsger W. Dijkstra >