UdpSocket::recv_from
occupies majority of total cpu time
#6985
-
Hi all, I'm playing around with building my own network protocol over UDP. As part of my POC I had an idea for how to handle socket reads: I briefly profiled the performance of this via flamegraphs & tokio console (I'm running on an m4 macbook pro w/ 10 performance cores. ). The flamegraph screenshot is attached below for a run where I was reading a total of ~500mb where each udp datagram is ~1kb. This was run via the loopback interface. 82% of the usage came from
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This syscall actually just tends to be somewhat slow. You can go faster with recvmmsg: https://man7.org/linux/man-pages/man2/recvmmsg.2.html |
Beta Was this translation helpful? Give feedback.
This syscall actually just tends to be somewhat slow.
You can go faster with recvmmsg: https://man7.org/linux/man-pages/man2/recvmmsg.2.html