Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
since the main thread has become faster after using sharedStorage , we need more prefetch thread num to make the prefetch is faster than main process.
Rationale
After after adding some metric on prefetch therad , the metric shows that the prefetcher with two threads has 5-20% faster than main process while prefetcher with three threads has become 20-40% faster than main process .
The yellow line is using 3 thread
Performance
The two test machine is on AWS , the two nodes has worked in fullsync mode and has caught up to the latest block
The cost of process a block show that the processing cost of main process with three prefetch threads has become 3%-10% faster than two prefetch threads
Compare to the processing cost of main process prefetcher with 3 thread and 4 thread , the cost of process a block is nearly same , so 3 thread is enough for prefetcher
Changes
Notable changes: