Zero-copy network transmission with io_uring
Zero-copy network transmission with io_uring
Posted Jan 13, 2022 1:40 UTC (Thu) by neilbrown (subscriber, #359)In reply to: Zero-copy network transmission with io_uring by al4711
Parent article: Zero-copy network transmission with io_uring
"Zero copy" is a marketing term. A more accurate term would be "reduced copy".
You might image an naive protocol stack where a copy happens when moving from each level to the next. Then the data is copied onto the network fabric, copied off into the destination, and copied back up the stack.
At any stage there is a potential benefit in avoiding the copy (and also a cost, so small messages are likely to be copied anyway).
Encrypt/decrypt may require a copy that would not otherwise be needed - though it may be possible to encrypt-in-place or encrypt-and-copy for one of the unavoidable copies (like copying onto the networking fabric). But that doesn't mean there aren't opportunities to reduce copying when encryption is used.
And also, encryption is not always used, even though it should always be available. On the open Internet, or in the public cloud, encryption is a must-have. In a private machine-room with a private network, there is minimal value in encryption, and there may be great value in reducing latency. In that case, it may be possible and beneficial to eliminate all the memory-to-memory copies ... particularly when an RDMA network fabric is used which allows the receiver to tell the sender when in memory to place different parts on an incoming message.