Search code examples
in-memory-databasehanagemfire

How in-memory databases store data larger than RAM memory in GemfireXD?


If I am using a cluster of 4 nodes, each having 4GB RAM, so total RAM memory is 16 GB. And I have to store 20 GB of data in a table. Then how in-memory database will accommodate this data ? I read somewhere the data is swapped between RAM & Disk , but wouldn't it make data access slow. Please Explain


Solution

  • GemFire or GemFireXD evicts the data to disk if it feels memory pressure while accommodating more data. It may have some performance implications. However, user can control how and when eviction takes place. All the algorithms use Least Recently Used algorithms to evict the data. Also, when a row is evicted, the primary key value remains in memory while the remaining column data is evicted. This makes fetching the row from disk faster.

    You can go through the following links to understand about evictions in GemFireXD: http://gemfirexd.docs.pivotal.io/1.3.0/userguide/developers_guide/topics/cache/cache.html