-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
when building images, do chunk compression in worker thread pool #196
base: main
Are you sure you want to change the base?
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
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). |
Fails with a corrupt stack here:
(This is 100% repeatable.) |
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 total Again, a moderate speedup. I guess we could merge this if the crash is figured out. |
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)