Articles in this section

How to capture jem-stats sites.txt

Context

In order to troubleshoot memory allocations we may need to capture jemalloc allocations statistics using the jem-stats info command.

The info command is used to dump JEMalloc's internal statistics as well as Aerospike memory accounting information (i.e site_info records.)

 

jem-stats:file=[...];options=[...];sites=[...]

 

The first two options to the info command concern JEMalloc's internal statistics:

  • The file option specifies the file to receive JEMalloc's internal statistics. The internal statistics are dumped via JEMalloc's jem_malloc_stats_print(). If no file option is specified, the internal statistics are dumped to the Aerospike log file.
     
  • The options option is simply forwarded to the options parameter of jem_malloc_stats_print().
  • If specified, the sites option indicates that we would also like to dump the site_info records for all threads and all allocation sites. The option specifies the file to which to dump this information. The resulting file contains lines like the following, each of which describes one site_info record.

Method

We can capture jem-stats with following command:
 
asinfo -v 'jem-stats:file=/tmp/jem.txt;sites=/tmp/sites.txt

The sites.txt output requires debug-allocations to be enabled to all in aerospike.conf.
 
service {

...
        debug-allocations all
}

This setting is static and will require a rolling restart of the nodes.

Applies To Earliest Version

4.9

Applies To Latest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful