odd behavior with geom - gmirror - read/write simultaneously

Thiago Damas tdamas at gmail.com
Thu Apr 6 19:10:37 UTC 2006


  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 at gmail.com> wrote:
>   Hi,
>   same problem:
> * in shell(1):
> # dd if=/dev/zero of=/var/tmp/test bs=4m
> * after some time (=~ 20seconds), in shell(2)
> # dd if=/var/tmp/test bs=4m of=/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=/dev/zero of=/var/tmp/test bs=4m
> * after some time (=~ 20seconds), in shell(2)
> # dd if=/var/tmp/test bs=4m of=/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=/dev/zero of=/var/tmp/test2 bs=4m
> * in shell(2):
> # dd if=/var/tmp/test of=/dev/null bs=4m
>
>   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/home0s1
>     0      0      0      0    0.0      0      0    0.0    0.0| mirror/home0s1c
>
> Hitting ^C in shell(2), it hangs until I cancel the dd of shell(1),
> and shows the following:
> # dd if=/var/tmp/test of=/dev/null bs=4m
> ^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=/dev/ad0 of=/var/tmp/test.data bs=4m
> > dd if=/var/tmp/test.data bs=4m of=/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=/dev/zero of=/home/test.data bs=4m'' for obvious
> > reasons.
> >
> > --
> > Vasil Dimov
> > gro.DSBeerF at dv
> >
> > Testing can show the presence of bugs, but not their absence.
> >                 -- Edsger W. Dijkstra
>


More information about the freebsd-hackers mailing list