You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/13 22:11:01 UTC

[GitHub] [pulsar] michaeljmarshall opened a new issue, #16587: Broker Cache Allocations Metrics Always 0

michaeljmarshall opened a new issue, #16587:
URL: https://github.com/apache/pulsar/issues/16587

   **Describe the bug**
   The `allocator-stats` for the broker's entry cache appear to be broken because they are always 0, even when the cache is in use.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Build apache/pulsar master.
   2. Run `bin/pulsar standalone`
   3. Run `bin/pulsar-perf consume -r 99 test`
   4. Run `bin/pulsar-perf produce -r 100 test`
   5. Run `bin/pulsar-admin broker-stats allocator-stats ml-cache` (I omitted this result because it is too verbose. The allocations are zero every time though and the result aligns with the prometheus metrics.)
   6. You can also observe the broker's `allocations` related prometheus metrics
   7. Note that while there is an active producer and consumer, I can see that there are cache hits in the prometheus metrics.
   
   **Expected behavior**
   The broker cache metrics for allocations should produce the real cache size.
   
   ** Metrics**
   Metrics containing `ml_cache`:
   ```
   # TYPE pulsar_ml_cache_evictions gauge
   pulsar_ml_cache_evictions{cluster="standalone"} 0 1657749677931
   # TYPE pulsar_ml_cache_hits_rate gauge
   pulsar_ml_cache_hits_rate{cluster="standalone"} 8.367224481632109 1657749677931
   # TYPE pulsar_ml_cache_hits_throughput gauge
   pulsar_ml_cache_hits_throughput{cluster="standalone"} 9056.903793586238 1657749677931
   # TYPE pulsar_ml_cache_misses_rate gauge
   pulsar_ml_cache_misses_rate{cluster="standalone"} 349.73998266551104 1657749677931
   # TYPE pulsar_ml_cache_misses_throughput gauge
   pulsar_ml_cache_misses_throughput{cluster="standalone"} 377094.08960597374 1657749677931
   # TYPE pulsar_ml_cache_pool_active_allocations gauge
   pulsar_ml_cache_pool_active_allocations{cluster="standalone"} 0 1657749677931
   # TYPE pulsar_ml_cache_pool_active_allocations_huge gauge
   pulsar_ml_cache_pool_active_allocations_huge{cluster="standalone"} 0 1657749677931
   # TYPE pulsar_ml_cache_pool_active_allocations_normal gauge
   pulsar_ml_cache_pool_active_allocations_normal{cluster="standalone"} 0 1657749677931
   # TYPE pulsar_ml_cache_pool_active_allocations_small gauge
   pulsar_ml_cache_pool_active_allocations_small{cluster="standalone"} 0 1657749677931
   # TYPE pulsar_ml_cache_pool_allocated gauge
   pulsar_ml_cache_pool_allocated{cluster="standalone"} 0 1657749677931
   # TYPE pulsar_ml_cache_pool_used gauge
   pulsar_ml_cache_pool_used{cluster="standalone"} 0 1657749677931
   # TYPE pulsar_ml_cache_used_size gauge
   pulsar_ml_cache_used_size{cluster="standalone"} 1077 1657749677931
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] michaeljmarshall commented on issue #16587: Broker Cache Allocations Metrics Always 0

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on issue #16587:
URL: https://github.com/apache/pulsar/issues/16587#issuecomment-1183732378

   These are 0 because `managedLedgerCacheCopyEntries` is `false` in the broker.conf. I wonder if it is worth not exposing allocator metrics when that value is false? Closing this issue since it is not a bug.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] michaeljmarshall closed issue #16587: Broker Cache Allocations Metrics Always 0

Posted by GitBox <gi...@apache.org>.
michaeljmarshall closed issue #16587: Broker Cache Allocations Metrics Always 0
URL: https://github.com/apache/pulsar/issues/16587


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org