News for hackers. Stuff that matters.
Re:Async Rust in Practice: Performance, Pitfalls, Profiling by scottlamb on Wednesday January 12, 2022 @07:00PM (#29914705)
Nice article. I'm in the process of absorbing it. Question:

> scylla-rust-driver issued at least 1 syscall per query, which might be the source of elevated latency – and with a super-fast network (of which loopback is a prime example) it also means that throughput suffers – a latency of 1ms means that we won’t be able to send more than 1000 requests per second.

Is 1 ms measured? Buffering and reducing syscalls is good, but still: that seems horribly slow for a small or EWOULDBLOCK-returning read/write. Why would it be that bad?

Re:Async Rust in Practice: Performance, Pitfalls, Profiling by enedil on Wednesday January 12, 2022 @07:14PM (#29914874)
I believe this is just an example of what are the implications of 1 query per ms, not indication that it actually took 1 ms.
Re:Async Rust in Practice: Performance, Pitfalls, Profiling by psarna on Wednesday January 12, 2022 @11:49PM (#29916985)
Indeed - 1ms was a nice round number, but it was also not that far from the real, sub-1ms number. But note that by "latency" here I mean not only the round trip, but the total measured time of executing a single request, including the time its task spends in Tokio (and its queues), and until its response is fully processed as well. Since the program sent requests with configurable concurrency set to ~1024 or more, the overall throughput was still satisfying.

On the one hand it was (and still is) concerning that the observed latency per simple request was that high, on the other - it never really came up in our distributed tests, since there the network latency imposes a few milliseconds anyway. When we figure out the real source of this behavior, I'll be happy to describe the investigation process in a blog post (: