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

Add profiler to see memory stats by in-memory storage (eventStore and Txn Store) #9

Closed
psheth9 opened this issue Feb 1, 2024 · 3 comments
Assignees

Comments

@psheth9
Copy link
Contributor

psheth9 commented Feb 1, 2024

What problem does your feature solve?

Currently there is no easy way to find out the impact on memory usage while making changes to in-memory store such as updating retention window or perf improvements

What would you like to see?

memory dump which can be analyzed further by go tool pprof and memory stats like in-use heap and alloc

What alternatives are there?

Run rpc on docker and analyze using linux htop command. (still time consuming when it comes to increasing retention window >= 24hrs)

@psheth9 psheth9 self-assigned this Feb 1, 2024
@stellarsaur stellarsaur transferred this issue from stellar/stellar-cli Feb 1, 2024
@psheth9
Copy link
Contributor Author

psheth9 commented Feb 13, 2024

Memory Usage for txn retention window of 2 hours and 24 hours:

I ran memory profiling code by downloading ledger files using LedgerExporter and used it for ingestion.

A. 2 hour window: 479 MB

image

B. 24 hour window: 907 MB

image

Note: Files from Ledger exporter does not seem to include events, so memory of event store is not contributing heavily for above numbers but still useful to understand the uptick when we increase the Txn retention window from 2 hour to 24 hours.

@ire-and-curses
Copy link
Member

Interesting - why is it that this doesn't increase linearly?

@psheth9 psheth9 linked a pull request Feb 28, 2024 that will close this issue
@psheth9
Copy link
Contributor Author

psheth9 commented Apr 4, 2024

Closing this as we are transitioning from in-memory store to DB with the new design

Context: #115 and the analysis document

@psheth9 psheth9 closed this as completed Apr 4, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Platform Scrum Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants