[SOLVED] dirty/new bitmaps

tonci

Active Member
Jun 26, 2010
66
3
28
I installed PBS and TrueNas as nfs-datastore. Setup went well w/o any issues.
But after 1st full backup , the second/incremental one started with "creating new bitmaps":

INFO: virtio0: dirty-bitmap status: created new
INFO: virtio1: dirty-bitmap status: created new

Fullbackup lasted 16h and this incremental one will last cca 4h

It is obvious that pbs must go through whole vm-image of 1.5T ... The read-speed is about 100 Mibs which is not that "tragic" but why it cannot switch to fast-increment?

After gathering some experience with pbs/nfs combination I still cannot figure out when to expect above scenario vs this one bellow :

INFO: virtio0: dirty-bitmap status: OK (88.0 MiB of 15.0 GiB dirty)
INFO: virtio1: dirty-bitmap status: OK (352.0 MiB of 250.0 GiB dirty)
INFO: virtio2: dirty-bitmap status: OK (48.0 MiB of 32.0 GiB dirty)
INFO: using fast incremental mode (dirty-bitmap), 488.0 MiB dirty of 297.0 GiB total

here, the system knows the difference " in advance " and transfers only that very quickly ....


Once I noticed that running vm's are backed with dirty-maps up and not-running ones with new bitmaps ... ?! ... or maybe I did too few tests ...


What are exactly the situations when dirty-bitmaps cannot be applied ?

Thank you in advance

BR
Tonci
 

mira

Proxmox Staff Member
Staff member
Aug 1, 2018
811
68
33
The dirty bitmaps are only kept as long as the VM is running. Once it is shutdown, everything needs to be read again. But thanks to deduplication only new chunks are sent to the PBS.
 

tonci

Active Member
Jun 26, 2010
66
3
28
Thank you ... all clear !!! ... so shutting down VM and powering it on again "resets" bitmaps ? ... but restart not ?
Ok it makes sense ... it would be ideal if bitmaps were always up-to-date with VM but this is also Ok
 

mira

Proxmox Staff Member
Staff member
Aug 1, 2018
811
68
33
If you reboot inside the VM it should persist, but once the QEMU process is shutdown the dirty-bitmaps are discarded.
 

jonasled

New Member
May 7, 2020
8
6
3
19
Is there a way to keep the bitmap persistent, because I have my backups offiste, which is bandwidth limited to 50mbit. It would be nice if there is a solution to sync only the changes over the network.
 

Cookiefamily

Active Member
Jan 29, 2020
108
28
28
Even if the bitmaps are discarded because you stopped the qemu process it will only transfer chunks that changed and won't use your precious bandwith for unnecessary transfers. The process takes longer but does not use more bandwith.
 

tonci

Active Member
Jun 26, 2010
66
3
28
OK .... it will transfer only the changed blocks ... understood !
but if it has to make dirty-bitmaps again , how does he do that ?
What does it compare ? source<>destination or source<>previous-dirty-bitmap ? If destination has been moved over to another location and connected with slower link this "comparison" could take long time ...

So what does really happen when we poweroff-on VM ? How does it affect the time and bandwith ?
 

Cookiefamily

Active Member
Jan 29, 2020
108
28
28
What does it compare ? source<>destination or source<>previous-dirty-bitmap ? If destination has been moved over to another location and connected with slower link this "comparison" could take long time ...
When backing up the data is split into 4MiB "chunks". These chunks are named after their checksum. It also creates an index file with all the chunks used in that backup.
When it calculated the checksum of a chunk it wants to back up, it gets the indexes of backups it should know of (can't get indexes from other backup groups for privacy reasons). If it matches, no chunk is transmitted. If not, it will transmit the 4MiB chunk. While yes, the transmission of checksums does have some bandwith usage, it is very little.
Please correct me if I'm wrong here @proxmox-Team

but if it has to make dirty-bitmaps again , how does he do that ?
Just starts again from scratch just if it was your first backup. Create a dirty bitmap and keep track of the blocks that change. When the next backup is due, it has a list of blocks that changed and it can do a fast incremental backup again, then reset the dirty bitmap to track the changes for the next backup.

How does it affect the time and bandwith ?
This really comes down to how fast you can read your data, calculate checksums and how much of the disk image has changed.
 

voarsh

Member
Nov 20, 2020
177
6
18
24
Is there an issue for keeping bitmap persistent between restart?
I have an interest in this.
(as a temporary solution, is hibernation a possibility to keep bitmap persistent - assuming no resizing, moving stuff, ec)
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!