Uploaded image for project: 'Coin'
  1. Coin
  2. COIN-1177

Use zstandard (zstd) compression for intermediate artifacts

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • Agent
    • None

    Description

      Coin currently uses parallel gzip for compression. Currently we have builds that produce even 100GB of artifacts, that take more than 5min to compress and timeout. As a result, we resort to not-so-nice hacks, like building the tests in the "Test" workitem, to avoid transfer of artifacts.

      Zstd has several advantages, among which:

      • Always very fast decompression
      • Very configurable compression
        • in the default setting -3 it is much faster than gzip and ratio marginally better.
      • Has many useful tweaks for all speed/ratio needs.
        • For example --long increases the compression ratio a lot, together with the memory requirements.
      • Supports multiple threads natively (just pass -T0 to the command line).
      • Auto-verifies integrity while decompressing, so no extra verification step is needed, like we currently do gzip -t.
      • Binaries can be found for almost every OS.

      I've discussed it extensively with tosaario and there are a couple of potential drawbacks:

      • Integration in golang is dubious.
        • However zstd comes as a mature gzip-like utility and very optimized C library. It might be worth piping the data from golang to the zstd utility while compressing/decompressing. Or just spawning a shell pipeline for the full job, for example curl http://... | zstd -d | tar -xf - for streaming-decompressing-extracting.

      Attachments

        1. image-2024-11-25-14-36-16-904.png
          45 kB
          Dimitrios Apostolou
        2. image-2024-11-25-14-42-12-205.png
          46 kB
          Dimitrios Apostolou
        3. size_vs_time.png
          41 kB
          Dimitrios Apostolou
        4. zoomed_in_chart.png
          45 kB
          Dimitrios Apostolou

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              tosaario Toni Saario
              jimis Dimitrios Apostolou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes