Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2641

AvgRequestLatency metric improves to be more accurate

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.7, 3.4.9
    • 3.6.0
    • None

    Description

      I posted a thread on the mailing list about finding AvgRequestLatency metric to be 0 all the time. I believe this is a valuable metric because it is useful to baseline performance of ZK and know when something is going wrong.

      Another user (Arshad Mohammad) wrote up these notes. I am not a developer so i do not have ability to patch this. Filing this so hopefully someone with developer abilities can add this improvement.

      "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"

      Attachments

        Activity

          People

            maoling Ling Mao
            allenmchan Allen Chan
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h 20m
                4h 20m