[zeromq-dev] LMAX/Distruptor code project
Steven McCoy
steven.mccoy at miru.hk
Thu Oct 6 19:59:44 CEST 2011
On 6 October 2011 12:26, Martin Sustrik <sustrik at 250bpm.com> wrote:
> On 10/06/2011 06:15 PM, Steven McCoy wrote:
>
>> On 6 October 2011 12:02, Francois Saint-Jacques <fsaintjacques at gmail.com
>> <mailto:fsaintjacques at gmail.**com <fsaintjacques at gmail.com>>> wrote:
>>
>> IMHO, considering the fact that zmq is already using pre-allocated
>> arrays in yqueues and that it's a 1-producer/1-consumer scenario, I
>> don't think you will get a performance boost by using the disruptor
>> pattern.
>>
>
> That's my feeling as well, however, if anyone wants to try it, go for it.
>
> One possible benefit would be to offload the maintenance of the lock-free
> algos to the separate project and thus take advantage of the
> development/patches done by unrelated 3rd parties.
>
>
> The only low level details that are different would be cache line
>> padding, such that the following would probably help:
>>
>
> Didn't Martin try this already?
>>
>
> Yes. We've tried that. Nobody was able to demostrate any improvement in
> performance though, so we haven't applied the patch.
>
>
Ok, I think on the order of latency the following seems to apply:
blocking vs. non-blocking readers & writers >> CAS vs. lock; xadd >> cache
line flapping.
All the Disruptor tests are blocking threads, ØMQ Pipe uses non-blocking,
ØMQ YPipe uses CAS, and ØMQ YQueue overlaps cache lines.
So unless all of ØMQ is turned pro-actor with a thread per pipe model and
additional buffers it would appear a limited venture. I doubt it would be
lightweight any more afterwards either.
--
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111006/d70d613a/attachment.htm>
More information about the zeromq-dev
mailing list