4 <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5 <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
9 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0">
11 <title>memslap
— libmemcached-awesome
1.1.4 documentation
</title>
20 <script type=
"text/javascript" src=
"../_static/js/modernizr.min.js"></script>
23 <script type=
"text/javascript" id=
"documentation_options" data-url_root=
"../" src=
"../_static/documentation_options.js"></script>
24 <script type=
"text/javascript" src=
"../_static/jquery.js"></script>
25 <script type=
"text/javascript" src=
"../_static/underscore.js"></script>
26 <script type=
"text/javascript" src=
"../_static/doctools.js"></script>
27 <script type=
"text/javascript" src=
"../_static/language_data.js"></script>
29 <script type=
"text/javascript" src=
"../_static/js/theme.js"></script>
34 <link rel=
"stylesheet" href=
"../_static/css/theme.css" type=
"text/css" />
35 <link rel=
"stylesheet" href=
"../_static/pygments.css" type=
"text/css" />
36 <link rel=
"index" title=
"Index" href=
"../genindex.html" />
37 <link rel=
"search" title=
"Search" href=
"../search.html" />
38 <link rel=
"copyright" title=
"Copyright" href=
"../copyright.html" />
39 <link rel=
"next" title=
"memping" href=
"memping.html" />
40 <link rel=
"prev" title=
"memaslap - Load testing and benchmarking a server" href=
"memaslap.html" />
43 <body class=
"wy-body-for-nav">
46 <div class=
"wy-grid-for-nav">
48 <nav data-toggle=
"wy-nav-shift" class=
"wy-nav-side">
49 <div class=
"wy-side-scroll">
50 <div class=
"wy-side-nav-search" >
54 <a href=
"../index.html" class=
"icon icon-home"> libmemcached-awesome
71 <form id=
"rtd-search-form" class=
"wy-form" action=
"../search.html" method=
"get">
72 <input type=
"text" name=
"q" placeholder=
"Search docs" />
73 <input type=
"hidden" name=
"check_keywords" value=
"yes" />
74 <input type=
"hidden" name=
"area" value=
"default" />
81 <div class=
"wy-menu wy-menu-vertical" data-spy=
"affix" role=
"navigation" aria-label=
"main navigation">
89 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcached.html">Introduction
</a></li>
90 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcached/index.html">libmemcached API
</a></li>
91 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcachedutil/index.html">libmemcachedutil API
</a></li>
92 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libhashkit/index.html">libhashkit API
</a></li>
93 <li class=
"toctree-l1 current"><a class=
"reference internal" href=
"index.html">Client Applications
</a><ul class=
"current">
94 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memexist.html">memexist — Check for the existence of a key
</a></li>
95 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memcat.html">memcat —
"cat
" data from a server
</a></li>
96 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memcp.html">memcp —
"cp
" files to a server
</a></li>
97 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memtouch.html">memtouch —
"touch
" a key
</a></li>
98 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memrm.html">memrm –
"rm
" a key
</a></li>
99 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memaslap.html">memaslap - Load testing and benchmarking a server
</a></li>
100 <li class=
"toctree-l2 current"><a class=
"current reference internal" href=
"#">memslap - Load testing and benchmarking a server
</a></li>
101 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memping.html">memping – Ping a server
</a></li>
102 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memstat.html">memstat – Gather statistics from a server
</a></li>
103 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memerror.html">memerror — Translate libmemcached error codes
</a></li>
104 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memparse.html">memparse — Parse and validate an option string
</a></li>
105 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memcapable.html">memcapable — Check a server's capabilities and compatibility
</a></li>
106 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memdump.html">memdump — Dump a server's data
</a></li>
107 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memflush.html">memflush — Flush a server (erase all cached data)
</a></li>
110 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcached/index_misc.html">Miscellaneous
</a></li>
113 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../changelogs.html">Change Logs
</a></li>
114 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../issues.html">Known issues
</a></li>
115 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../copyright.html">Copyright
</a></li>
124 <section data-toggle=
"wy-nav-shift" class=
"wy-nav-content-wrap">
127 <nav class=
"wy-nav-top" aria-label=
"top navigation">
129 <i data-toggle=
"wy-nav-top" class=
"fa fa-bars"></i>
130 <a href=
"../index.html">libmemcached-awesome
</a>
135 <div class=
"wy-nav-content">
137 <div class=
"rst-content">
155 <div role=
"navigation" aria-label=
"breadcrumbs navigation">
157 <ul class=
"wy-breadcrumbs">
159 <li><a href=
"../index.html">Docs
</a> »</li>
161 <li><a href=
"index.html">Client Applications
</a> »</li>
166 <li class=
"wy-breadcrumbs-aside">
170 <a href=
"https://github.com/awesomized/libmemcached/blob/v1.x/docs/source/bin/memslap.rst" class=
"fa fa-github"> Edit on GitHub
</a>
181 <div role=
"main" class=
"document" itemscope=
"itemscope" itemtype=
"http://schema.org/Article">
182 <div itemprop=
"articleBody">
184 <div class=
"section" id=
"memslap">
185 <h1>memslap
<a class=
"headerlink" href=
"#memslap" title=
"Permalink to this headline">¶
</a></h1>
186 <div class=
"section" id=
"synopsis">
187 <h2>SYNOPSIS
<a class=
"headerlink" href=
"#synopsis" title=
"Permalink to this headline">¶
</a></h2>
188 <p>memslap [options]
</p>
189 <p>Load testing and benchmarking a server
</p>
191 <div class=
"section" id=
"description">
192 <h2>DESCRIPTION
<a class=
"headerlink" href=
"#description" title=
"Permalink to this headline">¶
</a></h2>
193 <p><strong class=
"program">memslap
</strong> is a load generation and benchmark tool for
<em class=
"manpage"><a class=
"manpage reference external" href=
"https://linux.die.net/man/1/memcached">memcached(
1)
</a></em>
194 servers. It generates configurable workload such as threads, concurrencies, connections,
195 run time, overwrite, miss rate, key size, value size, get/set proportion, expected
196 throughput, and so on.
</p>
198 <div class=
"section" id=
"options">
199 <h2>OPTIONS
<a class=
"headerlink" href=
"#options" title=
"Permalink to this headline">¶
</a></h2>
201 <dt id=
"cmdoption-memslap-h-help">
202 <code class=
"descname">-h|--help
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-h-help" title=
"Permalink to this definition">¶
</a></dt>
203 <dd><p>Display help.
</p>
207 <dt id=
"cmdoption-memslap-v-version">
208 <code class=
"descname">-V|--version
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-v-version" title=
"Permalink to this definition">¶
</a></dt>
209 <dd><p>Display version.
</p>
213 <dt id=
"cmdoption-memslap-q-quiet">
214 <code class=
"descname">-q|--quiet
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-q-quiet" title=
"Permalink to this definition">¶
</a></dt>
215 <dd><p>Operate quietly.
</p>
219 <dt id=
"cmdoption-memslap-v-verbose">
220 <code class=
"descname">-v|--verbose
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-v-verbose" title=
"Permalink to this definition">¶
</a></dt>
221 <dd><p>Operate more verbosely.
</p>
225 <dt id=
"cmdoption-memslap-d-debug">
226 <code class=
"descname">-d|--debug
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-d-debug" title=
"Permalink to this definition">¶
</a></dt>
227 <dd><p>See
<a class=
"reference internal" href=
"#cmdoption-memslap-v-verbose"><code class=
"xref std std-option docutils literal notranslate"><span class=
"pre">-v|--verbose
</span></code></a>.
</p>
231 <dt id=
"cmdoption-memslap-s-servers">
232 <code class=
"descname">-s|--servers
</code><code class=
"descclassname"> <list of servers
></code><a class=
"headerlink" href=
"#cmdoption-memslap-s-servers" title=
"Permalink to this definition">¶
</a></dt>
233 <dd><p>Specify the list of servers as
<em>hostname[:port][,hostname[:port]...]
</em>.
</p>
237 <dt id=
"cmdoption-memslap-n-non-blocking">
238 <code class=
"descname">-n|--non-blocking
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-n-non-blocking" title=
"Permalink to this definition">¶
</a></dt>
239 <dd><p>Enable non-blocking operations.
</p>
243 <dt id=
"cmdoption-memslap-n-tcp-nodelay">
244 <code class=
"descname">-N|--tcp-nodelay
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-n-tcp-nodelay" title=
"Permalink to this definition">¶
</a></dt>
245 <dd><p>Disable Nagle's algorithm.
</p>
249 <dt id=
"cmdoption-memslap-b-binary">
250 <code class=
"descname">-b|--binary
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-b-binary" title=
"Permalink to this definition">¶
</a></dt>
251 <dd><p>Enable binary protocol.
</p>
255 <dt id=
"cmdoption-memslap-b-buffer">
256 <code class=
"descname">-B|--buffer
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-b-buffer" title=
"Permalink to this definition">¶
</a></dt>
257 <dd><p>Buffer requests.
</p>
261 <dt id=
"cmdoption-memslap-u-username">
262 <code class=
"descname">-u|--username
</code><code class=
"descclassname"> <username
></code><a class=
"headerlink" href=
"#cmdoption-memslap-u-username" title=
"Permalink to this definition">¶
</a></dt>
263 <dd><p>Use
<em>username
</em> for SASL authentication.
</p>
267 <dt id=
"cmdoption-memslap-p-password">
268 <code class=
"descname">-p|--password
</code><code class=
"descclassname"> <password
></code><a class=
"headerlink" href=
"#cmdoption-memslap-p-password" title=
"Permalink to this definition">¶
</a></dt>
269 <dd><p>Use
<em>password
</em> for SASL authentication.
</p>
273 <dt id=
"cmdoption-memslap-h-hash">
274 <code class=
"descname">-H|--hash
</code><code class=
"descclassname"> <algorithm
></code><a class=
"headerlink" href=
"#cmdoption-memslap-h-hash" title=
"Permalink to this definition">¶
</a></dt>
275 <dd><p>Use
<em>algorithm
</em> as key hash algo.
276 See
<a class=
"reference internal" href=
"../libmemcached/memcached_behavior.html#_CPPv4N20memcached_behavior_t23MEMCACHED_BEHAVIOR_HASHE" title=
"memcached_behavior_t::MEMCACHED_BEHAVIOR_HASH"><code class=
"xref cpp cpp-enumerator docutils literal notranslate"><span class=
"pre">memcached_behavior_t::MEMCACHED_BEHAVIOR_HASH
</span></code></a>.
</p>
280 <dt id=
"cmdoption-memslap-u-udp">
281 <code class=
"descname">-U|--udp
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-u-udp" title=
"Permalink to this definition">¶
</a></dt>
282 <dd><p>Enable UDP operation mode.
</p>
286 <dt id=
"cmdoption-memslap-r-noreply">
287 <code class=
"descname">-R|--noreply
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-r-noreply" title=
"Permalink to this definition">¶
</a></dt>
288 <dd><p>Enable the NOREPLY behavior for storage commands.
</p>
292 <dt id=
"cmdoption-memslap-f-flush">
293 <code class=
"descname">-F|--flush
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memslap-f-flush" title=
"Permalink to this definition">¶
</a></dt>
294 <dd><p>Flush all servers prior test.
</p>
298 <dt id=
"cmdoption-memslap-t-test">
299 <code class=
"descname">-t|--test
</code><code class=
"descclassname"> <arg
></code><a class=
"headerlink" href=
"#cmdoption-memslap-t-test" title=
"Permalink to this definition">¶
</a></dt>
300 <dd><p>Test to perform (options: get, mget, set; default: get).
</p>
304 <dt id=
"cmdoption-memslap-c-concurrency">
305 <code class=
"descname">-c|--concurrency
</code><code class=
"descclassname"> <num
></code><a class=
"headerlink" href=
"#cmdoption-memslap-c-concurrency" title=
"Permalink to this definition">¶
</a></dt>
306 <dd><p>Concurrency (number of threads to start; default:
1).
</p>
310 <dt id=
"cmdoption-memslap-e-execute-number">
311 <code class=
"descname">-e|--execute-number
</code><code class=
"descclassname"> <num
></code><a class=
"headerlink" href=
"#cmdoption-memslap-e-execute-number" title=
"Permalink to this definition">¶
</a></dt>
312 <dd><p>Number of times to execute the tests (default:
10000).
</p>
316 <dt id=
"cmdoption-memslap-l-initial-load">
317 <code class=
"descname">-l|--initial-load
</code><code class=
"descclassname"> <num
></code><a class=
"headerlink" href=
"#cmdoption-memslap-l-initial-load" title=
"Permalink to this definition">¶
</a></dt>
318 <dd><p>Number of keys to load before executing tests (default:
10000).
</p>
322 <div class=
"section" id=
"environment">
323 <h2>ENVIRONMENT
<a class=
"headerlink" href=
"#environment" title=
"Permalink to this headline">¶
</a></h2>
325 <dt id=
"envvar-MEMCACHED_SERVERS">
326 <code class=
"descname">MEMCACHED_SERVERS
</code><a class=
"headerlink" href=
"#envvar-MEMCACHED_SERVERS" title=
"Permalink to this definition">¶
</a></dt>
327 <dd><p>Specify a list of servers.
</p>
331 <div class=
"section" id=
"notes">
332 <h2>NOTES
<a class=
"headerlink" href=
"#notes" title=
"Permalink to this headline">¶
</a></h2>
333 <div class=
"section" id=
"program-prefix">
334 <h3>PROGRAM PREFIX
<a class=
"headerlink" href=
"#program-prefix" title=
"Permalink to this headline">¶
</a></h3>
335 <p>The prefix of this program is variable, i.e. it can be configured at build time.
</p>
336 <p>Usually the client programs of
<code class=
"docutils literal notranslate"><span class=
"pre">libmemcached-awesome
</span></code> are prefixed with
<code class=
"docutils literal notranslate"><span class=
"pre">mem
</span></code>, like
<code class=
"docutils literal notranslate"><span class=
"pre">memcat
</span></code> or
<code class=
"docutils literal notranslate"><span class=
"pre">memcp
</span></code>.
</p>
337 <p>It can be configured, though, to replace the prefix with something else like
<code class=
"docutils literal notranslate"><span class=
"pre">mc
</span></code>, in case of that,
338 the client programs of
<code class=
"docutils literal notranslate"><span class=
"pre">libmemcached-awesome
</span></code> would be called
<code class=
"docutils literal notranslate"><span class=
"pre">mccat
</span></code>,
<code class=
"docutils literal notranslate"><span class=
"pre">mccp
</span></code>, etc. respectively.
</p>
341 <div class=
"section" id=
"see-also">
342 <h2>SEE ALSO
<a class=
"headerlink" href=
"#see-also" title=
"Permalink to this headline">¶
</a></h2>
344 <li><a class=
"reference internal" href=
"../libmemcached.html"><span class=
"doc">C/C++ Client Library for memcached
</span></a></li>
355 <div class=
"rst-footer-buttons" role=
"navigation" aria-label=
"footer navigation">
357 <a href=
"memping.html" class=
"btn btn-neutral float-right" title=
"memping" accesskey=
"n" rel=
"next">Next
<span class=
"fa fa-arrow-circle-right"></span></a>
360 <a href=
"memaslap.html" class=
"btn btn-neutral float-left" title=
"memaslap - Load testing and benchmarking a server" accesskey=
"p" rel=
"prev"><span class=
"fa fa-arrow-circle-left"></span> Previous
</a>
367 <div role=
"contentinfo">
369 © <a href=
"../copyright.html">Copyright
</a>
373 Built with
<a href=
"http://sphinx-doc.org/">Sphinx
</a> using a
<a href=
"https://github.com/rtfd/sphinx_rtd_theme">theme
</a> provided by
<a href=
"https://readthedocs.org">Read the Docs
</a>.
386 <script type=
"text/javascript">
388 SphinxRtdTheme.Navigation.enable(true);