when building images, do chunk compression in worker thread pool#196
Open
poettering wants to merge 2 commits intosystemd:mainfrom
Open
when building images, do chunk compression in worker thread pool#196poettering wants to merge 2 commits intosystemd:mainfrom
poettering wants to merge 2 commits intosystemd:mainfrom
Conversation
Let's copy in a new version from systemd
…chunks This is a low hanging optimization fruit: when we encode a stream, then pass the chunk compression/storing to a pool of worker threads. This doesn't speed up encoding as much as I hoped, but still: The firefox 63 sources (2.2G) are encoded in 1m16,902s instead of 1m24,281s on my 4 cpu system. i.e. roughly a 10% speed-up.
471c6a4 to
44e578a
Compare
Member
|
On my laptop: So there's On rpi3, I see a detect speedup, 19s→11–14s on /usr/lib/modules/4.19.2-300.fc29.aarch64/kernel/drivers/, and similar speedup on f30-test.fedorainfracloud.org (2 vCPU cloud instance). |
Member
|
Fails with a corrupt stack here: (This is 100% repeatable.) |
Member
|
On a machine with 12 cores: $ rm -rf /tmp/default.castr /tmp/archive.* && time build/casync make /tmp/archive.caidx /usr/lib64/firefox
ccf3d08f975b7be1fc274d798e81293ee3e12deb1922e12b59118beee46cac28
10.39s user 0.32s system 99% cpu 10.763 total
10.48s user 0.28s system 99% cpu 10.822 total
10.58s user 0.31s system 99% cpu 10.957 total
(after)
10.82s user 0.45s system 123% cpu 9.113 total
10.77s user 0.49s system 123% cpu 9.113 total
11.21s user 0.49s system 128% cpu 9.127 totalAgain, a moderate speedup. I guess we could merge this if the crash is figured out. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This gives a 10% speed improvement. (Not more unfortunately, as this just parallelizes the zstd work, but it's the sha512-256 logic that costs the most CPU time, and parallelizing that is much harder)