Zipf_memtier is a upgraded version of memtier_benchmark. The goal of zipf_memtier is to add several new data distribution(such as zipf distribution) to build a more realistic data/queries generator in both redis&memcache client. It offers the following additional features:
- Zipf distribution in object generator
- Python script
- Redis data(CSV) generator
Memtier document:
- A High Throughput Benchmarking Tool for Redis and Memcached
- Pseudo-Random Data, Gaussian Access Pattern and Range Manipulation
The following libraries are required for building:
- libevent 2.0.10 or newer.
- libpcre 8.x.
- OpenSSL (unless TLS support is disabled by
./configure --disable-tls
).
The following tools are required
- autoconf
- automake
- pkg-config
- GNU make
- GCC C++ compiler
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.
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 libssl-dev
To build natively on macOS, use Homebrew to install the required dependencies::
$ brew install autoconf automake libtool libevent pkg-config
After downloading the source tree, use standard autoconf/automake commands::
$ autoreconf -ivf
$ ./configure
$ make
$ make install
$ docker build -t memtier_benchmark .
$ docker run --rm memtier_benchmark --help
See the included manpage or run::
$ memtier_benchmark --help
for command line options.
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.
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.