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

Optimise TrieLogPruner.preload #7350

Closed
wants to merge 2 commits into from

Conversation

siladu
Copy link
Contributor

@siladu siladu commented Jul 18, 2024

These optimisations only seem to save <= 17% of the time.

Control node took ~6mins.
Test node took between 5 mins and 5 mins 30 seconds on a couple of runs.


The problem with #7337 is that for the duration of the async load, block import time appears to be affected. This could lead to impaired attestation performance and a missed proposal (although admittedly better than the alternative of downtime).

Ultimately need another PR that used a reasonable timeout for this load+prune operation, maybe 30 seconds.

@siladu
Copy link
Contributor Author

siladu commented Jul 18, 2024

Wall clock profiling of

  • control - dev-clc-bu-tk-mainnet-mainnet-archive-simon-test-snapshot4
  • test - dev-clc-bu-tk-mainnet-mainnet-archive-simon-test-snapshot5

besu_7350_wallclock.tar.gz

@ahamlat
Copy link
Contributor

ahamlat commented Jul 18, 2024

The parallelization didn't work very well. For example , the main thread didn't execute any of the tasks, it was just waiting for the other threads from ForkjoinPool.commonPool, which is not the expected behaviour. The main thread with (numCPU - 1) other threads from ForkjoinPool.commonPool should do the work in a proportional way.
In the profiling, in addition to the main thread, I see also that all the ForkjoinPool.commonPool threads are not used, ex [ForkJoinPool.commonPool-worker-2 tid=37631].
The iterator could be the issue, I think you need to review the way you access database, you don't need RocksDB iterator if you can all the keys.

Signed-off-by: Simon Dudley <[email protected]>

Signed-off-by: Simon Dudley <[email protected]>
…ming keys

Signed-off-by: Simon Dudley <[email protected]>

Signed-off-by: Simon Dudley <[email protected]>
@siladu siladu force-pushed the trie-log-preload-optimisation branch from 8eaf3f9 to d165bda Compare July 18, 2024 22:55
@siladu
Copy link
Contributor Author

siladu commented Jul 26, 2024

Superceded by #7365

@siladu siladu closed this Jul 26, 2024
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.

2 participants