-
Notifications
You must be signed in to change notification settings - Fork 182
perf_dump
The perf_dump utility was released with leveldb in Riak 1.3. The utility accesses a shared memory segment created by Basho's leveldb. This shared memory segment is not part of Google's original leveldb implementation. perf_dump reads performance counters contained within the shared memory segment and outputs their current values to the console.
Note: the counters represent server level statistics, not database / vnode statistics.
You must have Riak's leveldb source code. The source code is available via the github.com basho/leveldb repository (if not already included in your Riak installation).
In the leveldb subdirectory, execute "make perf_dump" (no quotes). This will build perf_dump and leave the executable in the leveldb subdirectory.
Riak must have executed once, or be executing at the time when using perf_dump. More specifically, Riak's leveldb must have create the shared memory segment before first using perf_dump.
Simply type "./perf_dump" at your unix/linux command prompt. You should receive a series of "name: value" lines ... or an error message suggesting an execution problem.
- The shared memory segment is created whenever Riak's leveldb executes and the segment does not already exist.
- leveldb never destroys the shared memory segment or resets the counters. This characteristic was chosen to facilitate snmp implementations.
- under Linux, the shared memory segment is visible via "ipcs" command
- under Linux, the shared memory segment can be removed (hence reset) via the "ipcrm -m "
(will get some sample code)