Open matthewdarwin opened 1 year ago
Turning off merger doesn't make it faster.
Is this limited to Kylin and Telos or does this impact all chains?
I didn't check the others, probably applies to all?
Spend some time debugging this. It seems like:
It seems like the old code is utilizing more heap in favor of less CPU time. I'm not sure how though.
It might also be a possibility to tweak the garbage collector here using GOGC. As it seems like:
doubling GOGC will double heap memory overheads and roughly halve GC CPU cost
Some quick testing on the new code. CPU profiling for a 30s interval reports:
in comparison it's around 7-8s of CPU time on the old code without GOGC tweaking.
So obviously need to do some testing when replaying blocks instead of getting this data in live mode, but we should definitely try this. Will increase memory usage, but this shouldn't be a big issue here I assume.
Just start from a snapshot from a few days ago. Watch the amount of CPU use by firehose and how slow the blockchain syncs forward (3 minutes for every 10 seconds in
blocks
). Without firehose there, the chain runs like 10x faster (30 minutes in 10 seconds). Any optimizations to be made?Note: this is reader+merger running together.