atree icon indicating copy to clipboard operation
atree copied to clipboard

Optimize atree to reduce Flow's mtrie size and reduce number of reads

Open fxamacker opened this issue 2 years ago • 1 comments

Issue To Be Solved

I opened private issue on July 7, 2022 with more details:

  • https://github.com/dapperlabs/flow-go/issues/6320 and other PRs

Suggested Solution and Implementation

  • https://github.com/onflow/atree/pull/342

Solution requires changes to onflow/atree, onflow/cadence, onflow/flow-go, and data migration.

See also:

  • https://github.com/dapperlabs/flow-go/issues/6320
  • https://github.com/onflow/flow-go/issues/1744
  • https://github.com/onflow/cadence/issues/1854

Estimated Results

Impact on memory and storage size

image

image

Impact on payload count and node count

image

image

fxamacker avatar Mar 03 '23 16:03 fxamacker

Complete TPS throughput test before closing:

Test 1 - non-inlined state

  • [ ] Spin up an EN
  • [ ] remove exec results for ~100K blocks
  • [ ] re-execute blocks on a non-inline state - capture TPS + block exec time

Test 2 - atree-inlined state

  • [ ] migrate the state with Atree inlining
  • [ ] remove exec results for ~100K blocks
  • [ ] re-execute blocks on a atree-inlined state - capture TPS + block exec time

Doc that contains necessary steps: https://www.notion.so/flowfoundation/Execution-Fork-Handbook-a8b70533978c44c5963bc68af99a536d

j1010001 avatar May 23 '24 16:05 j1010001

@j1010001 thanks again for providing testnet memory reduction screenshot we can share on GitHub!

  • atree smoke tests completed 517 hours with no problems (I manuallly stopped it last week)
  • I also manually compared diff-states results (1.8GB JSONL report) after reexecuting 1,000 blocks
    • https://discord.com/channels/613813861610684416/1108968095982293002/1266058761412280341
  • these are in addition to check-storage command showing no problems on testnet data after spork

Closing this as completed. Please re-open if needed! :pray:

fxamacker avatar Aug 29 '24 16:08 fxamacker