GemFire: Persistent Regions configured for LRU are not loaded into cache by default
search cancel

GemFire: Persistent Regions configured for LRU are not loaded into cache by default

book

Article ID: 294464

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

How can we get all persistent region entries loaded into the cache at startup?

You may also be asking why your performance is not that great after startup, but ultimately improves over time.

These topics are discussed a bit in t he following section of our GemFire Documentation:

https://docs.vmware.com/en/VMware-GemFire/9.15/gf/managing-troubleshooting-system_failure_and_recovery.html

Environment

Product Version: 9.15
OS: All

Resolution

This KB serves primarily to make the behavior of GemFire very clear to our customers, with respect to loading entries of Persistent regions configured for LRU (eviction).

By default, GemFire does not load the VALUES of such regions into the heap at startup. GemFire only loads the keys of such regions by default.  In this case, values will only be loaded when needed as operations are performed for the given key that require the corresponding value.

If you want to have all values loaded, there are system properties that must be set.

Specifically, the following 3 flags drive this behavior.  These 3 flags are documented in detail in our documentation in the section shared above.

1. gemfire.disk.recoverValues=true   (default is true)
2. gemfire.disk.recoverLruValues=true  (default is false, thus affecting such regions)
3. gemfire.disk.recoverValuesSync= <your pick> (default is false)

You need the first two flags above to be set to true.   The third "Sync" flag simply drives whether GemFire will load Values synchronously or asynchronously at startup.    The most aggressive setting is true, but even if you set it to false, Values will still be loaded relatively quickly.   It does not require an operation on a key to load its value into the heap