1.1

Table Of Contents
Viewing Memory Usage in SYS.MEMORYANALYTICS
SQLFire includes instrumentation to display the memory used by individual tables and indexes in a SQLFire
member. You can view this memory usage information by starting a Java agent process when you boot SQLFire
members, and then querying the SYS.MEMORYANALYTICS virtual table from a client connection.
Enabling SYS.MEMORYANALYTICS
Follow this procedure to enable the SYS.MEMORYANALYTICS virtual table.
Prerequisites
Create an evaluation SQLFire distributed system to determine the memory footprint for your data. Do not
enable memory analytics on a production system.
You must have representative table data and index entries in order to accurately evaluate the memory footprint.
Create the necessary SQL scripts to automate creating your schema and loading data into your tables.
Consider using fewer SQLFire members in the evaluation system to simplify the evaluation process.
If your SQLFire distributed system uses locators for member discovery, be sure to enable the Java agent on
the locator as well as the data store members. Although a locator does not generally host data, you can use the
locator data to compare data memory footprints with non-data memory footprints.
Procedure
Follow these steps to start a SQLFire member with the Java agent to provide memory analytics:
1.
Use the -javaagent: jar_path Java system property to specify the sqlfire.jar le in your installation
when you start each SQLFire member. For example, if you use sqlf to start a SQLFire server:
sqlf server start -client-address=1527
-J-javaagent:c:\vFabric_SQLFire_11_bNNNNN\lib\sqlfire.jar
Specify the complete path and lename of sqlfire.jar for your system.
If you use a locator for member discovery, also use the -javaagent: jar_path system property when
starting the locator.
2. If your schema and data are not already available in the SQLFire system (as persisted data), run any necessary
SQL scripts to create the schema and load table data. For example:
cd c:\vFabric_SQLFire_11_bNNNNN\quickstart
sqlf
sqlf> connect client 'localhost:1527';
sqlf> run 'create_colocated_schema.sql';
sqlf> run 'loadTables.sql';
3. Connect to SQLFire and query the SYS.MEMORYANALYTICS table to view the memory usage information:
sqlf
sqlf> connect client 'localhost:1527';
sqlf> select * from sys.memoryanalytics;
SQLENTITY
|ID
|MEMORY
----------------------------------------------------------------
APP.FLIGHTS (Entry Size, Value Size, Row Count)
|dyozie-e4310(6880)<v0>:3439/59731
|30352,31436,542
AAP.FLIGHTS.DESTINDEX (Index Entry Overhead, SkipList Size, Max&
|dyozie-e4310(6880)<v0>:3439/59731
|2104,696,3 (2803 = 2.74 kb)
vFabric SQLFire User's Guide72
Managing Your Data in vFabric SQLFire