You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During this #6131 (comment)@bkchr discovered that the inline_size of the SharedCache balloons to 3GiB when running state_access benchmark and to 1.5GiB if you run the read/write storage benchmarks with asset-hub-westend.
This happens because the size_of of NodeOwned structure is 750 bytes, and when it is used here
The tests ran on state_access benchmarks and on asset-hub-westend showed that we could reduce the used space by a factor of 4 if the array would be dynamically allocated only for the populated children.
We need to be careful here not to fragment the memory with so many small allocation, see #6131 (comment), one idea @bkchr had is to use an arena allocator.
The text was updated successfully, but these errors were encountered:
During this #6131 (comment) @bkchr discovered that the inline_size of the SharedCache balloons to 3GiB when running
state_access
benchmark and to 1.5GiB if you run the read/write storage benchmarks with asset-hub-westend.This happens because the size_of of NodeOwned structure is 750 bytes, and when it is used here
polkadot-sdk/substrate/primitives/trie/src/cache/shared_cache.rs
Line 239 in 57f0b95
The NodeOwned is that big because of this enum variant, which uses a static array of size 16.
The tests ran on state_access benchmarks and on asset-hub-westend showed that we could reduce the used space by a factor of 4 if the array would be dynamically allocated only for the populated children.
We need to be careful here not to fragment the memory with so many small allocation, see #6131 (comment), one idea @bkchr had is to use an arena allocator.
The text was updated successfully, but these errors were encountered: