-
"Copy avoidance is not a free lunch. As implemented, with page pinning, it replaces per byte copy cost with page accounting and completion notification overhead. As a result, MSG_ZEROCOPY is generally only effective at writes over around 10 KB." |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's also applies to
The math is different with io_uring, with UDP and all features I had parity with non zc at around 2K. The main performance pain there is notifications, but since my last testing I added some smartness to the CQE waiting side, so with good batching it might go under 2K. In any case, I'd recommend to always experiment and see what works in your setup. |
Beta Was this translation helpful? Give feedback.
That's also applies to
SEND[MSG]_ZC
as well. There is no page pinning when used with registered buffers (seeIORING_RECVSEND_FIXED_BUF
, not yet available for themsg
version), but additional overhead on notifications is still there.The math is different with io_uring, with UDP and all features I had parity with non zc at around 2K. The main performance pain there is notifications, but since my last testing I added some smartness to the CQE waiting side, so with good batching it might go under 2K. In any case, I'd recommend to always experiment and see what works in your setup.