Benchmark Our Redis Cluster

Photo by Kent Pilcher on Unsplash

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.

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Set Up an Android Virtual Device (AVD)

images/apx.androidStudio/welcome-avd-manager.png

Iteration C3: Using a Helper to Fo rmat the Price

images/e_2_prices_fixed.png

Psychedelic: A Product Studio DAO on the Internet Computer

Instead of Adding a New Feature, Make an Exist ing Feature More Usable

JVM Data types

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.

More from Medium

Running Minio as a pod in Kubernetes

Securing services with Pipy and OpenID Connect

Using NFS to Simulate Metropolitan Disaster Recovery in an OpenShift Environment

How to monitor Redis with Prometheus and Grafana for Real-Time Analytics