Skip to content

[build] use pigz by default #16959

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

Merged
merged 1 commit into from
May 19, 2024
Merged

Conversation

k-v1
Copy link
Contributor

@k-v1 k-v1 commented Oct 20, 2023

Why I did it

pigz, which stands for parallel implementation of gzip,
is a fully functional replacement for gzip that exploits multiple processors
and multiple cores to the hilt when compressing data.

We can use it for compression instead of gzip to speed up builds.
It reduces build time (especially at final stage where we compress whole file system).

But solution with special option GZ_COMPRESS_PROGRAM is not good,
because it's hard to maintain (developers need to pass this flag to every script).
I think it's better to remove this option at all and use pigz directly where it's possible.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Remove config flag GZ_COMPRESS_PROGRAM
Use pigz directly instead of gzip where it's possible.

How to verify it

I have tested builds with pigz almost 1 year and no issues were detected.
So I think it's better to enable it by default for all builds.
If we found some issues we can always replace pigz with gzip.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

lguohan
lguohan previously approved these changes Nov 16, 2023
@k-v1
Copy link
Contributor Author

k-v1 commented Nov 28, 2023

Fixed for bookworm.

@k-v1 k-v1 force-pushed the use_pigz_by_default branch from ba14623 to c1577f3 Compare December 30, 2023 20:17
@k-v1
Copy link
Contributor Author

k-v1 commented Dec 31, 2023

Rebased and fixed merge conflict.

@k-v1 k-v1 requested a review from lguohan December 31, 2023 01:03
@k-v1
Copy link
Contributor Author

k-v1 commented Jan 9, 2024

@lguohan
Could you help merge this PR?
I want to merge it and continue working on the #17100.

@lguohan lguohan merged commit d31e84a into sonic-net:master May 19, 2024
@k-v1 k-v1 deleted the use_pigz_by_default branch June 24, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants