As background, I have a couple related services that use async code with the tokio runtime, and the overall throughput just isn't where I would expect it to be. I'm not sure how best to figure out where the performance problems are occurring.
For example, Is there a good way to detect code that is supposed to be async, but instead blocks for a significant amount of time? I've read about the proposal to add a "may_block" attribute to help warn of problems at compile time, but I am also interested in analyzing the runtime behavior of my code to see where it might be blocking.
Looking for async code that is accidentally blocking seems like the most obvious potential source of performance problems, but perhaps there are other things I should be looking for? What tools should I be using to benchmark and profile my async code?
As background, I have a couple related services that use async code with the tokio runtime, and the overall throughput just isn't where I would expect it to be. I'm not sure how best to figure out where the performance problems are occurring.
For example, Is there a good way to detect code that is supposed to be async, but instead blocks for a significant amount of time? I've read about the proposal to add a "may_block" attribute to help warn of problems at compile time, but I am also interested in analyzing the runtime behavior of my code to see where it might be blocking.
Looking for async code that is accidentally blocking seems like the most obvious potential source of performance problems, but perhaps there are other things I should be looking for? What tools should I be using to benchmark and profile my async code?