Bug 5854 - Investigate sstate package compression improvements
Summary: Investigate sstate package compression improvements
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-02-20 12:01 UTC by Paul Eggleton
Modified: 2023-06-29 16:43 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2014-02-20 12:01:36 UTC
We should look to see if there are any benefits in using xz (LZMA) to compress sstate packages over the current gzip, weighing up not only disk usage but also time to decompress on average hardware (and presumably availability of xz packages on supported host distros as well.)
Comment 1 Paul Eggleton 2015-06-17 09:05:07 UTC
An old, old patch (that was not merged) that relates to this:

http://lists.openembedded.org/pipermail/openembedded-core/2011-December/052656.html
Comment 2 Richard Purdie 2017-09-14 15:20:52 UTC
We did try xz but the issue is the build slow down in generating these.

There is perhaps the idea of a server side process which converted .tgz -> tar.xz. This would mean the code checking sstate servers for multiple different compression types. Or we could have the code just decompress automatically and use a standard extension. Regardless, more thought needed...
Comment 3 Randy MacLeod 2023-06-29 14:49:21 UTC
We switched to zstd.
Comment 4 Randy MacLeod 2023-06-29 16:43:06 UTC
Already changed in October 2021:

sstate: Switch to ZStandard compressor support
This patch switches the compressor from Gzip to ZStandard for ssate cache
files.

Zstandard compression provides a significant improvement in
decompression speed as well as improvement in compression speed and disk
usage over the 'tgz' format in use.  Furthermore, its configurable
compression level offers a trade-off between time spent compressing
sstate cache files and disk space used by those files.  The reduced disk
usage also contributes to saving network traffic for those sharing their
sstate cache with others.

Zstandard should therefore be a good choice when:
* disk space is at a premium
* network speed / resources are limited
* the CI server can sstate packages can be created at high compression
* less CPU on the build server should be used for sstate decompression

Signed-off-by: Henry Kleynhans <hkleynhans@fb.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>



https://git.openembedded.org/openembedded-core/commit/?id=0710e98f40ec7394567ede1f88f7c7bae306b925