Module: Mesa
Branch: main
Commit: 784642f773c3ad36c9a1c30721b55cb2c6752cde
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=784642f773c3ad36c9a1c30721b55cb2c6752cde

Author: David Heidelberg <[email protected]>
Date:   Wed Jul 27 13:57:42 2022 +0200

ci: compress LAVA rootfs with zstd instead of gzip

Visible size reduction and minor performance improvement at no cost.

rootfs measure:

```
2022-07-27 11:15:16.235268: 475MB downloaded in 111.59s (4.26MB/s)
2022-07-27 15:07:40.984857: 425MB downloaded in 85.57s (4.97MB/s)
```

So let say approx. 95s vs 85s if we assume 5MB/s, which can bring us
10s speedup...

Acked-by: Guilherme Gallo <[email protected]>
Acked-by: Daniel Stone <[email protected]>
Reviewed-by: Emma Anholt <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17776>

---

 .gitlab-ci/container/baremetal_build.sh | 6 +++---
 .gitlab-ci/container/debian/arm_test.sh | 3 ++-
 .gitlab-ci/container/lava_build.sh      | 7 ++++---
 .gitlab-ci/image-tags.yml               | 2 +-
 .gitlab-ci/lava/lava_job_submitter.py   | 4 ++--
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci/container/baremetal_build.sh 
b/.gitlab-ci/container/baremetal_build.sh
index cd11d6342e4..b617dfc07a0 100644
--- a/.gitlab-ci/container/baremetal_build.sh
+++ b/.gitlab-ci/container/baremetal_build.sh
@@ -12,10 +12,10 @@ else
   
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
 fi
 
-wget ${ARTIFACTS_URL}/lava-rootfs.tgz -O rootfs.tgz
+wget ${ARTIFACTS_URL}/lava-rootfs.tar.zst -O rootfs.tar.zst
 mkdir -p /rootfs-$arch
-tar -C /rootfs-$arch '--exclude=./dev/*' -zxf rootfs.tgz
-rm rootfs.tgz
+tar -C /rootfs-$arch '--exclude=./dev/*' --zstd -xf rootfs.tar.zst
+rm rootfs.tar.zst
 
 if [[ $arch == "arm64" ]]; then
     mkdir -p /baremetal-files
diff --git a/.gitlab-ci/container/debian/arm_test.sh 
b/.gitlab-ci/container/debian/arm_test.sh
index a420dbb47dc..c0968280c17 100644
--- a/.gitlab-ci/container/debian/arm_test.sh
+++ b/.gitlab-ci/container/debian/arm_test.sh
@@ -19,7 +19,8 @@ apt-get install -y --no-remove \
         python3-serial \
         rsync \
         snmp \
-        wget
+        wget \
+        zstd
 
 # setup SNMPv2 SMI MIB
 wget 
https://raw.githubusercontent.com/net-snmp/net-snmp/master/mibs/SNMPv2-SMI.txt \
diff --git a/.gitlab-ci/container/lava_build.sh 
b/.gitlab-ci/container/lava_build.sh
index 776a055a8e9..fb5ce87dae9 100755
--- a/.gitlab-ci/container/lava_build.sh
+++ b/.gitlab-ci/container/lava_build.sh
@@ -112,7 +112,8 @@ apt-get install -y --no-remove \
                    python3-numpy \
                    python3-serial \
                    unzip \
-                   wget
+                   wget \
+                   zstd
 
 
 if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
@@ -238,14 +239,14 @@ fi
 
 du -ah /lava-files/rootfs-${DEBIAN_ARCH} | sort -h | tail -100
 pushd /lava-files/rootfs-${DEBIAN_ARCH}
-  tar czf /lava-files/lava-rootfs.tgz .
+  tar --zstd -cf /lava-files/lava-rootfs.tar.zst .
 popd
 
 . .gitlab-ci/container/container_post_build.sh
 
 ############### Upload the files!
 ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"
-FILES_TO_UPLOAD="lava-rootfs.tgz \
+FILES_TO_UPLOAD="lava-rootfs.tar.zst \
                  $KERNEL_IMAGE_NAME"
 
 if [[ -n $DEVICE_TREES ]]; then
diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml
index 7ab3b2f5e94..ec01a13fcbb 100644
--- a/.gitlab-ci/image-tags.yml
+++ b/.gitlab-ci/image-tags.yml
@@ -15,7 +15,7 @@ variables:
    DEBIAN_X86_TEST_VK_TAG: "2022-07-18-apitrace-11-1"
 
    FEDORA_X86_BUILD_TAG: "2022-04-24-spirv-tools-5"
-   KERNEL_ROOTFS_TAG: "2022-07-06-virgl-update"
+   KERNEL_ROOTFS_TAG: "2022-07-27-rootfs-zstd"
 
    WINDOWS_X64_VS_PATH: "windows/x64_vs"
    WINDOWS_X64_VS_TAG: "2022-06-15-vs-winsdk"
diff --git a/.gitlab-ci/lava/lava_job_submitter.py 
b/.gitlab-ci/lava/lava_job_submitter.py
index 6c3b29b22ec..820aa048e28 100755
--- a/.gitlab-ci/lava/lava_job_submitter.py
+++ b/.gitlab-ci/lava/lava_job_submitter.py
@@ -96,8 +96,8 @@ def generate_lava_yaml(args):
         'url': '{}/{}'.format(args.kernel_url_prefix, args.kernel_image_name),
       },
       'nfsrootfs': {
-        'url': '{}/lava-rootfs.tgz'.format(args.rootfs_url_prefix),
-        'compression': 'gz',
+        'url': '{}/lava-rootfs.tar.zst'.format(args.rootfs_url_prefix),
+        'compression': 'zstd',
       }
     }
     if args.kernel_image_type:

Reply via email to