Understanding Table and Index Values

Querying the SYS.MEMORYANALYTICS table provides run-time information about the tables, indexes, and memory usage in GemFire XD.

Table Values

Each table has a single row in SYS.MEMORYANALYTICS identitfied by the table name in the format: schema_name.table_name.
SYS.MEMORY ANALYTICS Column Description
TABLE_NAME Name of the table using the format schema_name.table_name.
INDEX_NAME Name of the index.
INDEX_TYPE Description of the type of index associated with the table-- local or a global hash index, and whether the index is sorted.
ID Member ID of the member hosting the table.
HOST Hostname of the data store.
CONSTANT_OVERHEAD One-time memory overhead cost, in kiloybytes, due to artifacts produced when a blank table is created.
ENTRY_SIZE Entry overhead, in kilobytes. Only reflects the amount of memory required to hold the table row in memory but not including the memory to hold its key and value. (Excludes KEY_SIZE, CONSTANT_OVERHEAD, VALUE_SIZE and VALUE_SIZE_OFFHEAP below.)
KEY_SIZE Key overhead, in kilobytes. Note that this column will only display a non-zero value when the table is set to overflow to disk and the complete row (in other words, the row value) is no longer held in memory.
VALUE_SIZE The size, in kilobytes, of the table row stored in the JVM heap. (This includes the Entry Size overhead.)
VALUE_SIZE_OFFHEAP The size, in kilobytes, of the table row stored in off-heap memory.
TOTAL_SIZE Total size is the sum, in kilobytes, of the following columns:
  • CONSTANT_OVERHEAD
  • ENTRY_SIZE
  • KEY_SIZE
  • VALUE_SIZE
  • VALUE_SIZE_OFFHEAP
NUM_ROWS The total number of rows stored on the local GemFire XD member. For a partitioned table, this includes all buckets for the table, as well as primary and secondary replicas.
NUM_KEYS_IN_MEMORY The total number of keys stored in the heap for the table. Note that this column will only display a non-zero value when the table is set to overflow to disk and the complete row (in other words, the row value) is no longer held in memory.
NUM_VALUES_IN_MEMORY The total number of row values stored in the heap for the table.
NUM_VALUES_IN_OFFHEAP The total number of row values stored in off-heap memory.
MEMORY Not used currently. Placeholder column.
For example, the following row from SYS.MEMORYANALYTICS shows that the APP.FLIGHTAVAILABILITY table (which is using off-heap memory) has 38.984 kilobytes (KB) of total heap overhead (TOTAL_SIZE - VALUE_SIZE_OFFHEAP), with 518 total rows (whose values are being stored off-heap):
TABLE_NAME            |INDEX_NAME|INDEX_TYPE
 |ID                             |HOST           |CONSTANT_OVERHEAD
  |ENTRY_SIZE   |KEY_SIZE     |VALUE_SIZE   |VALUE_SIZE_OFFHEAP
   |TOTAL_SIZE   |NUM_ROWS|NUM_KEYS_IN_MEMORY  
    |NUM_VALUES_IN_MEMORY|NUM_VALUES_IN_OFFHEAP|MEMORY
---------------------------------------------------------------------
[ . . .]

APP.FLIGHTAVAILABILITY|NULL      |NULL      
 |192.168.129.188(5231)<v1>:41602|192.168.129.188|1.688            
  |33.152       |0.0          |4.144        |45.584            
   |84.568       |518     |0                   
    |0                   |518                  |-     
 
[ . . .]