Infinispan Survival Strategy

I had maximum eviction records like 2000 and a strategy like LRIS. But the eviction began before reaching the upper limit of 2000. So my question is, is there some kind of memory limitation that makes this eviction strategy work? If so, how and where is it indicated?

At the moment, I have changed the eviction strategy to NONE.

Any help would be appreciated.

+1
source share
1 answer

Infinispan does not yet provide memory-based evictions.

Infinispan uses a parallel hash map, which splits the hash space into segments (aka buckets), and each segment issues its own entries independently.

So, when you set maxEntries=2000 , internally, a parallel hash map creates segments with a capacity of maxEntries/numberSegments . When a segment is full, shutting down is a trigger in that segment and deletes the record.

In your case, some segments fill up quickly and before reaching 2000 records.

You can try the following:

  • increase the level of concurrency (in <locking concurrencyLevel="yyy"> , by default 16). The number of segments increases with the level of concurrency
  • try to implement the best hashCode() function to improve the distribution of these keys.

Greetings.

+2
source

Source: https://habr.com/ru/post/1274930/


All Articles