public interface ResourceManager
Re-balancing the GemFire Cache resources can be accomplished using a
ResourceManager resourceManager = cache.getResourceManager(); RebalanceOperation rebalanceOp = resourceManager.createRebalanceFactory().start();Monitoring of heap utilization is enabled by setting the critical heap percentage using
|Modifier and Type||Field and Description|
The default percent of heap memory at which the VM is considered in a critical state.
The default percent of heap memory at which the VM should begin evicting data.
|Modifier and Type||Method and Description|
Creates a factory for defining and starting
Get the percentage of heap at or above which the cache is considered in danger of becoming inoperable.
Get the percentage of heap at or above which the eviction should begin on Regions configured for HeapLRU eviction.
Returns a set of all active
Set the percentage of heap at or above which the cache is considered in danger of becoming inoperable due to garbage collection pauses or out of memory exceptions.
Set the percentage of heap at or above which the eviction should begin on Regions configured for HeapLRU eviction.
static final float DEFAULT_CRITICAL_HEAP_PERCENTAGE
static final float DEFAULT_EVICTION_HEAP_PERCENTAGE
0.0. Note that if a HeapLRU is created and the eviction heap percentage has not been set then it will default
80.0unless the critical heap percentage has been set in which case it will default to a value
5.0less than the critical heap percentage.
RebalanceOperationsthat were started locally on this member.
void setCriticalHeapPercentage(float heapPercentage)
Region.put(Object, Object, Object)
Region.create(Object, Object, Object)
Only one change to this attribute or the eviction heap percentage will be
allowed at any given time and its effect will be fully realized before the
next change is allowed.
When using this threshold, the VM must be launched with the
-Xms switches set to the same values. Many virtual machine implementations
have additional VM switches to control the behavior of the garbage
collector. We suggest that you investigate tuning the garbage collector
when using this type of eviction controller. A collector that frequently
collects is needed to keep our heap usage up to date.
In particular, on the Sun HotSpot VM, the
-XX:+UseConcMarkSweepGC flag needs to be set, and
-XX:CMSInitiatingOccupancyFraction=N should be set with N being a percentage
that is less than the
ResourceManager critical and eviction heap thresholds.
The JRockit VM has similar flags,
-XXgcTrigger:N, which are
required if using this feature. Please Note: the JRockit gcTrigger flag is based on heap free, not
heap in use like the GemFire parameter. This means you need to set gcTrigger to 100-N. for example, if your
eviction threshold is 30 percent, you will need to set gcTrigger to 70 percent.
On the IBM VM, the flag to get a similar collector is
-Xgcpolicy:gencon, but there is no
corollary to the gcTrigger/CMSInitiatingOccupancyFraction flags, so when using this feature with an
IBM VM, the heap usage statistics might lag the true memory usage of the VM, and thresholds may need
to be set sufficiently high that the VM will initiate GC before the thresholds are crossed.
void setEvictionHeapPercentage(float heapPercentage)
Changing this value may cause eviction to begin immediately.
Only one change to this attribute or critical heap percentage will be allowed at any given time and its effect will be fully realized before the next change is allowed. This feature requires additional VM flags to perform properly. See setCriticalHeapPercentage() for details.
Copyright © 1997-2017 Pivotal Software, Inc. All rights reserved.