Hi all,

A broker with a lot of topics (10k+) consumes a considerable amount of CPU
even while idling (no messages being processed).

In profiling, I can see that most CPU is spent in
ManagedLedgerFactorImpl.doCacheEviction. It's also a major source of object
allocations (when a broker is idling). A similar observation was made by
Kirill K about a month ago.

There is a configuration parameter called
managedLedgerCacheEvictionFrequency
which is documented as "Configure the cache eviction frequency for the
managed ledger cache (evictions/sec)" .

I'd assume that by reducing the managedLedgerCacheEvictionFrequency, it's
possible to reduce CPU consumption. I'm just wondering what the tradeoff in
lowering the value is and why is the default value 100 evictions per second?

How does changing the managedLedgerCacheEvictionFrequency configuration
value impact the broker?


BR, Lari

Reply via email to