Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize in-memory transaction store #1063

Merged
merged 8 commits into from
Nov 6, 2023

Conversation

tsachiherman
Copy link
Contributor

@tsachiherman tsachiherman commented Nov 2, 2023

What

Increasing the transaction retention window would increase the memory utilization.
This optimization helps to reduce that.

Why

Storing the expanded go-XDR in memory could be a memory hog compared to encoded XDR.

Known limitations

The additional encoding during ingestion would slow down the ingestion ( a bit ).
This is a tradeoff in CPU & ingestion time vs memory utilization.

Memory Consumption

Branch Transaction Count Memory
main 10,000,000 22.7 GB
current 10,000,000 8.8 GB

The transaction count of 10M was selected since it aligns with the expected daily transaction volume of 500 transactions per ledger /w roughly 20,000 transactions per day ( 4.32 seconds / ledger )

@tsachiherman tsachiherman self-assigned this Nov 2, 2023
@2opremio
Copy link
Contributor

2opremio commented Nov 3, 2023

Two minor things, otherwise LGTM

@2opremio 2opremio merged commit 87f5a98 into main Nov 6, 2023
22 checks passed
@2opremio 2opremio deleted the tsachi/optimize-transaction-store branch November 6, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants