maoling commented on PR #2165:
URL: https://github.com/apache/zookeeper/pull/2165#issuecomment-2176179886

   Yes, I understand now. When you frequently create and delete numerous znodes 
at the first level, the write_per_namespace and read_per_namespace metrics will 
indeed expand and consume excessive memory.
   
   A possible workaround is to add an additional layer under the root directory 
of the tree (e.g., /taskName/taskId-[1,n]).
   
   While deleting the SummarySet key might work, it seems somewhat 
counterintuitive.
   
   Here are a few alternative suggestions (just my personal opinion):
   
   1. Limit the size of a SummarySet. For example, when the number of keys 
exceeds 1000, prevent any further additions.
   2. Implementing a blacklist is a good idea, as we have other metrics that 
are costly and can be resource-intensive to query at times.
   2.1. Place the blacklist in the zoo.cfg file within the metrics section, 
instead of using a SystemProperty.
   2.2. Ensure the blacklist supports all metric types, not just SummarySet.
   
   ```
   ## Metrics Providers
   metricsProvider.exportJvmInfo=true
   # Support multiple and prefix matching
   metricsProvider.blackList=prep_processor*,sync_processor*
   ```
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to