Bug 2091503 - rpmkeys must use all/more available CPU cores instead of one
Summary: rpmkeys must use all/more available CPU cores instead of one
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: libdnf
Version: 39
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-30 06:54 UTC by Artem S. Tashkinov
Modified: 2023-08-16 08:08 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Artem S. Tashkinov 2022-05-30 06:54:24 UTC
When I was upgrading from F35 to F36 I noticed that before updating packages dnf ran some background task which took almost forever vs. previously when this preparation was an order of magnitude faster.

I ran `ps` and noticed this process which was spinning a **single** CPU core:

rpmkeys --checksig --root / --verbose --define=_pkgverify_level signature --define=_pkgverify_flags 0x0 -

I politely request DNF/RPM to be patched to take advantage of multiple CPU cores to speed up this process which on my super fast Ryzen 5800X CPU took several minutes.

Not sure if RPM is the right component for this bug report/feature request. Could be DNF as well.

Comment 1 Panu Matilainen 2022-05-30 08:00:43 UTC
Running on single core and wasting several minutes of your time, oh humanity...
Data loss and similar classifies as "urgent", this is merely a request for optimization.

Dnf has always done a signature check prior to the transaction, but it's apparently calling rpmkeys to do that now, and in the process verifying entire packages instead of just header signatures like in the past. Which rpm will then redo shortly afterwards as a part of its own transaction processing, unless disabled which dnf doesn't seem to be doing (based on quick look). So there's a whole lot more work being done and work that is at least in part redundant. I don't know whether that was an intended consequence of dnf switching to calling rpmkeys, reassigning to dnf for (re-)evaluation.

Parallelizing rpm signature checking in general is a whole other topic which is far from trivial, wont happen anytime soon, and belongs to upstream tracking.

Comment 2 Artem S. Tashkinov 2022-05-30 08:52:46 UTC
(In reply to Panu Matilainen from comment #1)
> Running on single core and wasting several minutes of your time, oh humanity...

LOL, sorry, I just remember this process took a few seconds and now it takes a few minutes.

Actually, it's not a pressing issue at all but at the very least you could show a progress indicator because right now it just says "Preparing" or something for these few minutes and it looks like the whole process is stuck and the PC is frozen with nothing happening at all (since all the downloaded packages are still cached, there's no actual disk activity).

Suit yourself anyways in terms of how to deal with this report, I just wanted to raise my concern.

Comment 3 Ben Cotton 2023-04-25 17:17:35 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 4 Fedora Release Engineering 2023-08-16 08:08:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


Note You need to log in before you can comment on or make changes to this bug.