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 2019/07/18 19:42:06 UTC

[GitHub] [pulsar] merlimat opened a new pull request #4760: Allow to configure ack-timeout tick time

merlimat opened a new pull request #4760: Allow to configure ack-timeout tick time
URL: https://github.com/apache/pulsar/pull/4760
 
 
   ### Motivation
   
   After the changes in #3118, there has a been a sharp increase of memory utilization for the UnackedMessageTracker due to the time buckets being created. 
   
   This is especially true when the acktimeout is set to a larger value (eg: 1h) where 3600 time-buckets are being created. This lead to use 20MB per partition even when no message is tracked.
   
   Allowing to configure the tick time so that application can tune it based on needs.
   
   Additionally, fixed the logic that keeps creating hash maps and throwing them away at each tick time iteration, since that creates a lot of garbage and doesn't take care of the fact that the hash maps are expanding based on the required capacity (so next time they are already of the "right" size). 
   
   On a final note: the current default of 1sec seems very wasteful. Something like 10s should be more appropriate as default.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services