Code Monkey home page Code Monkey logo

memtier_benchmark's Introduction

memtier_benchmark

memtier_benchmark is a command line utility developed by Redis Labs (formerly Garantia Data Ltd.) for load generation and bechmarking NoSQL key-value databases. It offers the following:

  • Support for both Redis and Memcache protocols (text and binary)
  • Multi-threaded multi-client execution
  • Multiple configuration options, including:
  • Read:Write ratio
  • Random and sequential key name pattern policies
  • Random or ranged key expiration
  • Redis cluster
  • ...and much more

Read more at:

Getting Started

Prerequisites

The following libraries are required for building:

  • libevent 2.0.10 or newer.
  • libpcre 8.x.

The following tools are required

  • autoconf
  • automake
  • pkg-config
  • GNU make
  • GCC C++ compiler

CentOS 6.x

On a CentOS 6.x system, use the following to install prerequisites:

# yum install autoconf automake make gcc-c++ 
# yum install pcre-devel zlib-devel libmemcached-devel

CentOS 6.4 ships with older versions of libevent, which must be manually built and installed as follows:

To download, build and install libevent-2.0.21:

$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
$ tar xfz libevent-2.0.21-stable.tar.gz
$ pushd libevent-2.0.21-stable
$ ./configure
$ make
$ sudo make install
$ popd

The above steps will install into /usr/local so it does not confict with the distribution-bundled versions. The last step is to set up the PKG_CONFIG_PATH so configure can find the newly installed library.

$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}

Then proceed to follow the build instructions below.

Ubuntu/Debian

On Ubuntu/Debian distributions, simply install all prerequisites as follows:

# apt-get install build-essential autoconf automake libpcre3-dev libevent-dev pkg-config zlib1g-dev

macOS

To build natively on macOS, use Homebrew to install the required dependencies::

$ brew install autoconf automake libtool libevent pkg-config

Building and installing

After downloading the source tree, use standard autoconf/automake commands::

$ autoreconf -ivf
$ ./configure
$ make
$ make install

Using Docker

$ docker build -t memtier_benchmark .
$ docker run --rm memtier_benchmark --help

Using memtier_benchmark

See the included manpage or run::

$ memtier_benchmark --help

for command line options.

Cluster mode

Connections

When using the cluster-mode option, each client opens one connection for each node. So, when using a large number of threads and clients, the user must verify that he is not limited by the maximum number of file descriptors.

Using sequential key pattern

When there is an asymmetry between the Redis nodes and user set the --requests option, there may be gaps in the generated keys.

Also, the ratio and the key generator is per client (and not connection). In this case, setting the ratio to 1:1 does not guarantee 100% hits because the keys spread to different connections/nodes.

githalytics.com alpha

memtier_benchmark's People

Contributors

daisydai avatar dzrw avatar elad-ash avatar fewtrell avatar itamarhaber avatar jplevyak2 avatar niksu avatar oranagra avatar pataquets avatar roeyprat avatar samanbarghi avatar swilly22 avatar ushachar avatar yaacovhazan avatar yaacovhazan-redislabs avatar yiftach avatar yoav-steinberg avatar yossigo 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.