Bug 1392370 - Enable xz parallel compression on Debian-based docker images. r?gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 18 Jan 2018 15:22:30 +0900
changeset 721975 e4c9ab87e570d18f10cdecb72b277aad6ad3c727
parent 721960 317945930492893676ec9619137cb915cd9273a5
child 746492 46f2cb127e48854a4283c5d833384c171fc6d52e
push id96012
push userbmo:mh+mozilla@glandium.org
push dateThu, 18 Jan 2018 08:02:01 +0000
reviewersgps
bugs1392370
milestone59.0a1
Bug 1392370 - Enable xz parallel compression on Debian-based docker images. r?gps This makes the XZ_OPT environment variable set for every task that runs on those docker images, effectively enabling parallel compression for all of them. For e.g. the gcc 4.9 toolchain build task, this makes the final compression step take 23s instead of > 3 minutes.
taskcluster/docker/debian7-build/Dockerfile
taskcluster/docker/toolchain-build/Dockerfile
--- a/taskcluster/docker/debian7-build/Dockerfile
+++ b/taskcluster/docker/debian7-build/Dockerfile
@@ -17,16 +17,17 @@ VOLUME /builds/worker/tooltool-cache
 
 # Set variable normally configured at login, by the shells parent process, these
 # are taken from GNU su manual
 ENV HOME=/builds/worker \
     SHELL=/bin/bash \
     USER=worker \
     LOGNAME=worker \
     HOSTNAME=taskcluster-worker \
+    XZ_OPT=-T0 \
     DEBIAN_FRONTEND=noninteractive
 
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 RUN for s in debian_wheezy debian_wheezy-updates debian_wheezy-backports debian-security_wheezy/updates; do \
       echo "deb http://snapshot.debian.org/archive/${s%_*}/20171210T214726Z/ ${s#*_} main"; \
--- a/taskcluster/docker/toolchain-build/Dockerfile
+++ b/taskcluster/docker/toolchain-build/Dockerfile
@@ -17,16 +17,17 @@ VOLUME /builds/worker/tooltool-cache
 
 # Set variable normally configured at login, by the shells parent process, these
 # are taken from GNU su manual
 ENV HOME=/builds/worker \
     SHELL=/bin/bash \
     USER=worker \
     LOGNAME=worker \
     HOSTNAME=taskcluster-worker \
+    XZ_OPT=-T0 \
     DEBIAN_FRONTEND=noninteractive
 
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 RUN for s in debian_wheezy debian_wheezy-updates debian-security_wheezy/updates; do \
       echo "deb http://snapshot.debian.org/archive/${s%_*}/20171210T214726Z/ ${s#*_} main"; \