Reputation: 217
I had eviction max-entries as 2000 and strategy as LRIS. But eviction started before reaching reaching the upper limit of 2000. So, my question is if there some kind of memory constraint here which caused this eviction strategy to work? If yes, how and where is it specified?
For now, i have changed eviction strategy to NONE.
Any help will be appreciated.
Upvotes: 1
Views: 1206
Reputation: 1334
Infinispan does not provide any memory-based eviction yet.
Infinispan uses a concurrent hash map that splits the hash space in segments (a.k.a. buckets) and each segment evicts it owns entries independently.
So, when you set the maxEntries=2000
, internally, the concurrent hash map is creating segments with capacity maxEntries/numberSegments
. When a segment is full, the eviction is trigger in that segment and removes an entry.
In your case, some segments are full quickly and before you reach the 2000 entries.
You can try the following:
<locking concurrencyLevel="yyy">
, default 16). The number of segments increases with the concurrency levelhashCode()
function to make a better spread of they keys.Cheers.
Upvotes: 3