[zeromq-dev] Is 0MQ truly zero-copy?

John Lång john.lang at mykolab.com
Fri Jun 4 11:39:28 CEST 2021


If I'm using, say TCP, is 0MQ really able to guarantee zero-copy message 
transmission? (As an anecdote, somebody once told me that the 0 in 0MQ 
means zero-copy. I don't know if this is true or not.) I recall reading 
from some article that an OS/kernel/driver internally copies (possibly 
multiple times) whatever data is given to it through its TCP API. 
Wouldn't a zero-copy messaging system need to bypass the OS TCP/IP 
stack? I think if we're relying on an operating system, then zero-copy 
at userland is the best we could hope for.

I see that there are some threads on RDMA. Wikipedia suggests that RDMA 
might be able to deliver a true zero-copy solution. On the other hand, 
I've been told that RDMA can be both a safety and a security risk not to 
mention that it's hard to use right. Using RDMA might not be worth the 
risk and effort for most applications. I'm not requesting RDMA support, 
I'm just curious about the concept of zero-copy...


More information about the zeromq-dev mailing list