lhotari commented on PR #24623:
URL: https://github.com/apache/pulsar/pull/24623#issuecomment-3199887491

   When the producer is faster than consumers, there will be significantly more 
cache misses. I made some more test changes where I removed the fixed delay of 
1ms for both adds and reads and that gives more realistic results of what 
happens with the Pulsar Broker cache in real world scenarios.
   
   with PIP-430 defaults, Cache hits 85.24%, Cache misses 14.76%
   
   ```
   2025-08-19T12:02:10,089 - INFO  - [main:BrokerEntryCacheMultiBrokerTest] - 
Produced 160697 and Consumed 1106910 messages (across 10 consumers with unique 
subscriptions) in total. Number of BK reads 1644 with 163397 entries. Cache 
hits 85.24%, Cache misses 14.76%, Number of restarts 3
   ```
   
   with `cacheEvictionByExpectedReadCount=false`, Cache hits 2.20%, Cache 
misses 97.80%,
   
   ```
   2025-08-19T11:57:37,357 - INFO  - [main:BrokerEntryCacheMultiBrokerTest] - 
Produced 216150 and Consumed 1661410 messages (across 10 consumers with unique 
subscriptions) in total. Number of BK reads 16256 with 1624820 entries. Cache 
hits 2.20%, Cache misses 97.80%, Number of restarts 3
   ```
   
   PIP-430 shows about a 40x improvement in cache hits in this test case with 
commit hash 678a1a9. (manually running the test by changing `enabled = false` 
to `enabled = true`)


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