Thanks, I have an MPMC queue based on ZMQ_ROUTER/inproc as a broker which works beautifully and without any need for barriers. I'm happy with the performance for relatively low number of P/C and resources. However I did notice that with large number of resources and larger number of workers it does accumulate some latency. I don't have specific results yet to show though. If it uses std:map it should be O(logN) and should be close to the performance for low N of a hash lookup O(1). I will gather need to gather some more data and see what the results are. Also for my app I don't need to handle very large number of workers/resources so it should be ok.
Mark On Tue, Sep 3, 2013 at 12:23 AM, Pieter Hintjens <[email protected]> wrote: > The keys are short numbers. I've not seen a profile of the cost of > using router sockets that shows any hotspots. This would be worth > doing before any real discussion of performance. Otherwise it's just > speculation. > > -Pieter > > On Tue, Sep 3, 2013 at 9:03 AM, Ian Barber <[email protected]> wrote: > > It's a std:map with an optimised key type for comparisons. All be equal, > > shorter should be slightly better, though I can't imagine there's a great > > deal in it. > > > > > > On Tue, Sep 3, 2013 at 2:41 AM, A. Mark <[email protected]> wrote: > >> > >> > >> I hope I'm not asking a redundant question and I haven't the time to > look > >> at the ZMQ source code at the moment. What is the underlying search > method > >> for routing messages internally within ZMQ_ROUTER? Assuming it's a > perfect > >> hash - or at least it's some kind of hashing algo based on identity, I > >> assume using smaller length identity somewhat reduces the overhead of > >> routing? Aside from that I'm wondering is there any other precaution to > take > >> if one wants to have a very tightly bound lowest latency router (broker) > >> over inproc? > >> > >> > >> Any input is appreciated. > >> > >> > >> Mark > >> > >> _______________________________________________ > >> zeromq-dev mailing list > >> [email protected] > >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > > > > > > _______________________________________________ > > zeromq-dev mailing list > > [email protected] > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
