[zeromq-dev] Shared memory transport (IPC)
ismael.luceno at gmail.com
Fri Nov 20 11:27:46 CET 2009
Martin Sustrik escribió:
> It depends on the size of messages IMO. If what you need to transfer is
> message 1GB long it would obviously make sense to allocate shmem block
> of appropriate size beforehand, fill it in and pass it to the peer process.
> With small messages like market data the above would be suboptimal as
> pinning down the memory would consume much more time than the message
> transfer itself. As 0MQ is designed primarily for small messages, it's
> designed in such a way that it needs no memory pinning while the
> application is doing its work. Instead it pins a single buffer at the
> beginning and copies the messages into the buffer. Note that same trick
> is used in high-perf networking stacks (OpenMX and alike) when doing
> zero-copy. Zero-copy is deliberately avoided for small batches of data
> to get rid of memory pinning overhead.
I didn't explained it well. What we have is exactly that, big data
blocks transferred between processes. So I want to just allocate a big
shared buffer and use it to pass the bulk of data.
The actual messages would take just a few words, so could be, for
example, passed very efficiently by solaris doors (specially on sparc).
So, separating the data from the trigger message is a must.
What Ritesh and Ben want is to integrate this model into ZMQ, so that it
works transparently, and can be used without any major effort from
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: OpenPGP digital signature
More information about the zeromq-dev