golden-yang opened a new issue, #9351:
URL: https://github.com/apache/rocketmq/issues/9351

   ### Before Creating the Enhancement Request
   
   - [x] I have confirmed that this should be classified as an enhancement 
rather than a bug/feature.
   
   
   ### Summary
   
   In our usage scenario, we have a lot of groups and topics. This should be a 
scenario that RocketMQ is good at.
   
   However, as the number of groups increased to tens of thousands, we found 
that there was a significant performance consumption in queryTopicConsumeByWho, 
which accounted for 6.75% of the cluster CPU.
   
   
   This is just a very simple query action, but due to the data structure of 
org.apache.rocketmq.broker.client.ConsumerManager#consumerTable,  each query 
needs to traverse the Map.
   
   This can be slow when there are many groups.
   
   ### Motivation
   
   Adding a simple cache to the consumerManager will reduce the query cost.  
This 6.67% of CPU consumption can be reduced to 0.
   
   ### Describe the Solution You'd Like
   
   Adding a simple cache to the consumerManager will reduce the query cost.  
This 6.67% of CPU consumption can be reduced to 0.
   
   ### Describe Alternatives You've Considered
   
   Reduce the use of this method
   
   ### Additional Context
   
   
   
![Image](https://github.com/user-attachments/assets/3eff369a-ca58-49aa-b49d-dadaa5b832ce)


-- 
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-unsubscr...@rocketmq.apache.org.apache.org

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

Reply via email to