1MEMASLAP(1)                  libmemcached-awesome                  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,  concurrency,  con‐
18       nections, run time, overwrite, miss rate, key size, value size, get/set
19       proportion, expected throughput, and so on. Furthermore, it also  tests
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 en‐
30       vironment 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 tests 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  concurrency;  and
76       each concurrency has one or more socket connections. All the concurrent
77       tasks don't communicate with each other even though  they  are  in  the
78       same thread.
79
80       Memslap  can  create  thousands of socket connections, and each concur‐
81       rency has tens of socket connections. Each concurrency randomly or  se‐
82       quentially  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 ex‐
86       pected 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 be‐
102       ginning. It only generates enough objects to fill the task window  (de‐
103       fault  10K  objects) of each concurrency. Each object has the following
104       basic information, key prefix, key suffix offset in the  character  ta‐
105       ble, key length, value offset in the character table, and value length.
106
107       In  the work process, each concurrency sequentially or randomly selects
108       an object from the window to do set operation or get operation. At  the
109       same  time,  each  concurrency kicks objects out of its window and adds
110       new object into it.
111
112   Simple but useful task scheduling
113       Memslap uses libevent to schedule all concurrent tasks of threads,  and
114       each  concurrency  schedules tasks based on the local task window. Mem‐
115       slap assumes that if each concurrency keeps the same key  distribution,
116       value  distribution  and  commands distribution, from outside, memaslap
117       keeps all the distribution as a whole.  Each task window includes a lot
118       of  objects,  each  object  stores  its basic information, such as key,
119       value, expire time, and so on. At any time, all the objects in the win‐
120       dow keep the same and fixed key and value distribution. If an object is
121       overwritten, the value of the object will be updated. Memslap  verifies
122       the  data  or expire-time according to the object information stored in
123       the task window.
124
125       Libevent selects which concurrency to handle based on a  specific  net‐
126       work  event. Then the concurrency selects which command (get or set) to
127       operate based on the command distribution. If it needs to kick  out  an
128       old  object  and  add  a  new object, in order to keep the same key and
129       value distribution, the new object must have the same  key  length  and
130       value length.
131
132       If  memcached  server  has  two  cache layers (memory and SSD), running
133       memaslap with different window  sizes  can  get  different  cache  miss
134       rates.  If  memaslap adds enough objects into the windows at the begin‐
135       ning, and the cache of memcached cannot store all the objects  initial‐
136       ized,  then memaslap will get some objects from the second cache layer.
137       It causes the first cache layer to miss. So the user  can  specify  the
138       window size to get the expected miss rate of the first cache layer.
139
140   Useful  implementation  of  multi-servers  , UDP, TCP, multi-get and binary
141       protocol
142       Because each thread is self-governed,  memaslap  can  assign  different
143       threads  to handle different memcached servers. This is just one of the
144       ways in which memaslap tests multiple servers. The only  limitation  is
145       that  the  number  of  servers  cannot  be  greater  than the number of
146       threads. The other way to test  multiple  servers  is  for  replication
147       test.  Each  concurrency  has  one  socket connection to each memcached
148       server.  For the implementation, memaslap can set some objects  to  one
149       memcached server, and get these objects from the other servers.
150
151       By  default,  Memslap  does single get. If the user specifies multi-get
152       option, memaslap will collect enough get commands and pack and send the
153       commands together.
154
155       Memslap  tests both the ASCII protocol and binary protocol, but it runs
156       on the ASCII protocol by default.  Memslap by default runs on  the  TCP
157       protocol,  but  it  also  tests UDP. Because UDP is unreliable, dropped
158       packages and out-of-order packages may occur. Memslap creates a  memory
159       buffer to handle these problems. Memslap tries to read all the response
160       data of one command from the server and reorders the response data.  If
161       some  packages  get  lost,  the  waiting  timeout  mechanism can ensure
162       half-baked packages will be discarded and  the  next  command  will  be
163       sent.
164

USAGE

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

CONFIGURATION FILE

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

FORMAT OF OUTPUT

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

OPTIONS

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

EXAMPLES

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

SEE ALSO

901       memcached(1) libmemcached(3)
902
903
904
905
9061.1                              Feb 02, 2022                      MEMASLAP(1)
Impressum