Re: AvgRequestLatency metric always zero
Thanks Arshad for the good analysis. How can we go about getting these fixes? Please feel free to raise an improvement task under ZK project issue tracker, URL: https://issues.apache.org/jira/browse/ZOOKEEPER Also, I'd appreciate if you can put a patch to fix it. Probably you can refer how to contribute to the project section, https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute On Fri, Dec 2, 2016 at 3:25 AM, allen chan wrote: > Arshad, > How can we go about getting these fixes? > > > On Thu, Dec 1, 2016 at 12:01 PM, Arshad Mohammad < > arshad.mohamma...@gmail.com> wrote: > > > Hi Alen > > > > AvgRequestLatency 0 implies that on an average time taken by the server > to > > serve a request is less than one milli second. May be it is really 0 or > it > > may be 0.99 ms. > > > > This behaviour is not specific to 3.4.7 and 3.4.9 version but the same > > behaviour is there in all versions > > > > I find two reason whys AvgRequestLatency is almost all the time 0 > > > > 1) Ping requests are counted the most: > > > > AvgRequestLatency is calculated as > > > > AvgRequestLatency=totalLatency/count > > > > Ping requests come very often and complete very fast, these request add > > nothing to totalLatency but add one to count. > > > > 2) Wrong data type is chosen to store AvgRequestLatency: > > > > AvgRequestLatency is calculated and store as the long value instead of > > double vlaue. > > > > > > > > In my opinion ZooKeeper code should be modified to improve this metrics > > > > i) Ping request should be ignored while recording the statistics or at > > least should be configurable whether to ignore or not. If ping request is > > not counted even other metrics will be more meaningful. > > > > ii) AvgRequestLatency should be of double type. > > > > > > > > -Arshad > > > > On Thu, Dec 1, 2016 at 4:50 AM, allen chan > > > wrote: > > > > > Anyone seeing this issue? I am experiencing it on 3.4.7 and 3.4.9 > > > > > > JMX metric name: AvgRequestLatency > > > JMX Location: > > > org.apache.ZooKeeperService:name0=ReplicatedServer_id#, > > > name1=replica.#,name2=[Leader|Follower]:AvgRequestLatency > > > > > > It always has a value of zero. The MaxRequestLatency is non-zero and > > > changes while the AvgRequestLatency always is zero. > > > > > > The zk_avg_latency metric in mntr is also zero. Is this metric not > > tracked > > > anymore? > > > > > > Thanks > > > -- > > > Allen Michael Chan > > > > > > > > > -- > Allen Michael Chan >
Re: AvgRequestLatency metric always zero
Arshad, How can we go about getting these fixes? On Thu, Dec 1, 2016 at 12:01 PM, Arshad Mohammad < arshad.mohamma...@gmail.com> wrote: > Hi Alen > > AvgRequestLatency 0 implies that on an average time taken by the server to > serve a request is less than one milli second. May be it is really 0 or it > may be 0.99 ms. > > This behaviour is not specific to 3.4.7 and 3.4.9 version but the same > behaviour is there in all versions > > I find two reason whys AvgRequestLatency is almost all the time 0 > > 1) Ping requests are counted the most: > > AvgRequestLatency is calculated as > > AvgRequestLatency=totalLatency/count > > Ping requests come very often and complete very fast, these request add > nothing to totalLatency but add one to count. > > 2) Wrong data type is chosen to store AvgRequestLatency: > > AvgRequestLatency is calculated and store as the long value instead of > double vlaue. > > > > In my opinion ZooKeeper code should be modified to improve this metrics > > i) Ping request should be ignored while recording the statistics or at > least should be configurable whether to ignore or not. If ping request is > not counted even other metrics will be more meaningful. > > ii) AvgRequestLatency should be of double type. > > > > -Arshad > > On Thu, Dec 1, 2016 at 4:50 AM, allen chan > wrote: > > > Anyone seeing this issue? I am experiencing it on 3.4.7 and 3.4.9 > > > > JMX metric name: AvgRequestLatency > > JMX Location: > > org.apache.ZooKeeperService:name0=ReplicatedServer_id#, > > name1=replica.#,name2=[Leader|Follower]:AvgRequestLatency > > > > It always has a value of zero. The MaxRequestLatency is non-zero and > > changes while the AvgRequestLatency always is zero. > > > > The zk_avg_latency metric in mntr is also zero. Is this metric not > tracked > > anymore? > > > > Thanks > > -- > > Allen Michael Chan > > > -- Allen Michael Chan
Re: AvgRequestLatency metric always zero
Hi Alen AvgRequestLatency 0 implies that on an average time taken by the server to serve a request is less than one milli second. May be it is really 0 or it may be 0.99 ms. This behaviour is not specific to 3.4.7 and 3.4.9 version but the same behaviour is there in all versions I find two reason whys AvgRequestLatency is almost all the time 0 1) Ping requests are counted the most: AvgRequestLatency is calculated as AvgRequestLatency=totalLatency/count Ping requests come very often and complete very fast, these request add nothing to totalLatency but add one to count. 2) Wrong data type is chosen to store AvgRequestLatency: AvgRequestLatency is calculated and store as the long value instead of double vlaue. In my opinion ZooKeeper code should be modified to improve this metrics i) Ping request should be ignored while recording the statistics or at least should be configurable whether to ignore or not. If ping request is not counted even other metrics will be more meaningful. ii) AvgRequestLatency should be of double type. -Arshad On Thu, Dec 1, 2016 at 4:50 AM, allen chan wrote: > Anyone seeing this issue? I am experiencing it on 3.4.7 and 3.4.9 > > JMX metric name: AvgRequestLatency > JMX Location: > org.apache.ZooKeeperService:name0=ReplicatedServer_id#, > name1=replica.#,name2=[Leader|Follower]:AvgRequestLatency > > It always has a value of zero. The MaxRequestLatency is non-zero and > changes while the AvgRequestLatency always is zero. > > The zk_avg_latency metric in mntr is also zero. Is this metric not tracked > anymore? > > Thanks > -- > Allen Michael Chan >
AvgRequestLatency metric always zero
Anyone seeing this issue? I am experiencing it on 3.4.7 and 3.4.9 JMX metric name: AvgRequestLatency JMX Location: org.apache.ZooKeeperService:name0=ReplicatedServer_id#,name1=replica.#,name2=[Leader|Follower]:AvgRequestLatency It always has a value of zero. The MaxRequestLatency is non-zero and changes while the AvgRequestLatency always is zero. The zk_avg_latency metric in mntr is also zero. Is this metric not tracked anymore? Thanks -- Allen Michael Chan