Increase maximum supported number of read-only threads to 128 #1611
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.
Resolved #1257
A number of PRs have been created to make it possible to increase the maximum allowed number of read-only threads to
128
(see tasks in eosnetworkfoundation/product#149).Specifically,
Set EOS VM OC max mirroring pages to a small number for read-only threads #1488 reserves
10
pages (11
slices) for each read-only thread while keeps528
pages (529
slices) for the main-thread memory. With maximum 128 read-only threads , virtual memory required by OC is15TB
(OC's main thread uses4TB
VM (by529
slices) and the read-only threads use11TB
(128 * 11 * 8GB
)). It is about11.7%
of total VM space in a 64-bit Linux machine (about128TB
).Use a single WASM interface per nodeos (instead of per thread) to save WASM compile time and cache #1549 removes the need of each read-only threads maintaining a separate WASM instantiated module cache. All threads (including the main thread) shares the same cache. This ensures memory used by WASM instantiated module cache does not grow as the number of read-only threads increases.