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
The issue starts happening around block height 1.2M (the blocks start getting pretty big).
Steps to identify the issue:
Run melnode under a memory profiler for <1 minute. Make sure to compile it with a profile that has debug symbols turned on (e.g. cargo install --path . --profile release-dbg)
Looking at the flamegraph of memory that was never deallocated (leaked only), we see that get_block created large chunks
get_block uses a cache that had a VERY high limit of objects (100_000) 🤯 Same as the abbr_block_cache.
Lowering these limits to 1000 stabilized the allocation graph as seen below:
Details
As the title says, melnode takes up a lot of memory. After reaching a peak in memory, the program exits and displays "Killed" back.
The first machine:
Exit and display "Killed":
The second machine, I couldn't believe that it was taking up a whopping 50 GB of memory...
It's worth noting that after syncing to the latest block, it doesn't seem to be such a heavy memory hog.
Other information
The environment of the first machine is:
#1 SMP Debian 5.10.162-1 (2023-01-21)
melnode --index-coins --database /var/local/melnode/
The environment of the second machine is:
#1 SMP Debian 5.10.162-1 (2023-01-21)
melnode --index-coins --database /var/local/melnode/ --advertise I.P.V.4:PORT
The text was updated successfully, but these errors were encountered: