[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and devi
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device |
Date: |
Sat, 28 Jul 2018 10:12:59 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Jul 28, 2018 at 12:34:29AM +0300, Nir Soffer wrote:
> > $ time bash -c '(qemu-img convert -p -n fedora-27.img
> > nbd:unix:/var/tmp/sock; sync)'
> > (100.00/100%)
> >
> > real 0m9.555s
> > user 0m0.143s
> > sys 0m0.578s
> >
> >
> > $ time bash -c '( cp fedora-27.img output2; sync )'
> >
> > real 0m9.254s
> > user 0m0.005s
> > sys 0m0.846s
> >
> >
> > Maybe I'm making a mistake in my test somewhere?
> >
>
> Looks like you test kernl page cache.
Even though I'm running sync as part of the test?
> I was testing with qemu-nbd -n
> since we always disable the cache when writing or reading from shared
> storage.
And the other significant difference is you're using block devices,
which is of course important for oVirt.
I retested on my machine using an LV backed by an SSD. Not sure if it
supports efficient trimming however, I suspect it might not.
nbdkit (with your patch - thanks!):
$ sudo ./nbdkit file file=/dev/vg_trick_ssd/tmp_nbd_test -f -U /var/tmp/sock &
$ time sudo bash -c "qemu-img convert -n -p fedora-27.img
nbd:unix:/var/tmp/sock ; sync"
(100.00/100%)
real 0m54.713s
user 0m0.189s
sys 0m1.832s
qemu-nbd, but not using -n option:
$ sudo qemu-nbd /dev/vg_trick_ssd/tmp_nbd_test -k /var/tmp/sock &
$ time sudo bash -c "qemu-img convert -n -p fedora-27.img
nbd:unix:/var/tmp/sock ; sync"
(100.00/100%)
real 1m23.873s
user 0m0.218s
sys 0m2.114s
(This surprising result is repeatable)
qemu-nbd with -n:
$ sudo qemu-nbd /dev/vg_trick_ssd/tmp_nbd_test -k /var/tmp/sock -n &
$ time sudo bash -c "qemu-img convert -n -p fedora-27.img
nbd:unix:/var/tmp/sock ; sync"
(100.00/100%)
real 0m30.481s
user 0m0.203s
sys 0m2.080s
dd with 1MB block size:
$ time sudo bash -c "dd if=fedora-27.img of=/dev/vg_trick_ssd/tmp_nbd_test
bs=1M ; sync"
6144+0 records in
6144+0 records out
6442450944 bytes (6.4 GB, 6.0 GiB) copied, 47.2462 s, 136 MB/s
real 0m47.626s
user 0m0.036s
sys 0m39.739s
I don't really know what to make of this.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, (continued)
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Nir Soffer, 2018/07/11
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Stefan Hajnoczi, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Richard W.M. Jones, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Nir Soffer, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Richard W.M. Jones, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Nir Soffer, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device,
Richard W.M. Jones <=
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Nir Soffer, 2018/07/29
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Nir Soffer, 2018/07/28
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Nir Soffer, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Richard W.M. Jones, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Nir Soffer, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Richard W.M. Jones, 2018/07/27
- Re: [Qemu-block] Disconecting /dev/nbdX leaves stale partitions and device, Eric Blake, 2018/07/27