1MEMASLAP(1)                      libmemcached                      MEMASLAP(1)
2
3
4

NAME

6       memaslap - libmemcached Documentation
7

SYNOPSIS

9       memaslap [options]
10
11       --help
12
13       MEMCACHED_SERVERS
14

DESCRIPTION

16       memaslap is a load generation and benchmark tool for memcached servers.
17       It generates configurable workload such as threads, concurrencies, con‐
18       nections, run time, overwrite, miss rate, key size, value size, get/set
19       proportion, expected throughput, and so on. Furthermore, it also testss
20       data  verification,  expire-time  verification,  UDP,  binary protocol,
21       facebook test, replication test, multi-get and reconnection, etc.
22
23       Memaslap manages network connections like memcached with libevent. Each
24       thread of memaslap is bound with a CPU core, all the threads don't com‐
25       municate with each other, and there are several socket  connections  in
26       each  thread.  Each  connection keeps key size distribution, value size
27       distribution, and command distribution by itself.
28
29       You can specify servers via the memslap --servers  option  or  via  the
30       environment variable MEMCACHED_SERVERS.
31

FEATURES

33       Memslap is developed to for the following purposes:
34
35       Manages network connections with libevent asynchronously.
36
37       Set both TCP and UDP up to use non-blocking IO.
38
39       Improves parallelism: higher performance in multi-threads environments.
40
41       Improves time efficiency: faster processing speed.
42
43       Generates  key  and  value  more efficiently; key size distribution and
44       value size distribution are configurable.
45
46       Supports get, multi-get, and set commands; command distribution is con‐
47       figurable.
48
49       Supports controllable miss rate and overwrite rate.
50
51       Supports data and expire-time verification.
52
53       Supports dumping statistic information periodically.
54
55       Supports thousands of TCP connections.
56
57       Supports binary protocol.
58
59       Supports facebook test (set with TCP and multi-get with UDP) and repli‐
60       cation test.
61

DETAILS

63   Effective implementation of network.
64       For memaslap, both TCP and UDP use non-blocking  network  IO.  All  the
65       network events are managed by libevent as memcached. The network module
66       of memaslap is similar to memcached. Libevent can ensure  memaslap  can
67       handle network very efficiently.
68
69   Effective implementation of multi-threads and concurrency
70       Memslap  has  the similar implementation of multi-threads to memcached.
71       Memslap creates one or more self-governed threads; each thread is bound
72       with one CPU core if the system testss setting CPU core affinity.
73
74       In  addition,  each  thread  has a libevent to manage the events of the
75       network; each thread has one or more self-governed  concurrencies;  and
76       each concurrency has one or more socket connections. All the concurren‐
77       cies don’t communicate with each other even though they are in the same
78       thread.
79
80       Memslap  can  create  thousands of socket connections, and each concur‐
81       rency has tens of socket  connections.  Each  concurrency  randomly  or
82       sequentially  selects  one socket connection from its socket connection
83       pool to run, so memaslap can ensure each concurrency handles one socket
84       connection  at  any given time. Users can specify the number of concur‐
85       rency and socket connections of each  concurrency  according  to  their
86       expected workload.
87
88   Effective implementation of generating key and value
89       In order to improve time efficiency and space efficiency, memaslap cre‐
90       ates a random characters table with 10M characters. All the suffixes of
91       keys and values are generated from this random characters table.
92
93       Memslap  uses  the  offset in the character table and the length of the
94       string to identify a string. It can save much memory.   Each  key  con‐
95       tains  two  parts,  a prefix and a suffix. The prefix is an uint64_t, 8
96       bytes. In order to verify the data set before, memaslap need to  ensure
97       each key is unique, so it uses the prefix to identify a key. The prefix
98       cannot include illegal characters, such as ‘r’, ‘n’, ‘0’ and ‘  ‘.  And
99       memaslap has an algorithm to ensure that.
100
101       Memslap  doesn’t  generate  all  the  objects  (key-value pairs) at the
102       beginning. It only generates enough objects to  fill  the  task  window
103       (default  10K objects) of each concurrency. Each object has the follow‐
104       ing basic information, key prefix, key suffix offset in  the  character
105       table,  key  length,  value  offset  in  the character table, and value
106       length.
107
108       In the work process, each concurrency sequentially or randomly  selects
109       an  object from the window to do set operation or get operation. At the
110       same time, each concurrency kicks objects out of its  window  and  adds
111       new object into it.
112
113   Simple but useful task scheduling
114       Memslap uses libevent to schedule all the concurrencies of threads, and
115       each concurrency schedules tasks based on the local task  window.  Mem‐
116       slap  assumes that if each concurrency keeps the same key distribution,
117       value distribution and commands distribution,  from  outside,  memaslap
118       keeps all the distribution as a whole.  Each task window includes a lot
119       of objects, each object stores its  basic  information,  such  as  key,
120       value, expire time, and so on. At any time, all the objects in the win‐
121       dow keep the same and fixed key and value distribution. If an object is
122       overwritten,  the value of the object will be updated. Memslap verifies
123       the data or expire-time according to the object information  stored  in
124       the task window.
125
126       Libevent  selects  which concurrency to handle based on a specific net‐
127       work event. Then the concurrency selects which command (get or set)  to
128       operate  based  on the command distribution. If it needs to kick out an
129       old object and add a new object, in order to  keep  the  same  key  and
130       value  distribution,  the  new object must have the same key length and
131       value length.
132
133       If memcached server has two cache  layers  (memory  and  SSD),  running
134       memaslap  with  different  window  sizes  can  get different cache miss
135       rates. If memaslap adds enough objects into the windows at  the  begin‐
136       ning,  and the cache of memcached cannot store all the objects initial‐
137       ized, then memaslap will get some objects from the second cache  layer.
138       It  causes  the  first cache layer to miss. So the user can specify the
139       window size to get the expected miss rate of the first cache layer.
140
141   Useful implementation of multi-servers , UDP,  TCP,  multi-get  and  binary
142       protocol
143       Because  each  thread  is  self-governed, memaslap can assign different
144       threads to handle different memcached servers. This is just one of  the
145       ways  in  which memaslap tests multiple servers. The only limitation is
146       that the number of  servers  cannot  be  greater  than  the  number  of
147       threads.  The  other  way  to  test multiple servers is for replication
148       test. Each concurrency has one  socket  connection  to  each  memcached
149       server.   For  the implementation, memaslap can set some objects to one
150       memcached server, and get these objects from the other servers.
151
152       By default, Memslap does single get. If the  user  specifies  multi-get
153       option, memaslap will collect enough get commands and pack and send the
154       commands together.
155
156       Memslap testss both the ASCII protocol and binary protocol, but it runs
157       on  the  ASCII protocol by default.  Memslap by default runs on the TCP
158       protocol, but it also tests UDP. Because  UDP  is  unreliable,  dropped
159       packages  and out-of-order packages may occur. Memslap creates a memory
160       buffer to handle these problems. Memslap tries to read all the response
161       data  of one command from the server and reorders the response data. If
162       some packages get  lost,  the  waiting  timeout  mechanism  can  ensure
163       half-baked  packages  will  be  discarded  and the next command will be
164       sent.
165

USAGE

167       Below are some usage samples:
168
169       memaslap -s 127.0.0.1:11211 -S 5s
170
171       memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
172
173       memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
174
175       memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
176
177       memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
178
179       memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
180
181       memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
182
183       The user must specify one server at least to run memaslap. The rest  of
184       the parameters have default values, as shown below:
185
186       Thread number = 1                    Concurrency = 16
187
188       Run time = 600 seconds                Configuration file = NULL
189
190       Key size = 64                         Value size = 1024
191
192       Get/set = 9:1                         Window size = 10k
193
194       Execute number = 0                   Single get = true
195
196       Multi-get  =  false                      Number of sockets of each con‐
197       currency = 1
198
199       Reconnect = false                     Data verification = false
200
201       Expire-time verification = false           ASCII protocol = true
202
203       Binary protocol = false                 Dumping statistic information
204
205       periodically = false
206
207       Overwrite proportion = 0%             UDP = false
208
209       TCP = true                           Limit throughput = false
210
211       Facebook test = false                  Replication test = false
212
213   Key size, value size and command distribution.
214       All the distributions are read from the configuration file specified by
215       user  with “—cfg_cmd” option. If the user does not specify a configura‐
216       tion file, memaslap will run with the default distribution (key size  =
217       64,  value  size = 1024, get/set = 9:1). For information on how to edit
218       the configuration file, refer to the “Configuration File” section.
219
220       The minimum key size is 16 bytes; the maximum key size  is  250  bytes.
221       The  precision  of  proportion is 0.001. The proportion of distribution
222       will be rounded to 3 decimal places.
223
224       The minimum value size is 1 bytes; the maximum value size is 1M  bytes.
225       The  precision  of  proportion is 0.001. The proportion of distribution
226       will be rounded to 3 decimal places.  Currently, memaslap  only  testss
227       set  and  get  commands.  And it testss 100% set and 100% get. For 100%
228       get, it will preset some objects to the server.
229
230   Multi-thread and concurrency
231       The high performance of memaslap benefits from the special schedule  of
232       thread  and concurrency. It’s important to specify the proper number of
233       them. The default number of threads is 1; the default number of concur‐
234       rency is 16. The user can use “—threads” and “--concurrency” to specify
235       these variables.
236
237       If the system tests setting CPU affinity  and  the  number  of  threads
238       specified by the user is greater than 1, memaslap will try to bind each
239       thread to a different CPU core. So if you want to get the best  perfor‐
240       mance  memaslap,  it is better to specify the number of thread equal to
241       the number of CPU cores. The number of threads specified  by  the  user
242       can  also  be  less or greater than the number of CPU cores. Because of
243       the limitation of implementation, the number of concurrencies could  be
244       the multiple of the number of threads.
245
246       1. For 8 CPU cores system
247
248       For example:
249
250       --threads=2 --concurrency=128
251
252       --threads=8 --concurrency=128
253
254       --threads=8 --concurrency=256
255
256       --threads=12 --concurrency=144
257
258       2. For 16 CPU cores system
259
260       For example:
261
262       --threads=8 --concurrency=128
263
264       --threads=16 --concurrency=256
265
266       --threads=16 --concurrency=512
267
268       --threads=24 --concurrency=288
269
270       The  memaslap  performs very well, when used to test the performance of
271       memcached servers.  Most of the time, the bottleneck is the network  or
272       the  server. If for some reason the user wants to limit the performance
273       of memaslap, there are two ways to do this:
274
275       Decrease the number of  threads  and  concurrencies.   Use  the  option
276       “--tps”  that  memaslap  provides  to limit the throughput. This option
277       allows the user to get the expected  throughput.  For  example,  assume
278       that  the maximum throughput is 50 kops/s for a specific configuration,
279       you can specify the throughput  equal  to  or  less  than  the  maximum
280       throughput using “--tps” option.
281
282   Window size
283       Most  of  the  time, the user does not need to specify the window size.
284       The default window size is 10k. For Schooner Memcached,  the  user  can
285       specify  different window sizes to get different cache miss rates based
286       on the test case. Memslap testss cache miss rate between 0%  and  100%.
287       If  you use this utility to test the performance of Schooner Memcached,
288       you can specify a proper window size to get  the  expected  cache  miss
289       rate. The formula for calculating window size is as follows:
290
291       Assume  that  the  key  size  is  128 bytes, and the value size is 2048
292       bytes, and concurrency=128.
293
294       1. Small cache cache_size=1M, 100% cache miss (all data get from  SSD).
295       win_size=10k
296
297       2. cache_size=4G
298
299       (1). cache miss rate 0%
300
301       win_size=8k
302
303       (2). cache miss rate 5%
304
305       win_size=11k
306
307       3. cache_size=16G
308
309       (1). cache miss rate 0%
310
311       win_size=32k
312
313       (2). cache miss
314
315       rate 5%
316
317       win_size=46k
318
319       The formula for calculating window size for cache miss rate 0%:
320
321       cache_size / concurrency / (key_size + value_size) * 0.5
322
323       The formula for calculating window size for cache miss rate 5%:
324
325       cache_size / concurrency / (key_size + value_size) * 0.7
326
327   Verification
328       Memslap testss both data verification and expire-time verification. The
329       user can use "--verify=" or "-v" to specify the proportion of data ver‐
330       ification.  In  theory,  it testss 100% data verification. The user can
331       use "--exp_verify=" or "-e" to specify the  proportion  of  expire-time
332       verification. In theory, it testss 100% expire-time verification. Spec‐
333       ify the "--verbose" options to get more detailed error information.
334
335       For example: --exp_verify=0.01 –verify=0.1 , it means that  1%  of  the
336       objects  set  with expire-time, 10% of the objects gotten will be veri‐
337       fied. If the objects are gotten, memaslap will verify  the  expire-time
338       and value.
339
340   multi-servers and multi-config
341       Memslap testss multi-servers based on self-governed thread.  There is a
342       limitation that the number of servers cannot be greater than the number
343       of  threads.  Memslap assigns one thread to handle one server at least.
344       The  user  can  use  the  "--servers="  or  "-s"  option   to   specify
345       multi-servers.
346
347       For example:
348
349       --servers=10.1.1.1:11211,10.1.1.2:11212,10.1.1.3:11213      --threads=6
350       --concurrency=36
351
352       The above command means that there are 6 threads, with each thread hav‐
353       ing  6  concurrencies  and  that  threads  0  and  3  handle  server  0
354       (10.1.1.1); threads 1 and 4 handle server 1 (10.1.1.2);  and  thread  2
355       and 5 handle server 2 (10.1.1.3).
356
357       All the threads and concurrencies in memaslap are self-governed.
358
359       So  is  memaslap. The user can start up several memaslap instances. The
360       user can run memaslap on different client machines to communicate  with
361       the  same memcached server at the same. It is recommended that the user
362       start different memaslap on different machines using the same  configu‐
363       ration.
364
365   Run with execute number mode or time mode
366       The  default  memaslap  runs with time mode. The default run time is 10
367       minutes. If it times out, memaslap will exit. Do not specify both  exe‐
368       cute  number  mode  and  time  mode  at the same time; just specify one
369       instead.
370
371       For example:
372
373       --time=30s (It means the test will run 30 seconds.)
374
375       --execute_number=100000 (It means that after running  100000  commands,
376       the test will exit.)
377
378   Dump statistic information periodically.
379       The user can use "--stat_freq=" or "-S" to specify the frequency.
380
381       For example:
382
383       --stat_freq=20s
384
385       Memslap  will  dump the statistics of the commands (get and set) at the
386       frequency of every 20 seconds.
387
388       For more information on the format of  dumping  statistic  information,
389       refer to “Format of Output” section.
390
391   Multi-get
392       The user can use "--division=" or "-d" to specify multi-get keys count.
393       Memslap by default does single get with TCP. Memslap also  testss  data
394       verification and expire-time verification for multi-get.
395
396       Memslap  testss multi-get with both TCP and UDP. Because of the differ‐
397       ent implementation of the ASCII protocol and binary protocol, there are
398       some  differences  between  the  two.  For the ASCII protocol, memaslap
399       sends one “multi-get” to the server  once.  For  the  binary  protocol,
400       memaslap  sends  several single get commands together as “multi-get” to
401       the server.
402
403   UDP and TCP
404       Memslap testss both UDP and TCP. For TCP, memaslap does  not  reconnect
405       the  memcached server if socket connections are lost. If all the socket
406       connections are lost or memcached server crashes, memaslap  will  exit.
407       If  the user specifies the “--reconnect” option when socket connections
408       are lost, it will reconnect them.
409
410       User can use “--udp” to enable the UDP feature, but UDP comes with some
411       limitations:
412
413       UDP cannot set data more than 1400 bytes.
414
415       UDP  is  not testsed by the binary protocol because the binary protocol
416       of memcached does not tests that.
417
418       UDP doesn’t tests reconnection.
419
420   Facebook test
421       Set data with  TCP  and  multi-get  with  UDP.  Specify  the  following
422       options:
423
424       "--facebook --division=50"
425
426       If you want to create thousands of TCP connections, specify the
427
428       "--conn_sock=" option.
429
430       For example: --facebook --division=50 --conn_sock=200
431
432       The  above command means that memaslap will do facebook test, each con‐
433       currency has 200 socket TCP connections and one UDP socket.
434
435       Memslap sets objects with the TCP socket,  and  multi-gets  50  objects
436       once with the UDP socket.
437
438       If you specify "--division=50", the key size must be less that 25 bytes
439       because the UDP packet size is 1400 bytes.
440
441   Replication test
442       For replication test, the user must  specify  at  least  two  memcached
443       servers.  The user can use “—rep_write=” option to enable feature.
444
445       For example:
446
447       --servers=10.1.1.1:11211,10.1.1.2:11212 –rep_write=2
448
449       The above command means that there are 2 replication memcached servers,
450       memaslap will set objects to both server 0 and server  1,  get  objects
451       which  are  set  to server 0 before from server 1, and also get objects
452       which are set to server 1 before from server 0. If  server  0  crashes,
453       memaslap will only get objects from server 1. If server 0 comes back to
454       life again, memaslap will reconnect server 0.  If  both  server  0  and
455       server 1 crash, memaslap will exit.
456
457   Supports thousands of TCP connections
458       Start memaslap with "--conn_sock=" or "-n" to enable this feature. Make
459       sure that your system can tests opening thousands of files and creating
460       thousands of sockets. However, this feature does not tests reconnection
461       if sockets disconnect.
462
463       For example:
464
465       --threads=8 --concurrency=128 --conn_sock=128
466
467       The above command means that memaslap starts up 8 threads, each  thread
468       has  16 concurrencies, each concurrency has 128 TCP socket connections,
469       and the total number of TCP socket connections is 128 * 128 = 16384.
470
471   Supports binary protocol
472       Start memaslap with "--binary" or "-B" options to enable this  feature.
473       It  testss  all  the above features except UDP, because the latest mem‐
474       cached 1.3.3 does not implement binary UDP protocol.
475
476       For example:
477
478       --binary
479
480       Since memcached 1.3.3 doesn't implement binary UDP  protocol,  memaslap
481       does  not  tests  UDP.  In  addition,  memcached  1.3.3  does not tests
482       multi-get. If you specify "--division=50" option, it just sends 50  get
483       commands together as “mulit-get” to the server.
484

CONFIGURATION FILE

486       This  section  describes  the  format  of  the  configuration file.  By
487       default when no configuration file  is  specified  memaslap  reads  the
488       default one located at ~/.memaslap.cnf.
489
490       Below is a sample configuration file:
491
492          ---------------------------------------------------------------------------
493          #comments should start with '#'
494          #key
495          #start_len end_len proportion
496          #
497          #key length range from start_len to end_len
498          #start_len must be equal to or greater than 16
499          #end_len must be equal to or less than 250
500          #start_len must be equal to or greater than end_len
501          #memaslap will generate keys according to the key range
502          #proportion: indicates keys generated from one range accounts for the total
503          generated keys
504          #
505          #example1: key range 16~100 accounts for 80%
506          #          key range 101~200 accounts for 10%
507          #          key range 201~250 accounts for 10%
508          #          total should be 1 (0.8+0.1+0.1 = 1)
509          #
510          #          16 100 0.8
511          #          101 200 0.1
512          #          201 249 0.1
513          #
514          #example2: all keys length are 128 bytes
515          #
516          #          128 128 1
517          key
518          128 128 1
519          #value
520          #start_len end_len proportion
521          #
522          #value length range from start_len to end_len
523          #start_len must be equal to or greater than 1
524          #end_len must be equal to or less than 1M
525          #start_len must be equal to or greater than end_len
526          #memaslap will generate values according to the value range
527          #proportion: indicates values generated from one range accounts for the
528          total generated values
529          #
530          #example1: value range 1~1000 accounts for 80%
531          #          value range 1001~10000 accounts for 10%
532          #          value range 10001~100000 accounts for 10%
533          #          total should be 1 (0.8+0.1+0.1 = 1)
534          #
535          #          1 1000 0.8
536          #          1001 10000 0.1
537          #          10001 100000 0.1
538          #
539          #example2: all value length are 128 bytes
540          #
541          #          128 128 1
542          value
543          2048 2048 1
544          #cmd
545          #cmd_type cmd_proportion
546          #
547          #currently memaslap only testss get and set command.
548          #
549          #cmd_type
550          #set     0
551          #get     1
552          #
553          #example: set command accounts for 50%
554          #         get command accounts for 50%
555          #         total should be 1 (0.5+0.5 = 1)
556          #
557          #         cmd
558          #         0    0.5
559          #         1    0.5
560          cmd
561          0    0.1
562          1.0 0.9
563

FORMAT OF OUTPUT

565       At  the  beginning, memaslap displays some configuration information as
566       follows:
567
568       servers : 127.0.0.1:11211
569
570       threads count: 1
571
572       concurrency: 16
573
574       run time: 20s
575
576       windows size: 10k
577
578       set proportion: set_prop=0.10
579
580       get proportion: get_prop=0.90
581
582   Where
583       servers : "servers"
584          The servers used by memaslap.
585
586       threads count
587          The number of threads memaslap runs with.
588
589       concurrency
590          The number of concurrencies memaslap runs with.
591
592       run time
593          How long to run memaslap.
594
595       windows size
596          The task window size of each concurrency.
597
598       set proportion
599          The proportion of set command.
600
601       get proportion
602          The proportion of get command.
603
604       The output of dynamic statistics is something like this:
605
606          ---------------------------------------------------------------------------------------------------------------------------------
607          Get Statistics
608          Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
609          Avg(us)  Std_dev    Geo_dist
610          Period   5   345826  69165     65.3      0         27      2198     203
611          95.43      177.29
612          Global  20  1257935  62896     71.8      0         26      3791     224
613          117.79     192.60
614
615
616          Set Statistics
617          Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
618          Avg(us)  Std_dev    Geo_dist
619          Period   5    38425   7685      7.3       0         42      628     240
620          88.05      220.21
621          Global   20   139780  6989      8.0       0         37      3790    253
622          117.93     224.83
623
624
625          Total Statistics
626          Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
627          Avg(us)  Std_dev    Geo_dist
628          Period   5   384252   76850     72.5      0        27      2198     207
629          94.72      181.18
630          Global  20  1397720   69886     79.7      0        26      3791     227
631          117.93     195.60
632          ---------------------------------------------------------------------------------------------------------------------------------
633
634   Where
635       Get Statistics
636          Statistics information of get command
637
638       Set Statistics
639          Statistics information of set command
640
641       Total Statistics
642          Statistics information of both get and set command
643
644       Period
645          Result within a period
646
647       Global
648          Accumulated results
649
650       Ops
651          Total operations
652
653       TPS
654          Throughput, operations/second
655
656       Net
657          The rate of network
658
659       Get_miss
660          How many objects can’t be gotten
661
662       Min
663          The minimum response time
664
665       Max
666          The maximum response time
667
668       Avg:
669          The average response time
670
671       Std_dev
672          Standard deviation of response time
673
674       Geo_dist
675          Geometric distribution based on natural exponential function
676
677       At the end, memaslap will output something like this:
678
679          ---------------------------------------------------------------------------------------------------------------------------------
680          Get Statistics (1257956 events)
681            Min:        26
682            Max:      3791
683            Avg:       224
684            Geo:    192.60
685            Std:    116.23
686                            Log2 Dist:
687                              4:        0       10    84490   215345
688                              8:   484890   459823    12543      824
689                             12:       31
690
691           Set Statistics (139782 events)
692              Min:        37
693              Max:      3790
694              Avg:       253
695              Geo:    224.84
696              Std:    116.83
697              Log2 Dist:
698                4:        0        0     4200 16988
699                8:    50784    65574 2064      167
700                12:        5
701
702            Total Statistics (1397738 events)
703                Min:        26
704                Max:      3791
705                Avg:       227
706                Geo:    195.60
707                Std:    116.60
708                Log2 Dist:
709                  4:        0       10    88690   232333
710                  8:   535674   525397    14607      991
711                  12:       36
712
713          cmd_get: 1257969
714          cmd_set: 139785
715          get_misses: 0
716          verify_misses: 0
717          verify_failed: 0
718          expired_get: 0
719          unexpired_unget: 0
720          written_bytes: 242516030
721          read_bytes: 1003702556
722          object_bytes: 152086080
723          packet_disorder: 0
724          packet_drop: 0
725          udp_timeout: 0
726
727          Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s
728          ---------------------------------------------------------------------------------------------------------------------------------
729
730   Where
731       Get Statistics
732          Get statistics of response time
733
734       Set Statistics
735          Set statistics of response time
736
737       Total Statistics
738          Both get and set statistics of response time
739
740       Min
741          The accumulated and minimum response time
742
743       Max
744          The accumulated and maximum response time
745
746       Avg
747          The accumulated and average response time
748
749       Std
750          Standard deviation of response time
751
752       Log2 Dist
753          Geometric distribution based on logarithm 2
754
755       cmd_get
756          Total get commands done
757
758       cmd_set
759          Total set commands done
760
761       get_misses
762          How many objects can’t be gotten from server
763
764       verify_misses
765          How many objects need to verify but can’t get them
766
767       verify_failed
768          How many objects with insistent value
769
770       expired_get
771          How many objects are expired but we get them
772
773       unexpired_unget
774          How many objects are unexpired but we can’t get them
775
776       written_bytes
777          Total written bytes
778
779       read_bytes
780          Total read bytes
781
782       object_bytes
783          Total object bytes
784
785       packet_disorder
786          How many UDP packages are disorder
787
788       packet_drop
789          How many UDP packages are lost
790
791       udp_timeout
792          How many times UDP time out happen
793
794       Run time
795          Total run time
796
797       Ops
798          Total operations
799
800       TPS
801          Throughput, operations/second
802
803       Net_rate
804          The average rate of network
805

OPTIONS

807       -s, --servers=
808              List one or more servers to connect. Servers count must be  less
809              than   threads   count.   e.g.:  --servers=localhost:1234,local‐
810              host:11211
811
812       -T, --threads=
813              Number of threads to  startup,  better  equal  to  CPU  numbers.
814              Default 8.
815
816       -c, --concurrency=
817              Number of concurrency to simulate with load. Default 128.
818
819       -n, --conn_sock=
820              Number of TCP socks per concurrency. Default 1.
821
822       -x, --execute_number=
823              Number of operations(get and set) to execute for the given test.
824              Default 1000000.
825
826       -t, --time=
827              How long the test to run, suffix: s-seconds, m-minutes, h-hours,
828              d-days e.g.: --time=2h.
829
830       -F, --cfg_cmd=
831              Load  the  configure file to get command,key and value distribu‐
832              tion list.
833
834       -w, --win_size=
835              Task window  size  of  each  concurrency,  suffix:  K,  M  e.g.:
836              --win_size=10k.  Default 10k.
837
838       -X, --fixed_size=
839              Fixed length of value.
840
841       -v, --verify=
842              The proportion of date verification, e.g.: --verify=0.01
843
844       -d, --division=
845              Number of keys to multi-get once. Default 1, means single get.
846
847       -S, --stat_freq=
848              Frequency  of  dumping statistic information. suffix: s-seconds,
849              m-minutes, e.g.: --resp_freq=10s.
850
851       -e, --exp_verify=
852              The proportion of objects with  expire  time,  e.g.:  --exp_ver‐
853              ify=0.01.  Default no object with expire time
854
855       -o, --overwrite=
856              The   proportion   of  objects  need  overwrite,  e.g.:  --over‐
857              write=0.01.  Default never overwrite object.
858
859       -R, --reconnect
860              Reconnect tests, when connection is closed  it  will  be  recon‐
861              nected.
862
863       -U, --udp
864              UDP  tests,  default memaslap uses TCP, TCP port and UDP port of
865              server must be same.
866
867       -a, --facebook
868              Whether it enables facebook  test  feature,  set  with  TCP  and
869              multi-get with UDP.
870
871       -B, --binary
872              Whether it enables binary protocol. Default with ASCII protocol.
873
874       -P, --tps=
875              Expected throughput, suffix: K, e.g.: --tps=10k.
876
877       -p, --rep_write=
878              The first nth servers can write data, e.g.: --rep_write=2.
879
880       -b, --verbose
881              Whether it outputs detailed information when verification fails.
882
883       -h, --help
884              Display this message and then exit.
885
886       -V, --version
887              Display the version of the application and then exit.
888

EXAMPLES

890       memaslap -s 127.0.0.1:11211 -S 5s
891
892       memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
893
894       memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
895
896       memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
897
898       memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
899
900       memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
901
902       memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
903

HOME

905       To find out more information please check: http://libmemcached.org/
906

AUTHORS

908       Mingqiang  Zhuang  <mingqiangzhuang@hengtiansoft.com>  (Schooner  Tech‐
909       nolgy) Brian Aker, <brian@tangent.org>
910

SEE ALSO

912       memcached(1) libmemcached(3)
913

AUTHOR

915       Brian Aker
916
918       2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
919
920
921
922
9231.0.16                         January 31, 2013                    MEMASLAP(1)
Impressum