qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] qemu-nbd very slow, patch available


From: Tristan Wibberley
Subject: [Qemu-devel] qemu-nbd very slow, patch available
Date: Wed, 12 Sep 2012 09:25:26 +0100

Hello qemu devs,

A couple of years ago Stephane Chazelas
(https://launchpad.net/~stephane-chazelas) reported a performance
issue with qemu-nbd due to the lack of an option to switch on
writeback caching (ie a mode like any typical program that just
modifies files of data where resilience is not provided for each write
operation). I can't find any information about why that wasn't
applied.

Perhaps it just got lost in the noise, but I could see some
improvements to be made so I've attached a variant to provide extra
speed via a commandline option for users for whom fast, less robust
operation is wanted (ie, where robustness is available through other
means).

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]


Here is Stephane's original report:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/595117

Versus Stephane's patch I've altered the meaning of --cache=off to
accurately match --nocache.
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.

--
Tristan

Attachment: fast-nbd.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]