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

Characterize relayer throughput #185

Closed
cam-schultz opened this issue Feb 15, 2024 · 1 comment
Closed

Characterize relayer throughput #185

cam-schultz opened this issue Feb 15, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request tests Improving test coverage through unit/e2e tests, etc.

Comments

@cam-schultz
Copy link
Collaborator

cam-schultz commented Feb 15, 2024

Context and scope
The relayer processes Warp messages from separate chains concurrently, but within a single chain messages are processed in serial (see #31). There is therefore a throughput limit per chain that we should mesaure and characterize.

Discussion and alternatives

  • Throughput is very likely network bound, as the application side processing complexity is insignificant compared to the number of network round trips required to relay a message. We should aim to answer the following questions:
    • Is single message relaying in fact network bound?
    • What's the breakdown between network latency and application side processing latency for a single message?
    • What's the minimum and maximum number of sequential network round trips needed to relay a single message?

Open questions
At what load level do concurrent database writes become a bottleneck?

@cam-schultz cam-schultz added enhancement New feature or request tests Improving test coverage through unit/e2e tests, etc. labels Feb 15, 2024
@cam-schultz cam-schultz added this to the Post-Durango fast follows milestone Mar 8, 2024
@cam-schultz cam-schultz moved this from Backlog 🗄️ to In Progress 🏗 in Platform Engineering Group Jun 6, 2024
@cam-schultz cam-schultz self-assigned this Jun 6, 2024
@cam-schultz
Copy link
Collaborator Author

Alongside implementing #31, load testing was performed using https://github.com/ava-labs/as-simulator. The tests were performed on Fuji, and measured on-chain end-to-end Teleporter message latency. At 10 TPS sustained, the measured average latency was ~2seconds, which when considering the per-chain expected time to finality of ~1s, is close to optimal.

The observed bottleneck in raw throughput was due to limits on the number of simultaneous transactions from a single address that AvalancheGo nodes will keep in the mempool before ejecting further transactions. #256 Addresses this corner case.

This round of testing is enough evidence to conclude that the relayer's concurrency model is scalable enough that it will likely not be the bottleneck in an end-to-end cross-chain system. Closing this ticket out as completed. Future profiling and optimization work will be represented by new tickets with more focused target areas.

@github-project-automation github-project-automation bot moved this from In Progress 🏗 to Done ✅ in Platform Engineering Group Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tests Improving test coverage through unit/e2e tests, etc.
Projects
Archived in project
Development

No branches or pull requests

1 participant