On Tue, Sep 13, 2016 at 12:37 PM, Mateusz Jemielity < [email protected]> wrote:
> Hi, > > > > I have a question about 0MQ’s internal use of zero-copy. > > > > Does 0MQ somehow know that server and client 1 are on the same machine? If > it knew, then it could, for example, use shared memory to transfer the > messages, without actually using tcp stack. > > I guess I could explicitly use ipc transport for processes on same host > and do another bind in the server, but can I do it in such kinda-generic, > single-bind way? > > Pipe level (IPC) use of zero copy features is OS specific and therefore not portable, there is a good thread here where Linus explains features and the issues: https://web.archive.org/web/20130521163124/http://kerneltrap.org/node/6505 Quote: "There's a _huge_ downside to specialized interfaces. Admittedly, splice() is a lot less specialized (ie it works in a much wider variety of loads), but it's still very much a "corner-case" thing. You can always do the same thing splice() does with a read/write pair instead, and be portable." I don't know if 0MQ has flags to enable splice() level optimization or not, but it would be an interesting feature if it did, presumably improving throughput for IPC endpoints by removing the copy and vm bookkeeping requirements as all splice does is increment ref-counts for existing mapped pages. -Michel
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
