[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qemu-nbd very slow, patch available
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] qemu-nbd very slow, patch available |
Date: |
Wed, 12 Sep 2012 12:00:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 |
Il 12/09/2012 10:25, Tristan Wibberley ha scritto:
> The attached diff adds a commandline option "--cache=" with four modes
> and makes no change to the default behaviour of qemu-nbd:
>
> --cache=writethrough [default, O_DSYNC, very slow, very resilient]
> --cache=off [same as --nocache, O_DIRECT, slow, resilient]
> --cache=none [O_DIRECT, O_DSYNC, very very slow, very very resilient]
> --cache=writeback [fast, not resilient]
A very similar patch is in QEMU 1.2.0, just released last week. :)
--cache=writethrough [default, O_DSYNC]
--cache=none [same as --nocache, O_DIRECT]
--cache=directsync [O_DIRECT, O_DSYNC]
--cache=writeback
> I have not included Stephane's extra fsync operation on close because
> that would make --cache=writeback very slow on disconnect. Users can
> sync after disconnect via alternatives available on their platform.
An fsync is already done by bdrv_close; however, this only syncs just
before qemu-nbd exits, not after each and every disconnect. I think
it's a good compromise. The best solution would be to add support for
fsync in the NBD kernel driver, so that --cache=writeback would be just
as good.
Paolo