[zeromq-dev] Delayed message reception problem.

Divya Mohan divya.mohan310 at gmail.com
Wed Apr 17 18:05:19 CEST 2013


Hi Pieter,

"when you have multiple threads, they can get swapped out for arbitrarily
long moments, if another thread is doing heavy work."
- This is a possible scenario but I don't think it's the likely root cause
here.  I have only a single thread, so when ever the process is scheduled
to run this thread will be executed. I had also run the test case without
threads and observed the same delay.

@Asif,
I am directly using ZeroMQ Apis. I have run the testcase through direct
calls to ZeroMQ Apis as well as through my wrapper code. In case of wrapper
code, occurence of delayed messages was more. As Pieter had mentioned
before, this could be because my process is not getting CPU due to some
other process taking up CPU. I am yet to analyse the CPU usage.

>From ZMQ FAQ Section:
"ØMQ creates queues per underlying connection, e.g. if your socket is
connected to 3 peer sockets there are 3 messages queues."
Since ZeroMQ is internally using message queues, delay will be minimized
when using message queues directly. Maybe that is the reason I am not
seeing delays with message queues.

Thanks,
Divya


On Tue, Apr 16, 2013 at 2:26 PM, Pieter Hintjens <ph at imatix.com> wrote:

> On Tue, Apr 16, 2013 at 8:03 AM, Divya Mohan <divya.mohan310 at gmail.com>
> wrote:
>
> > I am looking into different Profiler options to see if I can get the CPU
> > usage. I will check for memory leaks as well.
>
> OK.
>
> > But if its CPU usage issue: Then why am I not seeing it in case of
> message
> > queues . Are there any delays/sleep inside ZeroMq code that could put my
> > process to sleep/suspended state and hence result in this delay?. (I
> tried
> > going through the Zeromq code but couldnt find any such scenario).
>
> There is no sleep or suspend in 0MQ that could put it into this state,
> but when you have multiple threads, they can get swapped out for
> arbitrarily long moments, if another thread is doing heavy work.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130417/8bfe8ef1/attachment.htm>


More information about the zeromq-dev mailing list