Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Switch to pigz to support multi-core tar command #3595

Merged
merged 3 commits into from Jul 31, 2020

Conversation

windhamwong
Copy link
Contributor

pigz is a multi-core version of tar, which makes the docker build process much faster.

@nicknezis
Copy link
Contributor

I'm not familiar with pigz. Is the resulting artifact equivalent to a gzip artifact? Does a user need pigz installed to tar -xzf the resulting files? Does that command even still work?

@Code0x58
Copy link
Contributor

A couple of tests to show equivalence for consumers:
With gzip:

$ cat txt 
oink
$ ls
txt
$ pigz txt
$ ls
txt.gz
$ gunzip txt.gz 
$ ls
txt
$ cat txt 
oink

With tar:

$ tar --remove-files --use-compress-program=pigz -cf out.tar.gz txt
$ ls
out.tar.gz
$ tar -zxf out.tar.gz
$ cat txt
oink

@windhamwong
Copy link
Contributor Author

https://zlib.net/pigz/
It is gzip format but with the parallel multi-core feature. The traditional gzip command uses only one core but modern CPU/vCPU has more than one.

@nicknezis
Copy link
Contributor

  1. Have all containers been tested? Do some of them need pigz included in their Dockerfiles?
  2. Should bazel_configure.py be updated to check for pigz if it is an external dependency?
  3. Do any of the website pages need to be updated? For instance brew install pigz for someone compiling on their Mac.

@windhamwong
Copy link
Contributor Author

let me try out all docker builds tomorrow.

@nicknezis nicknezis merged commit 9d4541b into apache:master Jul 31, 2020
@windhamwong
Copy link
Contributor Author

Docker build testing result:
ubuntu18.04 - success
ubuntu20.04 - success
ubuntu16.04 - success
debian9 - fail - python3.6 not supported (unrelated to pigz)
debian10 - fail - protobuf issue (unrelated to pigz)
centos7 - success

nicknezis pushed a commit that referenced this pull request Sep 14, 2020
* Update build-artifacts.sh
* Update build-exec-docker.sh
* Update build-docker.sh
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants