VZDump Speed and Size

Guardian

New Member
Apr 18, 2012
2
0
1
Hi,

I am currently experimenting with vzdump, taking snapshots of kvm machines running on lvm containers.
I am seeing strange effects when considering size and speed of the backups.

One of my KVM hosts resides on a 1TB LVM container. The guest FS currently uses ~150GB of space.
When doing a backup, the final backup size is around 250GB (no big difference between lzo and gzip).
Also, even when using only lzo compression, the backup takes around 6-7 hours to complete (no difference between backup to the same HD or to a CIFS share).

Why is the backup file size so much bigger than the FS usage in the guest?
Also, I think the speeds I am getting from vzdump are rather slow.

Are there any tips / tweaks I could try?

Thanks!
 
try to zero out the free space inside the vm and you'll get very small backup archive:


dd if=/dev/zero of=zero.small.file bs=1024 count=102400
dd if=/dev/zero of=zero.file bs=1024
rm zero.small.file
sync ; sleep 60 ; sync
rm zero.file
 
I know this is a very old post, but I'm wondering about the same thing here. I did some other searching an a utility called "zerofree" is designed to do this exact task for ext2, ext3 and ext4 file systems and that dumping zeros into one large file has some big disadvantages.

http://frippery.org/uml/index.html


However, zerofree is recommended to do while the file system is read only, so it is more of an offline tool.

I'm wondering if anyone knows of any other tools or best practices for zeroing an image and keeping it sparse:



As for Static's suggestion above, I'm curious about what the intent is. It seems the commands would do the following:

1. Write 100 MB of zeroes to zero.small.file
2. Write 1KB of zeroes to zero.file
3. Remove the 100 MB file
4. Sync cached writes to storage (twice with a 60 second delay in between)
5. Remove the 1 KB file

Am I missing something here? It seems like you'd want to do step 1 until you run out of disk space (either repeating it or increasing count), then sync to storage, then remove the files created in step and sync to storage again. I don't see any reason for the 1 KB file.
 
  • Like
Reactions: Atila Vasconcelos

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!