3 ms·
> forced ?? why shouldn't quick be able to use a udp socket?
by gotbeans 5y ago
> forced
?? why shouldn't quick be able to use a udp socket?
- MichaelMoser123 5y agoyou can do that, if you can to accept the overhead of a system call per outgoing/incoming frame.
- slrz 5y agoYou can always use sendmmsg(2), writev(2) or other iovec-based APIs.
- fanf2 5y agoor use sendmmsg(2) and recvmmsg(2) https://www.man7.org/linux/man-pages/man2/sendmmsg.2.html https://www.man7.org/linux/man-pages/man2/sendmmsg.2.html
- Matthias247 5y agoThose work and will reduce the system call overhead. But testing showed that it isn't actually the main culprit (e.g. you might gain 5% efficiency by going for it). A far bigger bottleneck with the kernel stack is that e.g. the route lookup, iptable rules and similar things will be evaluated per packet - which is taking up most of the time. That will happen independent of you deliver one packet per system call or multiple of those. UDP Generic segmentation offload (GSO - https://lwn.net/Articles/752184/ https://lwn.net/Articles/752184/) reduces that overhead by amortizing all in-kernel and driver operations over batches of datagrams. It makes a far bigger difference in efficiency than purely reducing syscalls (e.g. to +100% efficiency - but it will all depend on the other work the application and QUIC stack does and what drivers support).