[zeromq-dev] Non-contiguous message thoughts
Martin Sustrik
sustrik at 250bpm.com
Fri Mar 5 14:46:24 CET 2010
Michael Santy wrote:
>
>> At Fri, 05 Mar 2010 09:10:19 +0100, Martin Sustrik wrote:
>>
>> This is possible, if language runtime supports callbacks from foreign
>> thread (to call language code from C). However, handwritten memory
>> management wrapper kills performance. Unless you have to deal with
>> very large messages, it's usually faster just to copy data.
>
> Thanks -- that definitely makes sense. I agree that this would not be
> appropriate for small messages. The messages that I'm considering creating
> are on the order of 200MB and are scattered across a handful of contiguous
> regions of memory.
In that case zero-copy makes sense IMO. As far as I understand the point
where copying becomes problematic is when CPU cache size - which is
couple of MB in most cases - is exceeded.
Martin
More information about the zeromq-dev
mailing list