Date: Thu, 6 Apr 2006 15:37:24 -0300 From: "Thiago Damas" <tdamas@gmail.com> To: vd@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: odd behavior with geom - gmirror - read/write simultaneously Message-ID: <f8e3d83f0604061137n428a34b3x871b36dd97f9e325@mail.gmail.com> In-Reply-To: <f8e3d83f0604060724h716afe61s372838a9b5589a3e@mail.gmail.com> References: <f8e3d83f0604051109s774f7e1cr90601e78e9a77d15@mail.gmail.com> <20060406061633.GA79708@qlovarnika.bg.datamax> <f8e3d83f0604060724h716afe61s372838a9b5589a3e@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I made a similar test with FreeBSD 4.11, and the results are OK. This problem didnt happen. On 4/6/06, Thiago Damas <tdamas@gmail.com> 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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f8e3d83f0604061137n428a34b3x871b36dd97f9e325>