Add treapNode pool. Reduce cloneTreapNode() allocations.#47
Add treapNode pool. Reduce cloneTreapNode() allocations.#47moodyjon wants to merge 3 commits intolbryio:masterfrom
Conversation
…Mutable treap recycle nodes consistently. Rework Immutable treap node recycling attempting to make it safer in the presence of code that takes snapshots (dbCacheSnapshot) of the treap. Add special mutable PutM and DeleteM methods which DB transaction can use to apply changes more efficiently without creating lots of garbage memory.
|
It seems the changes doesn't translate to the performance in terms of sync time, and memory pressure. Note: Currently we, include your contributions, have made a lot efforts to improve performance, and make the user/developer experience much better. And I suspect further tuning would have to involve more deeper and intrusive changes with marginal gain. With limited bandwidth, we're prioritizing functional parity/compatibility with lbrycrd, and help users migrate to lbcd. Check the RPC Availability page, which tracks the full list of bitcoin-core v22.0.0 RPCs. Those with open issues are reported by users that are missing or have different attributes from lbrycrd. If interested, we can discuss more on discord ping me @roylee17 or join #lbcd channel. |
|
I'm OK with closing this. It seems likely that network latency/throughput is the controlling factor. Blocks are processed serially during network sync, using a fraction of one CPU. As long as there is some CPU headroom (e.g. second CPU core), the garbage collector is able to run in a second thread without much effect on network sync time. |
I don't see an #lbcd on the discord server. All I see is a generic #developers. Is there a second server? |
|
Myself is not very familiar with discord yet. But here's the link, see if that works. |
Unbundled from PR #43
See that for usage/testing.
Based on work by @BrannonKing in mem_pressure_try_2 and reduce_memory_pressure.
I am not entirely comfortable with the changes. It's my best attempt to combine original Immutable treap semantics with the way that ffldb/transaction actually wants to use it. I was very successful in reducing temporary allocations, but I'm still not sure it's safe. It could also be fragile if treap is used in different ways in the future.