Mudit bhaintwal
Mudit bhaintwal

Reputation: 555

apache ignite on-heap and off-heap memory

I am using ignite 2.9. Native persistence is disabled.

Enabled on heap caching using

CacheConfiguration.setOnheapCacheEnabled(true)

But I can still see off-heap metrics in logs.

  1. shouldn't it use only heap memory after making on-heap true?
  2. What type of data gets stored off-heap?
  3. How eviction works incase of eviction policy defined for default data region is random2Lru and LRU for on heap?

Upvotes: 0

Views: 503

Answers (1)

Stephen Darlington
Stephen Darlington

Reputation: 52565

An on-heap cache is in addition to the off-heap storage.

So:

  1. No
  2. Anything you save into the cache/table
  3. There are two kinds of eviction. Eviction on data regions is at the page level rather than the record level, so a number of records can be evicted together. On-heap cache works on a row level. Evicting a record from the on-heap cache does not evict it from the off-heap cache. Evicting from off-heap also evicts from the on-heap cache.

Upvotes: 5

Related Questions