Use recvmmsg instead of recvfrom for udp message receiving for improved performance.
I suggest using socket2 alongside the code in this issue rust-lang/socket2#493, replace the existing udp implementation for higher performance on linux. With the easiest way to be using this fork https://github.com/boris-n/socket2/tree/sendmmsg-recvmmsg
On operating systems where recvmmsg is not supported continue to use the current implementation.
See also:
Use recvmmsg instead of recvfrom for udp message receiving for improved performance.
I suggest using socket2 alongside the code in this issue rust-lang/socket2#493, replace the existing udp implementation for higher performance on linux. With the easiest way to be using this fork https://github.com/boris-n/socket2/tree/sendmmsg-recvmmsg
On operating systems where recvmmsg is not supported continue to use the current implementation.
See also: