-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: switch from "compress/gzip" to more optimal library
One of the largest resource hogs in umoci is compression-related, and it turns out[1] that Go's ordinary gzip implementation is nowhere near as fast as other modern gzip implementations. In order to help our users get more efficient builds, switch to a "pure-Go" implementation which has x64-specific optimisations. We cannot use zlib wrappers like [2] because of issues with "os/user" and static compilation (so we wouldn't be able to release binaries). This very simplified benchmark shows the positive difference when switching libraries (using "tensorflow/tensorflow:latest" as the image base): % time umoci unpack --image tensorflow:latest bundle # before 39.03user 7.58system 0:45.16elapsed % time umoci unpack --image tensorflow:latest bundle # after 40.89user 7.99system 0:34.89elapsed But the real benefit is when it comes to compression and repacking (in this benchmark the changes were installing FireFox and doing a repo refresh): % time umoci repack --image tensorflow:latest bundle # before 78.54user 13.71system 1:26.66elapsed % time umoci repack --image tensorflow:latest bundle # after 51.14user 3.25system 0:30.30elapsed That's almost 3x faster, just by having a more optimised compression library! [1]: golang/go#23154 [2]: https://github.com/vitessio/vitess/tree/v2.2/go/cgzip Signed-off-by: Aleksa Sarai <asarai@suse.de>
- Loading branch information
Showing
42 changed files
with
9,057 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
vendor/github.com/klauspost/compress/flate/crc32_amd64.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.