codelipenghui commented on issue #6647:
URL: https://github.com/apache/pulsar/pull/6647#issuecomment-617621377


   @merlimat 
   
   The difference is I hashed the key twice before, this change is reduced one 
hash calculation in the selector.
   
   Another difference is, I group the messages by the message key, but when 
users use random keys, the dispatcher can get benefit from the group operation. 
So the new way is grouped by `hash(key) % ranges`, so that we can also get 
group benefit for random keys. The benefit is we can reduce operates of the 
LinkedHashMap.
   
   I have analyzed by yourkit, the managed ledger worker thread in high CPU 
workload with random keys and non-batched messages.
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to