|Pivotal GemFire||7.0.2 to 8.2.1|
This article describes how to measure memory used on a given cache member by a region.
Except when the value object is a native Java type, when GemFire stores an entry in a region, it does not store the actual object value put into the region but, instead, uses a
VersionedThinDiskRegionEntryHeapObjectKey object. For instance, when putting a String into GemFire as the value object, as is the case when doing a put from gfsh (GemFire SHell) without specifying value object class, the object used by GemFire is the
This means that it is only possible to find the memory used by a region when you have only one region populated in the cache as the different value objects will all be stored using
- To find the memory used by a region on a member, connect to the heap using jvisualvm, which is part of the Oracle Sun JDK. If launching jvisualvm directly on the host where the GemFire member is running, the GemFire JVM will appear in the list of local JVMs (otherwise, it is possible to connect to a remote JVM). Next, select the JVM and go to the Sampler tab and choose Memory. In the Class Name Filter, on the bottom, type "Thin" which will show the
- Entry keys, by contrast, are stored as the object actually put into the cache. Hence, if the entry key is called
EntryKey,it can be found in the memory view by that name.
- Finally, the last object instances that will need to be considered are the
VMCachedDeserializables, which are wrappers on the value.