You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Nayanjyoti Deka <na...@ixigo.com> on 2019/03/24 15:40:47 UTC

FetchConsumer RemoteTime broker metric

Hi,

I have been trying to make sense of the various jmx metrics exposed by the
brokers. Currentl,y I was looking into the FetchConsumer request metrics.
Here are the values I got.
#mbean =
kafka.network:type=RequestMetrics,name=RequestQueueTimeMs,request=FetchConsumer:
999thPercentile = 7.971000000000004;

#mbean =
kafka.network:type=RequestMetrics,name=LocalTimeMs,request=FetchConsumer:
999thPercentile = 0.9710000000000036;

#mbean = kafka.network:type=RequestMetrics,name=*RemoteTimeMs*,request=
*FetchConsumer*:
999thPercentile = *553.913*;

#mbean =
kafka.network:type=RequestMetrics,name=ResponseQueueTimeMs,request=FetchConsumer:
999thPercentile = 9.0;

#mbean =
kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer:
999thPercentile = 545.971;

I was unable to make sense for the mbean
kafka.network:type=RequestMetrics,name=*RemoteTimeMs*
,request=FetchConsumer.

For consumers why is this value non-zero? In the docs, it’s mentioned that
non-zero for produce requests when ack=-1 So for the mbean for fetch
consumer shouldn’t it be 0?

Any pointers would be helpful. I have got a feeling that my understanding
of the metric is somehow wrong and would love some clarity on it.

Thanks.

Re: FetchConsumer RemoteTime broker metric

Posted by 10...@qq.com, 10...@qq.com.

On 2019/03/24 15:40:47, Nayanjyoti Deka <na...@ixigo.com> wrote: 
> Hi,
> 
> I have been trying to make sense of the various jmx metrics exposed by the
> brokers. Currentl,y I was looking into the FetchConsumer request metrics.
> Here are the values I got.
> #mbean =
> kafka.network:type=RequestMetrics,name=RequestQueueTimeMs,request=FetchConsumer:
> 999thPercentile = 7.971000000000004;
> 
> #mbean =
> kafka.network:type=RequestMetrics,name=LocalTimeMs,request=FetchConsumer:
> 999thPercentile = 0.9710000000000036;
> 
> #mbean = kafka.network:type=RequestMetrics,name=*RemoteTimeMs*,request=
> *FetchConsumer*:
> 999thPercentile = *553.913*;
> 
> #mbean =
> kafka.network:type=RequestMetrics,name=ResponseQueueTimeMs,request=FetchConsumer:
> 999thPercentile = 9.0;
> 
> #mbean =
> kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer:
> 999thPercentile = 545.971;
> 
> I was unable to make sense for the mbean
> kafka.network:type=RequestMetrics,name=*RemoteTimeMs*
> ,request=FetchConsumer.
> 
> For consumers why is this value non-zero? In the docs, it’s mentioned that
> non-zero for produce requests when ack=-1 So for the mbean for fetch
> consumer shouldn’t it be 0?
> 
> Any pointers would be helpful. I have got a feeling that my understanding
> of the metric is somehow wrong and would love some clarity on it.
> 
> Thanks.
>
 Hi, this non-zero value for fetch consumer is a normal result. 
There is a Request Purgatory  in Kakfka. Both producer request and consumer request can be added to purgatory:
for producer, as you said the acks=-1, requests will end up with purgatory until leader reveives the acks from follower.
for consumer(fetch), requests will be added to purgatory if there is not enough data to fill the response (fetch.min.bytes parameter) until the time(fetch.wait.max.ms) is reached.
This should be the reason why remoteTime is not zero for fetch consumer.