[zeromq-dev] Issue 85 & 92
Martin Sustrik
sustrik at 250bpm.com
Sun Oct 17 08:28:16 CEST 2010
On 10/17/2010 08:16 AM, Pieter Hintjens wrote:
> On Sat, Oct 16, 2010 at 7:25 PM, Martin Sustrik<sustrik at 250bpm.com> wrote:
>
>
>> Ack. This means putting atomic op on the critical path (zmq_send) resulting
>> in grave performance impact.
>>
> It requires setting a single bit 'socket terminated' and then checking
> this, there is no need for memory barriers, it's atomic by definition.
> No thread will ever unset that bit again so there'll be no conflicts.
> The terminating thread will be called once in the lifetime of the
> application.
>
> How does this create 'grave performance impacts'?
>
It means synchronisation between CPU cores kicks in, the bus is locked
etc. We are on the critical path here, so every additional nanosecond
impacts the throughput in pretty bad way.
Martin
More information about the zeromq-dev
mailing list