pyquarkchain icon indicating copy to clipboard operation
pyquarkchain copied to clipboard

use tracemalloc and vmprof to track mem usage

Open qcdll opened this issue 6 years ago • 3 comments

FYI purpose, not going to merge at the moment

qcdll avatar Dec 07 '18 04:12 qcdll

in the end, tracemalloc's compare_to() in snapshot helped identify the root cause of memory leak in #252

we can use this PR in the future if memory issue arises again

qcdll avatar Dec 07 '18 18:12 qcdll

in addition to objgraph, tracking size of objects:

slave.add_block_futures
shard.state.new_block_pool
shard.add_block_futures
shard.state.db.m_header_pool
shard.state.db.m_meta_pool
shard.state.db.x_shard_set
shard.state.db.r_header_pool
shard.state.db.r_minor_header_pool
shard.state.db.height_to_minor_block_hashes

qcdll avatar Dec 13 '18 02:12 qcdll

looks shard.state.db.height_to_minor_block_hashes has steady increase over time but the count is not out of ordinary, will revisit with new testnet 23

qcdll avatar Dec 13 '18 07:12 qcdll