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
Run file verification and package signature checking in parallel threads #703
Run file verification and package signature checking in parallel threads #703
Conversation
Build librpm with OpenMP support, refactor the file loop to use the indexed rpmfiles objects instead of iterators. On my rusty old laptop, this tends to just slow things down unless things are hot in cache, in which case it roughly halves the running time. Might be worth more on SSD based setup.
If you could provide some script for testing this, I can do some benchmarks. |
Dunno what there is to script. Try 'time rpm -Va' with and without, add "echo 1 > /proc/sys/vm/drop_caches" in between to see what happens with cold caches? |
Hmm, couple of tests are failing:
|
With your PR (with/without dropping caches):
|
And this is without your PR with dropping caches:
|
Just to make sure, these are SSD numbers? |
Yes, one of NVMe devices. One of the fastest you can find in laptops. |
More specifically, |
On my laptop this roughly doubles the runtime with cold cache, and halves it with a hot cache: checking packages on loopback-mounted Fedora-Server-dvd-x86_64-28-1.1.iso image takes about 33s serially and 60s in parallel when cold, and when hot, 20s serially and 10s parallel.
Added parallel signature checking with rpmkeys -K. For spinning disks, the results are (expectedly) quite similar: with cold cache its much slower, with hot cache much faster. |
As for the parallel signature checking, rpmkeys -Kv output is (obviously) busted in parallel mode, fixing that would require more than one or two liner adjustments. So that part too is certainly just for tyre kicking and benchmarking for now. |
Okay so this is not going in at this point no matter what, closing. I'll leave the branch around for the time being though in case people want to play around. |
While we're playing with parallelising things...
On my rusty old laptop, this tends to just slow things down unless
things are hot in cache, in which case it roughly halves the running time.
Might be worth more on SSD based setup, I'd be interested to hear results on such systems.
For now, this is just for giggles and benchmarking, not intended for merging.
Strictly speaking, this depends on PR #701 as we cannot fork while threading.