introduce bitmap to bdrv_commit to track dirty sector
Hi,
If introducing bitmap to bdrv_commit to track dirty sector, could we implement guest non-disruption while performing commit?
Thanks,
Zhang Haoyu
Quoted 3 lines · Zhang Haoyu
Hi,
If introducing bitmap tobdrv_committo track dirty sector, could we implement guest non-disruption while performing commit?
That is already implemented. It uses the same code that implements storage migration (block/mirror.c).
Paolo
Quoted 9 lines · Paolo Bonzini
Quoted 3 lines · Zhang Haoyu
Hi,
If introducing bitmap tobdrv_committo track dirty sector, could we implement guest non-disruption while performing commit?That is already implemented. It uses the same code that implements storage migration (
block/mirror.c).
Hi Paolo,
do you mean commit_active_start()?
Quoted 1 line
Paolo
Quoted 8 lines · Zhang Haoyu
Quoted 6 lines · Paolo Bonzini
Quoted 3 lines · Zhang Haoyu
Hi,
If introducing bitmap tobdrv_committo track dirty sector, could we implement guest non-disruption while performing commit?
Quoted 5 lines
Quoted 3 lines
That is already implemented. It uses the same code that implements storage migration (
block/mirror.c).Hi Paolo,
do you meancommit_active_start()?
Yes.
Paolo
Hi John, Vladimir
We can using active block commit to implement incremental backup without guest disruption, e.g.,
origin <= A <= B <= C <= current BDS,
a new external snapshot will be produced before every time backup,
we can migrate A, B, C, ... to destination,
then commit_active_start() the unneeded snapshot in source or destination end.
So, comparing with above mechanism,
what's the advantages of the incremental backup implemented by John and Vladimir?
Thanks,
Zhang Haoyu
Quoted 19 lines · Paolo Bonzini
Quoted 8 lines · Zhang Haoyu
Quoted 6 lines · Paolo Bonzini
Quoted 3 lines · Zhang Haoyu
Hi,
If introducing bitmap tobdrv_committo track dirty sector, could we implement guest non-disruption while performing commit?Quoted 5 lines
Quoted 3 lines
That is already implemented. It uses the same code that implements storage migration (
block/mirror.c).Hi Paolo,
do you meancommit_active_start()?Yes.
Paolo
Quoted 10 lines · Zhang Haoyu
Hi John, Vladimir
We can using active block commit to implement incremental backup without guest disruption, e.g.,
origin <= A <= B <= C <= current BDS,
a new external snapshot will be produced before every time backup,
we can migrate A, B, C, ... to destination,
thencommit_active_start()the unneeded snapshot in source or destination end.So, comparing with above mechanism,
what's the advantages of the incremental backup implemented by John and Vladimir?
We can't migrate A, B, C because they are buried in the backing chain under "current BDS". Even if we do that, there will be severe IO amplification compared to the dirty bitmap way.
For the same reason we have drive-backup (write intercept) instead of a "snapshot + drive-mirror" analogue.
Fam
Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to trackdirty sector
In reply to Zhang HaoyuQuoted 9 lines · Fam Zheng
Quoted 8 lines · Zhang Haoyu
Hi John, Vladimir
We can using active block commit to implement incremental backup without guest disruption, e.g.,
origin <= A <= B <= C <= current BDS,
a new external snapshot will be produced before every time backup,
we can migrate A, B, C, ... to destination,
thencommit_active_start()the unneeded snapshot in source or destination end.
Quoted 5 lines
Quoted 2 lines
So, comparing with above mechanism,
what's the advantages of the incremental backup implemented by John and Vladimir?We can't migrate A, B, C because they are buried in the backing chain under "current BDS".
I think we can backup the incremental image(e.g., A, B, C) to destination in top mode, although I haven't read the code in detail, it can work theoretically, I think.
Quoted 3 lines
Even if we do that, there will be severe IO amplification compared to the dirty bitmap way.
Yes, block-commit will produce extra IO.
But regarding incremental backup, when guest IO is performed,
will the corresponding dirty bit be synchronized to qcow2 image simultaneously?
If yes, it will impact on IO throughput in two sides, I think,
1) extro IO 2) randomize the IO,
if no, if source VM is shut-down in non-normal way, like killed by force or by mistake or server poweroff suddenly, some dirty bits maybe lost, then full copy is needed.
Quoted 3 lines
For the same reason we have drive-backup (write intercept) instead of a "snapshot + drive-mirror" analogue.
drive-backup is not incremental backup, full copy is needed in every time backup, so it dosen't meet our requirements.
Zhang Haoyu
Quoted 1 line
Fam
Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to trackdirty sector
Quoted 11 lines · Zhang Haoyu
Quoted 9 lines · Fam Zheng
Quoted 8 lines · Zhang Haoyu
Hi John, Vladimir
We can using active block commit to implement incremental backup without guest disruption, e.g.,
origin <= A <= B <= C <= current BDS,
a new external snapshot will be produced before every time backup,
we can migrate A, B, C, ... to destination,
thencommit_active_start()the unneeded snapshot in source or destination end.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
So, comparing with above mechanism,
what's the advantages of the incremental backup implemented by John and Vladimir?We can't migrate A, B, C because they are buried in the backing chain under "current BDS".
I think we can backup the incremental
image(e.g., A, B, C)to destination in top mode, although I haven't read the code in detail, it can work theoretically, I think.
No, we don't have any command do that.
Quoted 7 lines
Quoted 4 lines
Even if we do that, there will be severe IO amplification compared to the dirty bitmap way.
Yes, block-commit will produce extra IO.
But regarding incremental backup, when guest IO is performed,
will the corresponding dirty bit be synchronized to qcow2 image simultaneously?
No, that would have a huge performance penalty. It will only be synced at shutdown and or periodically, therefore it has the same implications with other cache, such as page cache or block driver metadata cache.
Quoted 2 lines
if no, if source VM is shut-down in non-normal way, like killed by force or by mistake or server poweroff suddenly, some dirty bits maybe lost, then full copy is needed.
Yes, it is a reasonable rule.
Quoted 3 lines
Quoted 1 line
drive-backup is not incremental backup, full copy is needed in every time backup, so it dosen't meet our requirements.
I didn't mean drive-backup already provides incremental backup, but we do need it to implement it (see the patch series posted by John Snow).
Thanks,
Fam
Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to trackdirtysector
In reply to Zhang HaoyuQuoted 15 lines · Fam Zheng
Quoted 14 lines · Zhang Haoyu
Quoted 12 lines · Fam Zheng
Quoted 10 lines · Zhang Haoyu
Hi John, Vladimir
We can using active block commit to implement incremental backup without guest disruption, e.g.,
origin <= A <= B <= C <= current BDS,
a new external snapshot will be produced before every time backup,
we can migrate A, B, C, ... to destination,
thencommit_active_start()the unneeded snapshot in source or destination end.So, comparing with above mechanism,
what's the advantages of the incremental backup implemented by John and Vladimir?
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
We can't migrate A, B, C because they are buried in the backing chain under "current BDS".
I think we can backup the incremental
image(e.g., A, B, C)to destination in top mode, although I haven't read the code in detail, it can work theoretically, I think.No, we don't have any command do that.
Is it worthy to implement it?
And does qemu support commit any external snapshot to its backing file?
Quoted 26 lines
Quoted 7 lines
Quoted 4 lines
Even if we do that, there will be severe IO amplification compared to the dirty bitmap way.
Yes, block-commit will produce extra IO.
But regarding incremental backup, when guest IO is performed,
will the corresponding dirty bit be synchronized to qcow2 image simultaneously?No, that would have a huge performance penalty. It will only be synced at shutdown and or periodically, therefore it has the same implications with other cache, such as page cache or block driver metadata cache.
Quoted 2 lines
if no, if source VM is shut-down in non-normal way, like killed by force or by mistake or server poweroff suddenly, some dirty bits maybe lost, then full copy is needed.
Yes, it is a reasonable rule.
Quoted 3 lines
Quoted 1 line
drive-backup is not incremental backup, full copy is needed in every time backup, so it dosen't meet our requirements.
I didn't mean drive-backup already provides incremental backup, but we do need it to implement it (see the patch series posted by John Snow).
Thanks,
Fam
Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to trackdirtysector
Quoted 1 line
Is it worthy to implement it?
Maybe, I think once we start to assign node-name to each BDS in the tree, this will be natural to implement.
Quoted 1 line
And does qemu support commit any external snapshot to its backing file?
Yes.
Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit totrackdirtysector
In reply to Zhang HaoyuQuoted 5 lines · Fam Zheng
Quoted 1 line
Is it worthy to implement it?
Maybe, I think once we start to assign node-name to each BDS in the tree, this will be natural to implement.
Once implemented, to be honest, I really don't see much advantages of
incremental backup over aforementioned mechanism(external snapshot + active block commit), especially, regarding the case of source vm non-normal shutdown, full copy is needed, and corresponding check mechanism is needed too.
I think so much exceptional scenarios are needed to be considered for incremental backup mechanism. Maybe I missed something.
Thanks,
Zhang Haoyu
Quoted 3 lines
Quoted 1 line
And does qemu support commit any external snapshot to its backing file?
Yes.