Re: [zeromq-dev] Delay in receive by SUB from PUB

2016-03-14 Thread Navneet Kumar
Yes, I thought about that and did a profiling with "net/http/pprof".
The GC pauses are no more than 20ms at a time and usually 1-5ms.

On Mon, Mar 14, 2016 at 2:51 PM, Aaron Sokoloski <asokolo...@gmail.com>
wrote:

> Hi Navneet, since you are using Go, is it possible that it has something
> to do with garbage collections pauses?
>
> Recent versions of Go pause for much shorter times, but if you're using an
> old version it might easily stop that long to do GC.
>
> Cheers,
> Aaron
>
>
> On 14 March 2016 at 01:06, Navneet Kumar <navneet@gmail.com> wrote:
>
>> Hi Jeff
>>
>> Can you please elaborate on the "over-comsume" part.
>> I am using zmq4 Go library https://github.com/pebbe/zmq4
>>
>>
>> On Sat, Mar 12, 2016 at 6:37 PM, Jeff Shanab <jsha...@jfs-tech.com>
>> wrote:
>>
>>> I have seen this when I make a mistake and over-consume from the
>>> publisher on multipart messages. the subscriber then blocks.
>>> In my case the next message eventually comes along and things resume,
>>> but out of sync.
>>>
>>> To avoid this I created a small class that recvies the entire multipart
>>> message then it either has or has not enough "frames."
>>> I separated my interpretation of the frames from their recv.
>>>
>>> On Fri, Mar 11, 2016 at 6:39 AM, Navneet Kumar <navneet@gmail.com>
>>> wrote:
>>>
>>>> Hello everone
>>>>
>>>> I am building a pubsub, wherein the PUB and the SUB socket are on the
>>>> same host.
>>>> I am able to send lots of messages through it. The latency of the
>>>> system is around 2-50 ms.
>>>>
>>>> But out of blue some messages get stuck for 5-6 seconds before
>>>> receiving.
>>>> I have put the logs and added timestamps to the message itself.
>>>> The publisher publishes and sets the time stamp, the subscriber
>>>> timestamp has a
>>>> difference of 5-10 seconds. This occurs for roughly 1 in 1000 messages.
>>>>
>>>> I am using aws c4.xlarge machine. I tried ss and there were few blips
>>>> in the recv and send queue.
>>>> If i am sending lots of messages in bulk then it sometimes get stuck
>>>> and the resumes, with no
>>>> messages being lost. Sometimes a single message itself without any
>>>> other load gets stuck.
>>>>
>>>> Has anyone faced such a scenario or give any pointers to look.
>>>>
>>>>
>>>>
>>>> --
>>>> Navneet Kumar
>>>>
>>>> ___
>>>> zeromq-dev mailing list
>>>> zeromq-dev@lists.zeromq.org
>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>
>>>>
>>>
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>>
>>
>>
>> --
>> Navneet Kumar
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>


-- 
Navneet Kumar
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Delay in receive by SUB from PUB

2016-03-14 Thread Navneet Kumar
Hi Jeff

Can you please elaborate on the "over-comsume" part.
I am using zmq4 Go library https://github.com/pebbe/zmq4


On Sat, Mar 12, 2016 at 6:37 PM, Jeff Shanab <jsha...@jfs-tech.com> wrote:

> I have seen this when I make a mistake and over-consume from the publisher
> on multipart messages. the subscriber then blocks.
> In my case the next message eventually comes along and things resume, but
> out of sync.
>
> To avoid this I created a small class that recvies the entire multipart
> message then it either has or has not enough "frames."
> I separated my interpretation of the frames from their recv.
>
> On Fri, Mar 11, 2016 at 6:39 AM, Navneet Kumar <navneet@gmail.com>
> wrote:
>
>> Hello everone
>>
>> I am building a pubsub, wherein the PUB and the SUB socket are on the
>> same host.
>> I am able to send lots of messages through it. The latency of the system
>> is around 2-50 ms.
>>
>> But out of blue some messages get stuck for 5-6 seconds before receiving.
>> I have put the logs and added timestamps to the message itself.
>> The publisher publishes and sets the time stamp, the subscriber timestamp
>> has a
>> difference of 5-10 seconds. This occurs for roughly 1 in 1000 messages.
>>
>> I am using aws c4.xlarge machine. I tried ss and there were few blips in
>> the recv and send queue.
>> If i am sending lots of messages in bulk then it sometimes get stuck and
>> the resumes, with no
>> messages being lost. Sometimes a single message itself without any other
>> load gets stuck.
>>
>> Has anyone faced such a scenario or give any pointers to look.
>>
>>
>>
>> --
>> Navneet Kumar
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>


-- 
Navneet Kumar
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Delay in receive by SUB from PUB

2016-03-11 Thread Navneet Kumar
Hello everone

I am building a pubsub, wherein the PUB and the SUB socket are on the same
host.
I am able to send lots of messages through it. The latency of the system is
around 2-50 ms.

But out of blue some messages get stuck for 5-6 seconds before receiving.
I have put the logs and added timestamps to the message itself.
The publisher publishes and sets the time stamp, the subscriber timestamp
has a
difference of 5-10 seconds. This occurs for roughly 1 in 1000 messages.

I am using aws c4.xlarge machine. I tried ss and there were few blips in
the recv and send queue.
If i am sending lots of messages in bulk then it sometimes get stuck and
the resumes, with no
messages being lost. Sometimes a single message itself without any other
load gets stuck.

Has anyone faced such a scenario or give any pointers to look.



-- 
Navneet Kumar
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Multi subscribe and single unsubscribe

2016-02-11 Thread Navneet Kumar
Hello everyone,

I was testing with PUB-SUB and found that
When I subscribe to a topic twice, then unsubscribe once,
and again subscribe I receive all messages.
Messages queued at the PUB when I unsubscribed only once.

However if I unsubscribe twice or subscribe only once and unsubscribe once.
I will get messages only after the next subscribe.

I wanted to know the internal mechanism of how the PUB handles
multiple subscribe and unsubscribe messages and when does it
queue messages for the client.


Thanks
-- 
Navneet Kumar
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev