View Source

{panel:bgColor=#f0f0f0}
{toc:outline=true|style=none|indent=10px|minLevel=2}
{panel}


There are a few Memcached load generators out there that by definition are now load generators for Membase as well.  Everyone has their preference, and no one tool is right for all environments or skillsets.  We at Couchbase, Inc. use a variety of tools for testing various functions of the server.  Some of our favorites are:

* {color:#000000}[Brutis |http://code.google.com/p/brutis/]{color}{color:#000000}\- A flexible PHP script that is easy to get and use, and can help simulate an entire stack.  This gives you results and metrics that will be similar to what your application (assuming it's PHP) will be experiencing.{color}
* {color:#000000}[Memcachetest |http://github.com/ingenthr/memcachetest]{color}{color:#000000}\- memcachetest can be configured to exercise a Membase server in many different ways.  It is currently the only tool that supports the native Membase protocol (vbucket-aware).{color}
* {color:#000000}[Memslap |http://www.krow.net/libmemcached/memslap.html]{color}{color:#000000}\- Provided as part of the open-source memcached project, this has been a long-standing testing tool{color}
* {color:#000000}[mc-loader|http://github.com/kbatten/mc-loader]{color} {color:#000000}\- Another tool written for bulk-loading of data{color}

h2. Using Brutis

*Get it: *[http://code.google.com/p/brutis/|http://code.google.com/p/brutis/]
*Install it:* As a PHP script, the installation for brutis is very simple:
{noformat}[user@Membase1 ~]$ tar xzvf brutis-v0_93.tgz
brutis-v0_93/
brutis-v0_93/readme
brutis-v0_93/brutis
brutis-v0_93/license
brutis-v0_93/lib/
brutis-v0_93/lib/collector
brutis-v0_93/lib/functions.php
brutis-v0_93/lib/task_manager.php
brutis-v0_93/lib/client
[user@Membase1 ~]$
{noformat}

You'll also need to install PHP and its memcached library.  The simplest way to do this is using _yum_ or _aptitude_:
{noformat}
yum install php-pecl-memcached
{noformat}
or
{noformat}
apt-get install php-pecl-memcached
{noformat}
*Run it:* Brutis has a variety of options that can be used to tune the type of traffic that it generates.  The simplest way is to let it use all its defaults:

{noformat}
[user@Membase1 ~]$ cd brutis-v0_93
[user@Membase1 brutis-v0_93]$ ./brutis -x localhost:11211 -v

Starting Collector
Brutis                                                            1 Connections

Type Ops/sec Hits/sec Misses/sec Fails/sec Latency MB/sec
-------------------------------------------------------------------------------
Sets: 129.63 --- --- 0.00 0.000731 0.03
Gets: 1,294.15 0.43 1,293.72 0.00 0.000532 0.00
Totals: 1,423.78 0.43 1,293.72 0.00 0.000632 0.03
-------------------------------------------------------------------------------

SETS GETS
-------------------------------------------------------------------------------
Host Ops/sec Latency MB/sec Ops/sec Latency MB/sec
-------------------------------------------------------------------------------
Membase1 129.63 0.000731 0.03 1,294.15 0.000532 0.00

<ctrl-c>

Total Operations: 30958
Total Dataset Size: 720640
Total Sets: 2815
Total Gets: 28143
Total Hits: 46
Total Misses: 28097
Total Set Fails: 0
Total MD5 Fails: 0
Total Keys: 2815
Total Transferred: 732416

[user@Membase1 brutis-v0_93]$

{noformat}



h2. Using Memcachetest

Get it from [https://github.com/membase/memcachetest]

h2. Using Memslap

The memslap tool is part of the libmemcached package at: libmemcached.org

h2. Using mc-loader

The mc-loader tool is a memcached tool written by Keith Batten and can be found on github at&nbsp;https://github.com/kbatten/mc-loader. For information about installing an using this tool please see the [mc-loader page|membase:mc-loader].