[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush |
Date: |
Mon, 10 May 2010 23:51:48 +0200 |
Thanks to recent improvements, qemu flushes guest data to disk when the guest
tells us to do so.
This is great if we care about data consistency on host disk failures. In cases
where we don't it just creates additional overhead for no net win. One such use
case is the building of appliances in SUSE Studio. We write the resulting images
out of the build VM, but compress it directly afterwards. So if possible we'd
love to keep it in RAM.
This patchset introduces a new block parameter to -drive called "flush" which
allows a user to disable flushing in odd scenarios like the above. To show the
difference in performance this makes, I have put together a small test case.
Inside the initrd, I call the following piece of code on a 500MB preallocated
vmdk image:
mkfs.ext3 /dev/vda
mkdir -p /mnt
mount /dev/vda /mnt
dd if=/dev/zero of=/mnt/test bs=1M
umount /mnt
sync
halt -fp
With flush=on (default)
real 0m33.597s
user 0m16.453s
sys 0m6.192s
With flush=off
real 0m27.150s
user 0m16.533s
sys 0m5.348s
Alexander Graf (2):
Add no-op aio emulation stub
Add flush=off parameter to -drive
block.c | 18 ++++++++++++++++++
block.h | 5 +++++
block/raw-posix.c | 13 +++++++++++++
qemu-config.c | 3 +++
qemu-options.hx | 3 +++
vl.c | 3 +++
6 files changed, 45 insertions(+), 0 deletions(-)
- [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush,
Alexander Graf <=
- [Qemu-devel] [PATCH 1/2] Add no-op aio emulation stub, Alexander Graf, 2010/05/10
- [Qemu-devel] [PATCH 2/2] Add flush=off parameter to -drive, Alexander Graf, 2010/05/10
- [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Kevin Wolf, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Christoph Hellwig, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Anthony Liguori, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Anthony Liguori, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Anthony Liguori, 2010/05/11