Skip to content

Bootstrap dynamic throttle#4215

Merged
clemahieu merged 3 commits intonanocurrency:developfrom
clemahieu:throttle_tuning
Apr 20, 2023
Merged

Bootstrap dynamic throttle#4215
clemahieu merged 3 commits intonanocurrency:developfrom
clemahieu:throttle_tuning

Conversation

@clemahieu
Copy link
Copy Markdown
Contributor

Adds ability for the bootstrap throttle to dynamically change the number of samples it tracks.

The issue with using a fixed number is it doesn't scale as the ledger scales and particularly causes high CPU usage in unit tests or prematurely stops bootstrapping with the live ledger.

This change dynamically changes the number of tracked samples as the ledger grows.

The formula used for selecting the throttle size is config.throttle_coefficient * sqrt(block_count) and the throttle coefficient uses a default value of 16 which is a good fit based on beta and live testing.

clemahieu and others added 2 commits April 19, 2023 15:31
…ber of samples it tracks.

The number of samples to track is computed in proportion to the number of accounts and blocks in the ledger.
This will scale the throttle over time as ledger size adjusts.
@clemahieu clemahieu added this to the V25.0 milestone Apr 20, 2023
@clemahieu clemahieu merged commit 8f0c102 into nanocurrency:develop Apr 20, 2023
@thsfs thsfs added the toml TOML related change label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement toml TOML related change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants