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

soroban-rpc: Benchmark simulateTransaction endpoint #684

Closed
2opremio opened this issue Jun 7, 2023 · 2 comments
Closed

soroban-rpc: Benchmark simulateTransaction endpoint #684

2opremio opened this issue Jun 7, 2023 · 2 comments
Assignees

Comments

@2opremio
Copy link
Contributor

2opremio commented Jun 7, 2023

We expect the simulateTransaction endpoint to be pretty expensive. Namely because:

  • It accesses the ledger storage (sqlite-based) multiple times
  • It crosses the Go<->Rust boundary multiple times

We already have a few ideas on how to optimize the code (use a write-through cache for the configuration ledger entries, optimize the data serialization stellar/stellar-rpc#49 etc ...) but we should first have a rough idea about how expensive the endpoint is, and where are the bottlenecks.

To do so, it would be interesting to have a benchmark. Such a benchmark is going to be challenging due to the use of CGO and Go<->Rust interfacing so we need to investigate how to carry it out.

A couple of things to take into account:

  • Since IO (DB-access) is involved we should probably benchmark the wall-clock time.
  • Obtaining the CPU bottlenecks of both Go and Rust simultaneously is likely to be pretty hard.
@2opremio
Copy link
Contributor Author

2opremio commented Jun 7, 2023

Here’s an interesting pointer https://groups.google.com/g/golang-nuts/c/CKr1sGrTk98

It may be worth giving https://github.com/ianlancetaylor/cgosymbolizer a try

@2opremio
Copy link
Contributor Author

I created a benchmark which is probably enough for now

@github-project-automation github-project-automation bot moved this from Backlog to Done in Platform Scrum Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants