[zeromq-dev] Multicore Magic
Martin Sustrik
sustrik at 250bpm.com
Mon Apr 26 21:07:17 CEST 2010
Pieter,
> Presumably there is then a way to use shared memory to get full-speed
> message transfer between processes. Martin, does that make sense?
No, there's not. There are multiple problems with shared memory:
1. Control events still have to be transferred via some IPC mechanism
even if message payload is stored in shmem. So there's no way to improve
latency to the level of inproc transport.
2. Allocating shmem is not free. Allocating shmem buffer for each
message would turn to performance bottleneck.
3. It can make sense to allocate message payload in shmem for very large
messages - so large that the cost of copying required by underlying IPC
transport would exceed the cost of allocating shmem buffer.
In the latter case I would suggest allocating the shmem buffer manually
and pass the pointer as a 0MQ message to the other peer.
Martin
More information about the zeromq-dev
mailing list