[zeromq-dev] epoll spurious events

Ilja Golshtein ilejncs at narod.ru
Tue May 14 14:14:03 CEST 2013


$ dpkg -l | grep zmq
ii  libzmq-dev:amd64       2.2.0+dfsg-2ubun amd64            lightweight messaging kernel (development files)
ii  libzmq1:amd64          2.2.0+dfsg-2ubun amd64            lightweight messaging kernel (shared library)
$ uname -a
Linux ilejn-THINK 3.5.0-27-generic #46-Ubuntu SMP Mon Mar 25 19:58:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/debian_version 
wheezy/sid


14.05.2013, 16:11, "Ilja Golshtein" <ilejncs at narod.ru>:
> Hello, list.
>
> I've wrote fairly simple program to
> check if 0mq socket is usable with external
> eventloop
> http://pastebin.com/St0DJ4jX
>
> We have main thread runs epoll
> for socketpair handle and for a 0mq socket.
> Another thread ('buzzer') writes something
> via 0mq and via socketpair.
>
> I would expect that epoll fires once for
> socketpait and once for 0mq socket,
> while in reality I can see that 0mq shows
> some activity three times
> ==
> $ ./zmq_epoll
> hello from buzzer
> fd=16, j=0 zmq events: EPOLLIN
> sent something via 0mq
> fd=16, j=0 zmq events: EPOLLIN
> 0mq:zmq
> sent something via socketpair
> fd=13, j=0 socketpair events: EPOLLIN
> socket_pair:something
> fd=16, j=0 zmq events: EPOLLIN
> timeout
> timeout
> timeout
> timeout
> timeout
> timeout
> ==
>
> May be I am doing something wrong?
>
> The assumption that two 'extra' events caused
> by connect and close seems wrong
> (at least not all 'extra' events are always caused
> by connect/close things).
>
> My concern is such spurious events
> are harmful from performance point of view.
>
> Explanation (or link to such explanation) of what is going under the hood
> is appreciated.
>
> --
> Best regards
> Ilja Golshtein
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-- 
Best regards
Ilja Golshtein



More information about the zeromq-dev mailing list