Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use transparent zstd over HTTP for fetching and exporting packages #77

Open
6 of 9 tasks
stapelberg opened this issue May 29, 2020 · 0 comments
Open
6 of 9 tasks
Assignees
Labels
enhancement New feature or request good-for-stream https://www.twitch.tv/stapelberg

Comments

@stapelberg
Copy link
Member

stapelberg commented May 29, 2020

  • figure out how zstd over HTTP is typically done for maximum compatibility
  • distri export should support this
  • distri HTTP client should support asking for zstd versions
  • zstd-compress all packages of the current release
  • ensure nginx behind repo.distr1.org serves zstd files when asked with the appropriate header, i.e. build https://github.com/tokers/zstd-nginx-module
  • CloudFlare seems to strip Accept-Encoding: zstd right now: https://twitter.com/zekjur/status/1266855979041292290
  • recommend mirror operators support zstd
  • In addition to accept-encoding, we could consider fetching the corresponding .zst file explicitly for squashfs files, perhaps in a happy eyeballs-like scheme. This increases support across the whole landscape, e.g. with mirrors that don’t support accept-encoding yet, or CDNs or proxies etc.
  • we should add a test to verify that zstd is faster :)

This exploration shows how zstd beats both sequential gzip and parallel gzip significantly for decompressing larger packages such as qemu:

We took a few measurements with the respective uncompress tools on stream: https://youtu.be/dLr_6jJ4N7Y?t=4172

  • gunzip: 2.95s (100%)
  • unpigz: 1.50 (50%)
  • unzstd: 0.51s (17%)

…and then measured distri package installation, which confirm zstd’s effectiveness in our use-case:

  • qemu with gzip: 2020/05/30 17:24:30 done, 359.07 MB/s (1149903681 bytes in 3.05s)
  • qemu with zstd: 2020/05/30 17:24:39 done, 603.67 MB/s (1149903681 bytes in 1.81s)
@stapelberg stapelberg added enhancement New feature or request good-for-stream https://www.twitch.tv/stapelberg labels May 29, 2020
@stapelberg stapelberg self-assigned this May 29, 2020
stapelberg added a commit that referenced this issue May 30, 2020
stapelberg added a commit that referenced this issue Jun 5, 2020
stapelberg added a commit that referenced this issue Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-for-stream https://www.twitch.tv/stapelberg
Projects
None yet
Development

No branches or pull requests

1 participant