Git Product home page Git Product logo

aerospike-benchmark's Introduction

Aerospike Benchmark Tool

Build:Main codecov

This project contains the files necessary to build the C client benchmarking tool. This program is used to insert data and generate load emulating real-world usage patterns of the database.

Wiki

For more information on how to use the benchmark tool and configure it to your needs, visit the wiki here.

Get started

Dependencies

Before building, you need to have a local copy of the Aerospike C Client and to have built it. After this, set the environment variable CLIENTREPO to point to the directory containing the built C client.

Additional external dependencies:

  • OpenSSL (libssl and libcrypto)
  • libyaml-devel
  • libev, libuv, or libevent, if an event library is used

This project uses git submodules, so you will need to initialize and update submodules before building this project.

$ git submodule update --init

Build

To build the benchmark tool, run:

make [EVENT_LIB=libev|libuv|libevent]

with EVENT_LIB matching the event library used when the C client was compiled, if one was used (it is necessary to build with an event library to use async commands). If an event library is defined, it must be installed separately. Event libraries usually install into /usr/local/lib. Most operating systems do not search /usr/local/lib by default. Therefore, the following LD_LIBRARY_PATH setting may be necessary:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Now, the benchmark executable will be located at target/benchmark.

Build with static linkage

To statically link the benchmark tool to external libraries, pass <LIB_NAME>_STATIC_PATH, set to the directory containing the respective static libraries, as an argument to make. To get these, you'll likely need to compile the library itself from source.

For example, for static linking against OpenSSL, with libssl.a and libcrypto.a in the directory /usr/local/lib, compile with OPENSSL_STATIC_PATH=/usr/local/lib.

Running Tests and Coverage

To run the unit tests, call

make test [EVENT_LIB=libev|libuv|libevent]

To generate coverage data for the unit tests, run

make coverage [EVENT_LIB=libev|libuv|libevent]

note: this will rerun the tests.

To view coverage data in the console, run

make report

Example usage

To run a random read/update workload for 30 seconds, run:

target/benchmark --workload RU,50 --duration 30

To:

  • Connect to localhost:3000 using namespace "test".
  • Read 80% and write 20% of the time using 8 concurrent threads.
  • Use 1000000 keys and 1400 length byte array values using a single bin.
  • Timeout after 50ms for reads and writes.
  • Restrict transactions/second to 2500.
target/benchmarks -h 127.0.0.1 -p 3000 -n test -k 1000000 -o B1400 -w RU,80 -g 2500 -T 50 -z 8

To:

  • Benchmark asynchronous methods using 1 event loop.
  • Limit the maximum number of concurrent commands to 50.
  • Use and 50% read 50% write pattern.
target/benchmarks -h 127.0.0.1 -p 3000 -n test -k 1000000 -o S:50 -w RU,50 --async --asyncMaxCommands 50 --eventLoops 1

Command line usage can be read with:

target/benchmark --help

aerospike-benchmark's People

Contributors

briannichols avatar arrowplum avatar claytonknittel avatar kportertx avatar xorphox avatar sunilvirus avatar wchu-citrusleaf avatar helix avatar ksedgwic avatar realmgic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.