[zeromq-dev] O(1) scheduler available

Martin Sustrik sustrik at fastmq.com
Wed Apr 15 11:01:05 CEST 2009

Hi all,

O(1) scheduler for incoming messages was merged into the trunk (SVN 
revision 1348).

Results of testing are similar for all tested scenarios (loopback, 
netowrk etc.).

With old O(n) scheduler latency increases linearly with the growing 
number of idle connections (~10-15us per 1000 connections on 3GHz box).

With new O(1) scheduler the latency is the same no matter how many idle 
connections there are.

It should be noted that there are still two more O(n) schedulers in 0MQ:

1. Scheduler for outgoing messages (in load-balancing messaging style)
2. Scheduler for messages incoming from different queues.

These should be converted to O(1) in the future, however, the issue is 
not that urgent as

1. There is rarely more than 20 load balanced components.
2. There is rarely more than 20 queues single application is receiving 
messages from.


More information about the zeromq-dev mailing list