You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/08/07 04:08:44 UTC

[GitHub] [helix] chenboat commented on a change in pull request #378: Make the reservoir used in ZkClientPathMonitor metric configurable.

chenboat commented on a change in pull request #378: Make the reservoir used in ZkClientPathMonitor metric configurable.
URL: https://github.com/apache/helix/pull/378#discussion_r311361633
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ZkClientMonitor.java
 ##########
 @@ -81,8 +90,14 @@ public ZkClientMonitor(String monitorType, String monitorKey, String monitorInst
     if (zkEventThread != null) {
       _zkEventThreadMetric = new ZkThreadMetric(zkEventThread);
     }
+    if (mbeanReservoir == null) {
+      _mbeanReservoir =  new SlidingTimeWindowArrayReservoir(DEFAULT_RESET_INTERVAL_MS, TimeUnit.MILLISECONDS);
 
 Review comment:
   Per this doc: https://metrics.dropwizard.io/4.0.0/manual/core.html, 
   "10K measurements / sec with reservoir storing time of 1 minute will take 10000 * 60 * 128 / 8 = 9600000 bytes ~ **9 megabytes**"
   
   So with the current default of 1 hour, it will be about 540 M bytes. One of our moderately loaded prod server heapdump shows a single Reservoir which uses ~200M of memory. We can choose either make either Reservoir or Interval time configurable. I chose the former so that the client can even configure an alternative reservoir type.  
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org