[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 5/7] qcow2: implement lazy refcounts
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [RFC 5/7] qcow2: implement lazy refcounts |
Date: |
Mon, 25 Jun 2012 17:01:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
Am 22.06.2012 17:08, schrieb Stefan Hajnoczi:
> Lazy refcounts is a performance optimization for qcow2 that postpones
> refcount metadata updates and instead marks the image dirty. In the
> case of crash or power failure the image will be left in a dirty state
> and repaired next time it is opened.
>
> Reducing metadata I/O is important for cache=writethrough and
> cache=directsync because these modes guarantee that data is on disk
> after each write (hence we cannot take advantage of caching updates in
> RAM). Refcount metadata is not needed for guest->file block address
> translation and therefore does not need to be on-disk at the time of
> write completion - this is the motivation behind the lazy refcount
> optimization.
>
> The lazy refcount optimization must be enabled at image creation time:
>
> qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=on a.qcow2 10G
> qemu-system-x86_64 -drive if=virtio,file=a.qcow2,cache=writethrough
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
This one requires a feature table entry as well.
Kevin
- [Qemu-devel] [RFC 0/7] qcow2: implement lazy refcounts optimization, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 5/7] qcow2: implement lazy refcounts, Stefan Hajnoczi, 2012/06/22
- Re: [Qemu-devel] [RFC 5/7] qcow2: implement lazy refcounts,
Kevin Wolf <=
- [Qemu-devel] [RFC 2/7] qcow2: introduce dirty bit, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 1/7] docs: add dirty bit to qcow2 specification, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 4/7] qemu-iotests: ignore qemu-img create lazy_refcounts output, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 6/7] qemu-io: add "abort" command to simulate program crash, Stefan Hajnoczi, 2012/06/22
- [Qemu-devel] [RFC 3/7] docs: add lazy refcounts bit to qcow2 specification, Stefan Hajnoczi, 2012/06/22