Dear Charles,

this page notes that the creation of the message itself is guaranteed not to 
cause a copy operation.

It does not, however, say anything about moving the message from one socket to 
the other, and about the behavior of zmq_recvmsg.

(My question is thus if the zero-copy guarantee applies to the whole chain of 
operations.)

Thank you,
Wenzel

> On Jan 16, 2016, at 5:20 PM, Charles Remes <[email protected]> wrote:
> 
> Look at this man page:
> 
> http://api.zeromq.org/3-2:zmq-msg-init-data 
> <http://api.zeromq.org/3-2:zmq-msg-init-data>
> 
> Zeromq does zero copy.
> 
> However, before you go and write a bunch of complex code, just use the normal 
> facilities first and benchmark it. You may not need to do this extra work.
> 
> 
>> On Jan 16, 2016, at 10:13, Wenzel Jakob <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hello all,
>> 
>> I’m interested in using ZeroMQ to build a multithreaded application which 
>> uses INPROC transport to propagate messages between threads.
>> 
>> My plan was to send messages using zmq_sendmsg (created using 
>> zmq_msg_init_data with a custom deallocator), and to receive messages, I was 
>> planning to use zmq_recvmsg.
>> 
>> I’m concerned if INPROC will perform unnecessary copies of messages, which 
>> can be very large in my application (i.e. hundreds of megabytes). In 
>> principle, it should just be possible to do it without copies by just moving 
>> zmq_msg_t* from the inproc socket of one thread to that of the other — 
>> however, I am not familiar enough with the implementation of ZeroMQ to know 
>> if that is indeed what happens. Can anyone here advise?
>> 
>> Thank you in advance for your help!
>> 
>> Best regards,
>> Wenzel
>> _______________________________________________
>> zeromq-dev mailing list
>> [email protected] <mailto:[email protected]>
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to