-
Notifications
You must be signed in to change notification settings - Fork 754
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
subsystem-bench: add emulated network latency for messages and requests coming from local validator #4611
Comments
Thanks for the good observation. It's true, we probably should've used the latency in both directions. Could you explain what we can achieve with higher latency or just latency? It really makes the simulation more realistic. But at the same time it just randomly increases the time inside the calls while awaiting and distorts the result. Considering how random our results are already I would rather compromise the reality for a more stable result. |
It'll allow us to model a real network more closely, which is desireable for finding limitations in our subsystems. For example how many recoveries can we actually process in a block in a realistic case (the same reason we have the rate limiters and connectivity percentages) I would've needed this for example to do some testing for measuring the potential impact of: #3127. I ended up manually hacking something to add a 100ms sleep on each request |
Maybe this makes sense for CI regression checks indeed 👍🏻 but we need the option to add latency for manual simulations |
Then it's worth adding. As I understand it, you'll be using it during development so we can always disable the latency in regression tests. |
I envisioned the peer latency to be the RTT latency so this case should be covered. Looking at the code, it seems that in |
Yeah, I think this should be handled by the proxy, not by every |
also, for notification protocols, they won't always perform a round-trip right? since they're not request-response. In this case we should also have latency for notifications sent by the local validator (AFAICT we don't) |
AFAICT from the code, we're only emulating peer latency when sending a message from an emulated peer to the local node.
We should add latency for sending messages the other way around also (when sending a message from the local node to an emulated peer).
I validated that this is indeed the case by adding a 10s mean latency to the availability recovery bench and there wasn't any impact on performance
The text was updated successfully, but these errors were encountered: