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

Investigate slow block queries and insertions #763

Closed
Mirko-von-Leipzig opened this issue Mar 25, 2025 · 4 comments
Closed

Investigate slow block queries and insertions #763

Mirko-von-Leipzig opened this issue Mar 25, 2025 · 4 comments
Assignees
Milestone

Comments

@Mirko-von-Leipzig
Copy link
Collaborator

See #657 (review)

Run the account generation again first for 100K accounts (to compare with prior results) and then for 1M accounts to see if the results @igamigo got were representative.

Regarding the results, if these were in fact representative, we should create an issue to investigate what exactly is driving the performance. The database is not that huge (i.e., 2.5GB) and so, it shouldn't be taking ~800ms to retrieve block inputs or 1 - 2 seconds to insert a block.

@TomasArrachea
Copy link
Collaborator

I ran the seed-store for 100k and 1M accounts and got somewhat better results.

@bobbinth
Copy link
Contributor

Nice! Thank you! So basically, block insertion goes from ~200ms when the database is empty to ~400ms when we have 1M accounts in it (and GetBlockInputs goes from 15 ms to 120ms). These numbers look much more reasonable - so, we probably don't need to spend more time on this now, but we should definitely investigate this more in the future.

So, maybe we close this issue and create another one specifically for optimizing block insertion and block input retrieval.

@bobbinth
Copy link
Contributor

we should definitely investigate this more in the future.

I think the target we should aim for is when the DB has 100M accounts, block insertion should be around 200ms, and GetNoteInputs should be around 50ms.

btw, assuming 5-second block, this throughput corresponds to about 50 TPS, or for 3-second blocks this would be ~85 TPS.

@Mirko-von-Leipzig Mirko-von-Leipzig changed the title Investigate slow in block queries and insertions Investigate slow block queries and insertions Mar 27, 2025
@TomasArrachea
Copy link
Collaborator

Superseeded by #777

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

No branches or pull requests

3 participants