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

validator: Split PoH speed measurement from check #4185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

steviez
Copy link

@steviez steviez commented Dec 19, 2024

Problem

Checking the PoH speed requires a Bank to derive the cluster hash rate. By the time a Bank is available, many services have started up and are competing for CPU time.

Summary of Changes

So, split the PoH speed check. Measure the speed very early on in Validator::new(), and check the value later once a Bank is available

Without the change:

[...] PoH speed check: computed hashes per second 12663376, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15573125, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15448481, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 11727495, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15355731, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15276260, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 12747872, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15319899, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15462806, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15666179, target hashes per second 10000000

With the change:

[...] PoH speed check: computed hashes per second 15842486, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15763624, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15841138, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15354805, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15850004, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15839109, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15842484, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15676336, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15790533, target hashes per second 10000000
[...] PoH speed check: computed hashes per second 15844216, target hashes per second 10000000

As you can see, a lot more variation without this change

Checking the PoH speed requires a Bank to derive the cluster hash rate.
By the time a Bank is available, many services have started up and are
competing for CPU time.

So, split the PoH speed check. Measure the speed very early on in
Validator::new(), and check the value later once a Bank is available
@steviez steviez force-pushed the val_split_poh_speed_check branch from e851f08 to be4ac16 Compare December 19, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant