From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 6 14:24:54 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 0222616A420 for ; Thu, 6 Apr 2006 14:24:54 +0000 (UTC) (envelope-from tdamas@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42F8443D68 for ; Thu, 6 Apr 2006 14:24:35 +0000 (GMT) (envelope-from tdamas@gmail.com) Received: by nproxy.gmail.com with SMTP id m18so106250nfc for ; Thu, 06 Apr 2006 07:24:34 -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=R7/WA9d1AHVqGLWFnZcoOKKPMrTBt2wbNiBrltNJsfndRb5EWv56jE5o9MPvq04GlGFtAz15OOvNX2x/NZXQpe8GnrSPmNnGhadJ7UpoRQcb1EJNPjPX4GhQTiDwGCdMqzAfIA/+HU9xxLw8PyYBYxHifwIJIX8Qo3yWhEe8a9M= Received: by 10.49.8.9 with SMTP id l9mr640618nfi; Thu, 06 Apr 2006 07:24:34 -0700 (PDT) Received: by 10.48.212.4 with HTTP; Thu, 6 Apr 2006 07:24:34 -0700 (PDT) Message-ID: Date: Thu, 6 Apr 2006 11:24:34 -0300 From: "Thiago Damas" To: vd@freebsd.org In-Reply-To: <20060406061633.GA79708@qlovarnika.bg.datamax> 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 14:24:54 -0000 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 cache)= : 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/home0 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/home0= s1 0 0 0 0 0.0 0 0 0.0 0.0| mirror/home0= s1c 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 faster > 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 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 obvi= ous > reasons. > > -- > Vasil Dimov > gro.DSBeerF@dv > > Testing can show the presence of bugs, but not their absence. > -- Edsger W. Dijkstra