Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DDF13200BD4 for ; Fri, 2 Dec 2016 06:53:40 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DCC41160B10; Fri, 2 Dec 2016 05:53:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2FB41160B0B for ; Fri, 2 Dec 2016 06:53:40 +0100 (CET) Received: (qmail 34856 invoked by uid 500); 2 Dec 2016 05:53:39 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 34843 invoked by uid 99); 2 Dec 2016 05:53:39 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 05:53:39 +0000 Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id B9B041A0310 for ; Fri, 2 Dec 2016 05:53:38 +0000 (UTC) Received: by mail-oi0-f51.google.com with SMTP id v84so255156002oie.3 for ; Thu, 01 Dec 2016 21:53:38 -0800 (PST) X-Gm-Message-State: AKaTC02Ko23B7/NxpZNNGO4jR+qiwFLZwdet4P/NzJD8wfE5BjqyUPR2oQ97Knc7rjk+DnXHO3A2o+FcHhPVAw== X-Received: by 10.202.60.65 with SMTP id j62mr20896163oia.25.1480658018082; Thu, 01 Dec 2016 21:53:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.66.6 with HTTP; Thu, 1 Dec 2016 21:53:37 -0800 (PST) In-Reply-To: References: From: Rakesh Radhakrishnan Date: Fri, 2 Dec 2016 11:23:37 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: AvgRequestLatency metric always zero To: "user@zookeeper.apache.org" Content-Type: multipart/alternative; boundary=001a113ccece33b0530542a68ff6 archived-at: Fri, 02 Dec 2016 05:53:41 -0000 --001a113ccece33b0530542a68ff6 Content-Type: text/plain; charset=UTF-8 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.mohammad.k@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 > --001a113ccece33b0530542a68ff6--