GithubHelp home page GithubHelp logo

isabella232 / basho_bench Goto Github PK

View Code? Open in Web Editor NEW

This project forked from project-fifo/basho_bench

0.0 0.0 0.0 1.2 MB

A load-generation and testing tool for key-value stores

License: Apache License 2.0

Erlang 92.70% R 3.68% Shell 3.62%

basho_bench's Introduction

basho_bench

Overview

Travis-CI :: https://secure.travis-ci.org/basho/basho_bench.png

Basho Bench is a benchmarking tool created to conduct accurate and repeatable performance tests and stress tests, and produce performance graphs.

Originally developed to benchmark Riak, it exposes a pluggable driver interface and has been extended to serve as a benchmarking tool across a variety of projects.

Basho Bench focuses on two metrics of performance:

  • Throughput: number of operations performed in a timeframe, captured in aggregate across all operation types
  • Latency: time to complete single operations, captured in quantiles per-operation

Quick Start

You must have Erlang/OTP R13B03 or later to build and run Basho Bench, and R to generate graphs of your benchmarks. A sane GNU-style build system is also required if you want to use make to build the project.

git clone git://github.com/basho/basho_bench.git
cd basho_bench
make all

This will build an executable script, basho_bench, which you can use to run one of the existing benchmark configurations from the examples/ directory. You will likely have to make some minor directory changes to the configs in order to get the examples running (see, e.g., the source of the bitcask and innostore benchmark config files for direction).

$ ./basho_bench examples/riakc_pb.config
INFO: Est. data size: 95.37 MB
INFO: Using target ip {127,0,0,1} for worker 1
INFO: Starting max worker: <0.55.0>

At the end of the benchmark, results will be available in CSV format in the tests/current/ directory. Now you can generate a graph:

$ make results
priv/summary.r -i tests/current
Loading required package: proto
Loading required package: reshape
Loading required package: plyr
Loading required package: digest
null device 
          1 
$ open tests/current/summary.png

Troubleshooting Graph Generation

If make results fails with the error /usr/bin/env: Rscript –vanilla: No such file or directory please edit priv/summary.r and replace the first line with the full path to the Rscript binary on your system

If you receive the error message: Warning: unable to access index for repository http://lib.stat.cmu.edu/R/CRAN/src/contrib it means the default R repo for installing additional packages is broken, you can change it as follows:

$ R
> chooseCRANmirror()
Selection: 69
quit()
make results

Customizing your Benchmark

Basho Bench has many drivers, each with its own configuration, and a number of key and value generators that you can use to customize your benchmark. It is also straightforward – with less than 200 lines of Erlang code – to create custom drivers that can exercise other systems or perform custom operations. These are covered more in detail in the documentation.

Benchmarking with riak-java-client

The riak-java-client can be used to benchmark a Riak cluster. There is an example configuration in examples/riakc_java.config. You will need the bench_shim project. You will also need to uncomment and edit the following line in basho_bench’s rebar.config, adding your own erlang cookie value:

%% {escript_emu_args, "%%! -name [email protected] -setcookie YOUR_ERLANG_COOKIE\n"}.

Alternative Graph Generation by gnuplot

You can generate graphs using gnuplot.

$ ./priv/gp_throughput.sh
$ ./priv/gp_latency.sh

By passing -h option to each script, help messages are shown.

Some of options for these scripts are:

  • -d TEST_DIR : comma separated list of directories which include test result CSV files
  • -t TERMINAL_TYPE : gnuplot terminal type
  • -P : just print gnuplot script without drawing graph

For example, you can draw graphs with ASCII characters by the option -t dumb, which is useful in non-graphical environment or quick sharing of result in chat.

Also, you can plot multiple test runs on a single plot by using “-d” switch.

Contributing

We encourage contributions to Basho Bench from the community.

  1. Fork the basho_bench repository on Github.
  2. Clone your fork or add the remote if you already have a clone of the repository.
git clone [email protected]:yourusername/basho_bench.git
# or
git remote add mine [email protected]:yourusername/basho_bench.git
  1. Create a topic branch for your change.
git checkout -b some-topic-branch
  1. Make your change and commit. Use a clear and descriptive commit message, spanning multiple lines if detailed explanation is needed.
  2. Push to your fork of the repository and then send a pull-request through Github.
git push mine some-topic-branch
  1. A Basho engineer or community maintainer will review your patch and merge it into the main repository or send you feedback.

basho_bench's People

Contributors

argv0 avatar beerriot avatar davidx avatar dizzyd avatar doubleyou avatar dreverri avatar engelsanchez avatar evanmcc avatar gpascale avatar ian-plosker avatar joedevivo avatar jonmeredith avatar jtuple avatar legoscia avatar licenser avatar lordnull avatar matthewvon avatar nathanaschbacher avatar norton avatar russelldb avatar rustyio avatar rzezeski avatar seancribbs avatar shino avatar slfritchie avatar smorin avatar tcash21 avatar tnm avatar viganiko avatar vinoski 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.