Thin provisioning vs thick provisioning VM drive and its affect on backups/snapshots size.

rigel.local

Member
Mar 24, 2023
31
5
8
Hi, I have created a dedicated ZFS Mirror storage in Proxmox VE just for VM images. By default Proxmox VE disabled Thin provisioning on this storage. Now, I'm interested how does thin vs thick provisioning affects future backup/snapshot sizes? If for example I create a VM with 500Gb VirtIO SCSI single drive without think provisioning feature, and then use only 200Gb of that space inside the VM. Will the Proxmox backup/snapshot size for this VM be significantly bigger and take longer time for backup/snapshot (in comparison to thin provisioned ZFS storage and Discard feature enabled in VM storage)?

Or maybe Proxmox is aware that 300Gb from the above example is actually free and there is no need to backup/snapshot it?

VM storage: 2 x 1.92TB NVMe SSD 1DWPD SK hynix PE8010

screenshot-2023-06-09-15-08-33@2x.png
(sorry had to blur some parts since I have extremely weird names for hosts and storage)
 
Will the Proxmox backup/snapshot size for this VM be significantly bigger and take longer time for backup/snapshot (in comparison to thin provisioned ZFS storage and Discard feature enabled in VM storage)?
Short: No
Long: The backup size increased if data has been written, that has been deleted, or more likely "marked as deleted", so that there is data but not useful one. In a thin-provisioned setup, the data is initially marked as zeros, whereare in thick it is actually zero. The difference in ZFS between thin and thick is that the space is already "used" for thick, even if it is zero and in thin, the space is not marked as used, so that you can over-provision.
Therefore, you need to overwrite empty space with zeros and do trimming in order to get the maximum out of your thin-provisioned space.

Unfortunately, usage-efficient VM guest settings are not part of any OS yet and need to be done by hand.

Or maybe Proxmox is aware that 300Gb from the above example is actually free and there is no need to backup/snapshot it?
Snapshot only mean to have a copy (ZFS is a Copy-on-Write filesystem) of all pointers to the data laying around and only the new data will require space.
 
  • Like
Reactions: rigel.local
thin provisioning or not has no effect on the resulting backup sizes, the only difference is whether overcommitting storage is possible or not. the only thing that counts for the backup size is that unused space is actually filled with zero bytes or an explicit hole (and that those holes/ranges of zero bytes are big enough to cover full 4MB chunks), as the backup reads the data and skips/deduplicates those. how you achieve the latter depends on the guest OS.
 
  • Like
Reactions: rigel.local

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!