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
gnovm/pkg/gnolang: Allocator invokes NewBlock seemingly with the same blocks too many times and consumes more than 127.94GB of RAM just to run TestStdlibs
#3487
Open
odeke-em opened this issue
Jan 12, 2025
· 1 comment
Without too much I highly suggest that if we can, let's get more creative and perhaps cache nodes with the same fingerprints if necessary which would massively speed up Gno and even reduce the memory bloat. I feel like this would be a great win for the launch and getting production ready.
Keep in machine a way to cache Block with the same BlockNode and parent (useful for functions being repeatedly called, as is the case for the stdlib tests)
Move Block.Blank to a static value, so it doesn't occupy space when allocating a node.
sync.Pool of []TypedValue (always zeroed in, possibly of fixed size, like 32)
Thank you for reporting this, I've known it for a while and it's annoying.
I noticed this while auditing and investigating to try to figure out why so much memory was being consumed by TestStdlibs
which has this tree
Fingerprinting to prove the theory about being heavy handed with allocations
I decided to fingerprint the results of NewBlock and alas they were alarming
Prints
Suggestions
Without too much I highly suggest that if we can, let's get more creative and perhaps cache nodes with the same fingerprints if necessary which would massively speed up Gno and even reduce the memory bloat. I feel like this would be a great win for the launch and getting production ready.
Kindly cc-ing @n2p5 @petar-dambovaliev @jaekwon @moul @thehowl @notJoon
The text was updated successfully, but these errors were encountered: