[zeromq-dev] CPU load while polling 0mq sockets
Sergey Malov
smalov at mdialog.com
Fri Feb 3 20:36:07 CET 2012
Hi,
I have an application using three different 0mq socket types:
- PULL, to receive protocol buffer messages from outside for further
processing,
- PUB, to publish results (in protocol buffer format as well)
- REPLY, to occasionally answer on status query, etc
All sockets are being polled in single cycle. It's a Scala application,
using scala zeromq binding, and 2.1.11 0mq library.
What I observe, being idle this app still utilizes more than 100-120% CPU
on 4-cores linux box (using top utility). Under "idle" I mean that it is
started and polling sockets, but notching is there to pull/publish.
I played with setting timeout (using setTimeout on poller), latest I've set
was to 2000000 microseconds, with no obvious effect on CPU usage. I know
that most of the time it spends polling, since I monitor it with profiler.
Is it normal, such a high CPU utilization? Is there anything wrong with
what I'm doing? Something I should check/set ?
Thanks for any help
Sergey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120203/af6b01c9/attachment.htm>
More information about the zeromq-dev
mailing list