[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype |
Date: |
Sun, 10 Mar 2013 12:10:48 +0100 |
On Sun, Mar 10, 2013 at 11:50 AM, Dietmar Maurer <address@hidden> wrote:
>> About 4KB zero tracking:
>>
>> The vma.py module does not check for zeros, the mask is always 0xffff.
>> There is a pathalogical case of a disk with every 2nd 4 KB block zeroed,
>> here
>> vma.py would create a fully-allocated file.But the more common case is that
>> the
>> whole 64 KB cluster is zero - think about the fact that qcow2/qed only do
>> discard
>> (zero clusters) at cluster level
>> (64 KB).
>>
>> Also, if you try hard to zero 4 KB blocks then two things can happen:
>> 1. You fragment the file, saving space now but turning sequential access into
>> random access once those zero regions get filled in.
>> 2. The underlying file system ignores the holes to reduce fragmentation and
>> all
>> the effort was wasted - I guess this can be checked with ioctl(FIEMAP/FIBMAP)
>> to see how ext4/xfs/btrfs handle it.
>
> We track zero blocks at 4KB level to get small backup files. Restore can
> handle those
> blocks differently, either pre-allocate or create holes. That can even be a
> restore option.
You are right, the behavior can be set at restore time.
I'm curious how much of a win the 4 KB zero detection is on random
Linux or Windows guest images. Have you collected numbers?
Stefan
- [Qemu-devel] [RFC 7/8] Add vma-writer.py tool, (continued)
- [Qemu-devel] [RFC 7/8] Add vma-writer.py tool, Stefan Hajnoczi, 2013/03/09
- [Qemu-devel] [RFC 8/8] Add backup.py tool, Stefan Hajnoczi, 2013/03/09
- [Qemu-devel] [RFC 3/8] backup: write to BlockDriverState instead of BackupDumpFunc, Stefan Hajnoczi, 2013/03/09
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Dietmar Maurer, 2013/03/10
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Stefan Hajnoczi, 2013/03/10
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Dietmar Maurer, 2013/03/10
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Dietmar Maurer, 2013/03/11
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Dietmar Maurer, 2013/03/11
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Stefan Hajnoczi, 2013/03/11
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Dietmar Maurer, 2013/03/11
- Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Stefan Hajnoczi, 2013/03/11
Re: [Qemu-devel] [RFC 0/8] block: Live backup prototype, Dietmar Maurer, 2013/03/10