When consistency checking is enabled for a region, a GemFire member does not immediately remove an entry from the region when an application destroys the entry. Instead, the member retains the entry with its current version stamp for a period of time in order to detect possible conflicts with operations that have occurred. The retained entry is referred to as a tombstone. GemFire retains tombstones for partitioned regions and non-replicated regions, as well as, for replicated regions, in order to provide consistency.
A tombstone in a client cache or a non-replicated region expires after 8 minutes, at which point the tombstone is immediately removed from the cache. The system property, gemfire.non-replicated-tombstone-timeout
, with a default of 480000 milliseconds, controls this timeout parameter.
A tombstone for a replicated or partitioned region expires after 10 minutes. The system property, gemfire.tombstone-timeout
, with a default of 600000 milliseconds, controls this timeout parameter. Expired tombstones are eligible for garbage collection by the GemFire member. Garbage collection is automatically triggered after 100,000 tombstones of any type have timed out in the local GemFire member. Optionally, you can set the gemfire.tombstone-gc-threshold
property to a value smaller than 100000 to perform garbage collection more frequently.
Besides these, there are a few other useful tombstone GC tuning parameters:
gemfire.tombstone-scan-interval = 60000 (default, milliseconds)
gemfire.tombstone-gc-memory-threshold = 30 (default)
gemfire.TombstoneService.VERBOSE = false (default)
-J-Dgemfire.tombstone-gc-threshold=20000
CachePerfStats
:
nonReplicatedTombstonesSize
replicatedTombstonesSize
tombstoneCount
tombstoneGCCount