[zeromq-dev] zmq_poll performance question
Francis Le Bourse
zno-reply-francis.lebourse at sfr-sh.fr
Thu Nov 6 11:28:00 CET 2014
Hi,
I am looking at a performance issue in zmq, when the number of zsockets
/ file descriptors becomes large.
The relevant calls are:
/ poll+0x57//
// zmq_poll+0x2e3//
// zloop_start+0x1e8//
// main+0xb40//
// __libc_start_main+0xfd//
/immediately followed by a loop of
/ poll+0x57//
// zmq::signaler_t::wait(int)+0x33//
// zmq::mailbox_t::recv(zmq::command_t*, int)+0x78//
// zmq::socket_base_t::process_commands(int, bool)+0xbe//
// zmq::socket_base_t::getsockopt(int, void*, unsigned long*)+0x135//
// zmq_getsockopt+0x75//
// zmq_poll+0x3da//
// zloop_start+0x1e8//
// main+0xb40//
// __libc_start_main+0xfd//
/
The code in the loop is executed once per file descriptor in the initial
pollarray, redoing a poll() system call each time.
Is there a reason to proceed that way ?
Would be possible to reuse the results of the first poll() in order to
bypass the second set of system calls ?
Cheers,
Francis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141106/11321673/attachment.htm>
More information about the zeromq-dev
mailing list