Skip to content

Latest commit

 

History

History
 
 

benchmarks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Benchmarks

Benchmark is a collection of example programs which can be used to benchmark the Aerospike Node.js Client.

Setup

To use the benchmarks, you will need to install the aerospike module into the benchmarks directory.

From the benchmarks directory, run the following to install the dependencies:

$ npm install ../
$ npm update

Programs

The following are the programs in this directory:

  • main.js – The main benchmark program, which runs multiple batches of operations against an Aerospike cluster. The program can run for a specified number of iterations or time frame.
  • inspect.js – Runs main.js with multiple configurations to find a combination of parameters which appear to perform best.
  • memory.js – Is a program which is used to process the memory usage output from main.js, to give more insight into memory utilization.

These programs optionally take a hostname, port, and namespace of the cluster. The default server is on 127.0.0.1 at port 3000 (a local server installation).

Each of the programs will provide usage information when --help option is provided.

main.js

The primary benchmark program, which will run multiple iterations of a batch of operations against an Aerospike database cluster.

The standard options for the program are:

  • -P <n> – The number of child processes to spawn.
  • -I <n> – The number of iterations to execute in each child process.
  • -O <n> – The number of operations to execute per iteration.

Alternatively, you can have the program run for a specified period of time. This will supercede the -I option, so the number iterations will depend on the number of iterations that can be executed in the time period.

  • -T <n>[s|m|h] – The amount of time to run the program. The value will be the amount of time followed by the unit of time. The units are: s (seconds), m (minutes) and h (hours).

Use --help to list all options for the program.

Iteration Reports

After each iteration, a one-line report is generated. This provides a quick summary of the iteration.

To disable this reporting, use the --silent option.

Summary Reports

The program will generate a report of the test after it has completed. The report will contain several kinds of data, including transactions per second, memory use, and status codes.

This will requires the main program to store the information for the summary report in memory.

If you do not want a summary report, then use the --no-summary option.

Memory Usage Reports

The program can display memory use per iteration, which helps give an understanding of details of memory use.

You can obtain a chart display of memory use with the summary report by specifying --chart-memory.

If you do not want a summary report, but would like memory use, then you can use --no-summary and --chart-memory, which will display memory use for each iteration.

memory.js

This program generates a report on memory use based on output generated by main.js. It groups iterations based on what it believes to be cycles between garbage collections, which will give you an idea of when or how often GC is executed and the amount of memory is cleaned up by each GC.

To generate output understood by memory.js, then you will want to use the following combination of options:

--no-summary --chart-memory --silent

You can have the program generate a report based on a slice of the data collected via the -s <n> (start) and -e <n> (end) options. You can also use -f <n> to skip every n cycles.

inspect.js

This program runs main.js with different combinations of options to find a set of options that produce optimal results for the main.js to run for longer periods.