vzdump, different compression schemes

obrienmd

Member
Oct 14, 2009
109
0
16
Could vzdump be modified to allow for a different compression binary, other than gzip? Ideally, allow for any binary (as long as stdin is supported) and options in the vzdump config file. I'd really like to make use of some of the more modern / advanced compression schemes now available, specifically some of the multithreaded ones. The gzip process pegs one of the cores on our extremely fast Core i7 right now, getting rid of that bottleneck would be great!
 
Could vzdump be modified to allow for a different compression binary, other than gzip? Ideally, allow for any binary (as long as stdin is supported) and options in the vzdump config file. I'd really like to make use of some of the more modern / advanced compression schemes now available, specifically some of the multithreaded ones. The gzip process pegs one of the cores on our extremely fast Core i7 right now, getting rid of that bottleneck would be great!
Specifically, pigz support would be awesome - it's even in the Debian Sid repositories.
 
OK, tried this the simple way by installing pigz from debian repositories (aptitude did not work, had to download sid 64-bit dpkg, probably don't have the right repository turned on or something). After install, I renamed /bin/gzip to /bin/gzip.old, and made a symbolic link from /bin/gzip to the pigz binary.

This fails because vzdump apparently calls gzip with the -R option, which (because it is not yet supported in pigz) errors out pigz.

So, couple of questions:
1) Is there an non-obvious reason, other than rsyncing is more efficient (which we do not use in our backup transfer routines anyway), that the -R option is used for gzip in vzdump?
2) If not, how can I remove this option? I browsed through the vzdump script, but did not see gzip called and don't know perl, so gave up.
 
1) Is there an non-obvious reason, other than rsyncing is more efficient (which we do not use in our backup transfer routines anyway), that the -R option is used for gzip in vzdump?

it is used because many people use rsync.

2) If not, how can I remove this option? I browsed through the vzdump script, but did not see gzip called and don't know perl, so gave up.

If you don't know perl, you should learn it - or what is the question?
 
The gzip process pegs one of the cores on our extremely fast Core i7 right now, getting rid of that bottleneck would be great!

Do you really want the backup to use all available cores for compression? Most people do not want that.
 
Do you really want the backup to use all available cores for compression? Most people do not want that.

I would like to be able to specify, ideally (as pigz allows) - but yes, all available cores would be great. It would be unlikely to use 100% of all cores, of course.

Also, WRT your last question in the previous response, I'm asking how to modify the command line where vzdump calls gzip, so I can remove the -R for now. Good suggestion, to learn PERL, though :)
 
I would like to be able to specify, ideally (as pigz allows) - but yes, all available cores would be great. It would be unlikely to use 100% of all cores, of course.

Why. If you allow to use all cores it will use all cores. So it is quite likely that the backup will utilize all cores.

Also, WRT your last question in the previous response, I'm asking how to modify the command line where vzdump calls gzip, so I can remove the -R for now. Good suggestion, to learn PERL, though :)

Yes, the suggestion was that you should try to find that yourself ;-)

Anyway, vzdump does not use '-R' at all, instead it uses '--rsyncable'. Its on line 32 of vzdump:

Code:
# by default we set --rsyncable for gzip
$ENV{GZIP} = "--rsyncable" if !$ENV{GZIP};
 

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!