How Statistics Work

GemFire provides statistics for analyzing system performance. Each application or cache server that joins the distributed system can collect and archive this statistical data. Set the configuration attributes that control statistics collection in the gemfire.properties configuration file. You can also collect your own application defined statistics. To view and analyze archived historical data, use the Visual Statistics Display (VSD) utility provided in a separate download from the product. Contact VMware technical support for instructions about acquiring VSD.

When Java applications and cache servers join a distributed system, they indicate whether to enable statistics sampling and whether to archive the statistics that are gathered.
Note: GemFire statistics use the Java System.nanoTimer for nanosecond timing. This method provides nanosecond precision, but not necessarily nanosecond accuracy. For more information, see the online Java documentation for System.nanoTimer for the JRE you are using with GemFire.
For performance reasons, all statistics sampling is disabled by default. .

Controlling the Size of Archive Files

You can specify limits on the archive files for statistics. These are the areas of control:
  • Archive File Growth Rate.
    • The gemfire.properties statistic-sample-rate controls how often samples are taken, which affects the speed at which the archive file grows.
    • The gemfire.properties statistic-archive-file controls whether the statistics files are compressed. If you give the file name a .gz suffix, it is compressed, thereby taking up less disk space.
  • Maximum Size of a Single Archive File. If the value of the gemfire.properties archive-file-size-limit is greater than zero, a new archive is started when the size of the current archive exceeds the limit. Only one archive can be active at a time.
    Note: If you modify the value of archive-file-size-limit while the distributed system is running, the new value does not take effect until the current archive becomes inactive (that is, when a new archive is started).
  • Maximum Size of All Archive Files. The gemfire.properties archive-disk-space-limit controls the maximum size of all inactive archive files combined. By default, the limit is set to 0, meaning that archive space is unlimited. Whenever an archive becomes inactive or when the archive file is renamed, the combined size of the inactive files is calculated. If the size exceeds the archive-disk-space-limit, the inactive archive with the oldest modification time is deleted. This continues until the combined size is less than the limit. If archive-disk-space-limit is less than or equal to archive-file-size-limit, when the active archive is made inactive due to its size, it is immediately deleted.
    Note: If you modify the value of archive-disk-space-limit while the distributed system is running, the new value does not take effect until the current archive becomes inactive.

Examining Archived Statistics

When sampling and archiving are enabled, you can study statistics in archive files through VSD or by using the GemFire command gemfire stats. You can use VSD to examine archived historical data and to help diagnose performance problems. The VSD tool reads the sampled statistics and produces graphical displays for analysis.