Skip to content
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

MerkleHashBuilder does not scale #7582

Open
OlegMazurov opened this issue Jul 17, 2023 · 2 comments · May be fixed by #17437
Open

MerkleHashBuilder does not scale #7582

OlegMazurov opened this issue Jul 17, 2023 · 2 comments · May be fixed by #17437
Labels
Performance Issues related to performance concerns. Platform Tickets pertaining to the platform

Comments

@OlegMazurov
Copy link
Contributor

OlegMazurov commented Jul 17, 2023

Description

Running MerkleHashBenchmarks with

./gradlew :swirlds-unit-tests:common:swirlds-common-test:performanceTest --tests com.swirlds.common.test.merkle.MerkleHashBenchmarks

on Mac OS, M1 Max, 10 cores:

Hash Small Trees
--- Synchronous hashing ---
Average time to hash: 6755.819us
--- Asynchronous hashing ---
Average time to hash: 4516.075us
Speedup from multithreading: 1.495949247964217

Hash Large Trees
--- Synchronous hashing ---
Average time to hash: 129295.04us
--- Asynchronous hashing ---
Average time to hash: 79465.64us
Speedup from multithreading: 1.6270559200177586

Hash Huge Trees
--- Synchronous hashing ---
Average time to hash: 1636951.9us
--- Asynchronous hashing ---
Average time to hash: 1012607.2us
Speedup from multithreading: 1.6165714602858838

and on Linux, [email protected], 40 cores:

Hash Small Trees
--- Synchronous hashing ---
Average time to hash: 8906.284us
--- Asynchronous hashing ---
Average time to hash: 13589.714us
Speedup from multithreading: 0.6553694948988624

Hash Large Trees
--- Synchronous hashing ---
Average time to hash: 180144.99us
--- Asynchronous hashing ---
Average time to hash: 192195.66us
Speedup from multithreading: 0.93729998897998

Hash Huge Trees
--- Synchronous hashing ---
Average time to hash: 2334200.6us
--- Asynchronous hashing ---
Average time to hash: 2264936.1us
Speedup from multithreading: 1.0305812159557173

The parallel hashing algorithm actually causes performance degradation on a system with more cores.

Steps to reproduce

Run com.swirlds.common.test.merkle.MerkleHashBenchmarks as above on systems with a different number of cores.

Additional context

No response

Hedera network

other

Version

v0.40.0-SNAPSHOT

Operating system

Linux

@OlegMazurov OlegMazurov added the Performance Issues related to performance concerns. label Jul 17, 2023
@poulok
Copy link
Member

poulok commented Nov 12, 2024

@oleg, is this still valid? I know there have been improvements made to the hashing algorithm since this ticket was written.

@poulok poulok added the Platform Tickets pertaining to the platform label Nov 12, 2024
@OlegMazurov
Copy link
Contributor Author

Yes, though not a high priority.

@OlegMazurov OlegMazurov linked a pull request Jan 18, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Issues related to performance concerns. Platform Tickets pertaining to the platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants