Bug 2314193 - Non-optimal packaging leads to bad performance
Summary: Non-optimal packaging leads to bad performance
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xxhash
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mattias Ellert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-09-23 11:10 UTC by Andreas Rogge
Modified: 2024-10-19 01:18 UTC (History)
1 user (show)

Fixed In Version: xxhash-0.8.2-4.fc42 xxhash-0.8.2-4.fc40 xxhash-0.8.2-4.fc41 xxhash-0.8.2-4.fc39
Clone Of:
Environment:
Last Closed: 2024-10-03 15:50:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andreas Rogge 2024-09-23 11:10:50 UTC
I found two issues here:

1. build flags
xxHash adds -O3 by itself, RPM adds -O2 after that.
This results in binaries that are built with -O2, where -O3 is required for decent performance, which is why xxHash insists on building with -O3 in the first place.

2. DISPATCH=1 set on build, but not in install
xxHash supports dynamic dispatching, i.e. using CPU-level dependant code, on x86_64. While this is enabled in xxhsum and libxxhash, there is no way to consume this feature, as the xxh_x86dispatch.h header is missing from xxhash-devel.
Basically the "make install" also needs DISPATCH=1 to install the header.

Reproducible: Always

Steps to Reproduce:
1. Build a test-program consuming xxhash using the packages library
2. Build the same program using a bundled xxhash
3. Measure runtime of both programs
Actual Results:  
Speed of 1. is two times slower than 2.

Expected Results:  
Speed of the build from 1. should be in the ballpark of 2.

I measured on an Intel i7-7820HQ.
While -O3 doesn't provide huge gains if dispatching is enabled, it is probably worth having for non-x86 platforms.

Comment 1 Andreas Rogge 2024-09-25 16:04:20 UTC
I created a pull-request to package the headerfile.
I currently have no idea how to fix the -O2 vs -O3 issue though.

Comment 2 Fedora Update System 2024-10-03 14:11:06 UTC
FEDORA-2024-3e3e517b53 (xxhash-0.8.2-4.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-3e3e517b53

Comment 3 Fedora Update System 2024-10-03 15:42:23 UTC
FEDORA-2024-3d8c04544c (xxhash-0.8.2-4.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-3d8c04544c

Comment 4 Fedora Update System 2024-10-03 15:42:23 UTC
FEDORA-2024-e55072091c (xxhash-0.8.2-4.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e55072091c

Comment 5 Fedora Update System 2024-10-03 15:42:25 UTC
FEDORA-2024-3c4e7ae2ea (xxhash-0.8.2-4.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-3c4e7ae2ea

Comment 6 Fedora Update System 2024-10-03 15:50:42 UTC
FEDORA-2024-3e3e517b53 (xxhash-0.8.2-4.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2024-10-04 01:41:03 UTC
FEDORA-2024-3c4e7ae2ea has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-3c4e7ae2ea`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-3c4e7ae2ea

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-10-04 02:18:35 UTC
FEDORA-2024-3d8c04544c has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-3d8c04544c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-3d8c04544c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-10-04 02:57:02 UTC
FEDORA-2024-e55072091c has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-e55072091c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-e55072091c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2024-10-06 02:11:42 UTC
FEDORA-2024-3c4e7ae2ea (xxhash-0.8.2-4.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2024-10-08 02:02:30 UTC
FEDORA-2024-e55072091c (xxhash-0.8.2-4.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2024-10-19 01:18:56 UTC
FEDORA-2024-3d8c04544c (xxhash-0.8.2-4.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


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