Benchmark Our Redis Cluster

Introduction

Redis official redis-benchmark does not support cluster mode, but it is a note that it can be easily taken by using memtier benchmark .

Installation and running

Depending on the system on which we want to run, we have a few options to choose from:

  • Centos6
$ yum install autoconf automake make gcc-c++ 
$ yum install pcre-devel zlib-devel libmemcached-devel
$ 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
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
  • Centos7
$ sudo yum install libevent-devel
$ git clone https://github.com/RedisLabs/memtier_benchmark.git
$ cd memtier_benchmark
$ autoreconf -ivf
$ ./configure
$ make
$ sudo make install
$ memtier_benchmark --help
  • Ubuntu
$ sudo apt-get install build-essential autoconf automake libpcre3-dev libevent-dev pkg-config zlib1g-dev
$ git clone https://github.com/RedisLabs/memtier_benchmark.git
$ cd memtier_benchmark
$ autoreconf -ivf
$ ./configure
$ make
$ sudo make install
$ memtier_benchmark --help
  • Docker
$ git clone https://github.com/RedisLabs/memtier_benchmark.git
$ cd memtier_benchmark
$ docker build -t memtier_benchmark .
$ docker run --rm memtier_benchmark --help

Execution

  • Specify one of the master nodes of the cluster with.
$ memtier_benchmark -s 127.0.0.1 -p 6379 --cluster-mode
  • Example (Password specification, 100 connections for each thread with 8 threads, random data size of 500 bytes, SET: GET command ratio of 1: 2, and 20000 requests are sent.)
$ memtier_benchmark -s 127.0.0.1 -p 6379 -a password --cluster-mode -t 8 -c 100 -R --ratio=1:2 -d 500 -n 20000

All information we can find in README.md

 by the author.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Maciej

Maciej

DevOps Consultant. I’m strongly focused on automation, security, and reliability.