Description
Using JProfiler, I found almost 50% of AppendEntriesAsync execution time is spent on checkAndEvictCache, see the attached pic. There's also a TODO[1] suggesting to use a daemon thread to perform checkAndEvictCache.
The time are mainly spent on getTotalCacheSize() and countCached(). These two methods will visit every segments. When there are lots of closed segments, visiting them all is indeed a very consuming operation, not to mention that they are performed on every appendEntriesAsync.
Attachments
Attachments
Issue Links
- links to