forked from josch/mmdebstrap
Use parallel xz compression
One of mmdebstrap benefits over deboostrap is that it is faster. Creating a xz tarball as output will take a lot of time, since xz consumes a lot of compute power and tar uses only one core. Therefore use parallel xz compression since xz supports it using the -T parameter. Closes: #943327 Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
This commit is contained in:
parent
bc423e6ab6
commit
4b82a664da
1 changed files with 5 additions and 0 deletions
|
@ -2403,6 +2403,11 @@ sub main() {
|
||||||
my $exitstatus = 0;
|
my $exitstatus = 0;
|
||||||
my @taropts = ('--sort=name', "--mtime=\@$mtime", '--clamp-mtime', '--numeric-owner', '--one-file-system', '-c', '--exclude=./dev');
|
my @taropts = ('--sort=name', "--mtime=\@$mtime", '--clamp-mtime', '--numeric-owner', '--one-file-system', '-c', '--exclude=./dev');
|
||||||
|
|
||||||
|
# Use parallel xz compression
|
||||||
|
if (defined $tar_compressor and $tar_compressor eq 'xz') {
|
||||||
|
push @taropts, '-Ixz --threads=0'
|
||||||
|
}
|
||||||
|
|
||||||
# disable signals so that we can fork and change behaviour of the signal
|
# disable signals so that we can fork and change behaviour of the signal
|
||||||
# handler in the parent and child without getting interrupted
|
# handler in the parent and child without getting interrupted
|
||||||
my $sigset = POSIX::SigSet->new(SIGINT, SIGHUP, SIGPIPE, SIGTERM);
|
my $sigset = POSIX::SigSet->new(SIGINT, SIGHUP, SIGPIPE, SIGTERM);
|
||||||
|
|
Loading…
Reference in a new issue