1MEMASLAP(1) libmemcached-awesome MEMASLAP(1)
2
3
4
6 memaslap - libmemcached Documentation
7
9 memaslap [options]
10
11 --help
12
13 --servers
14
15 MEMCACHED_SERVERS
16
18 memaslap is a load generation and benchmark tool for memcached servers.
19 It generates configurable workload such as threads, concurrency, con‐
20 nections, run time, overwrite, miss rate, key size, value size, get/set
21 proportion, expected throughput, and so on. Furthermore, it also tests
22 data verification, expire-time verification, UDP, binary protocol,
23 facebook test, replication test, multi-get and reconnection, etc.
24
25 Memaslap manages network connections like memcached with libevent. Each
26 thread of memaslap is bound with a CPU core, all the threads don't com‐
27 municate with each other, and there are several socket connections in
28 each thread. Each connection keeps key size distribution, value size
29 distribution, and command distribution by itself.
30
31 You can specify servers via the memaslap --servers option or via the
32 environment variable MEMCACHED_SERVERS.
33
35 Memslap is developed to for the following purposes:
36
37 Manages network connections with libevent asynchronously.
38
39 Set both TCP and UDP up to use non-blocking IO.
40
41 Improves parallelism: higher performance in multi-threads environments.
42
43 Improves time efficiency: faster processing speed.
44
45 Generates key and value more efficiently; key size distribution and
46 value size distribution are configurable.
47
48 Supports get, multi-get, and set commands; command distribution is con‐
49 figurable.
50
51 Supports controllable miss rate and overwrite rate.
52
53 Supports data and expire-time verification.
54
55 Supports dumping statistic information periodically.
56
57 Supports thousands of TCP connections.
58
59 Supports binary protocol.
60
61 Supports facebook test (set with TCP and multi-get with UDP) and repli‐
62 cation test.
63
65 Effective implementation of network.
66 For memaslap, both TCP and UDP use non-blocking network IO. All the
67 network events are managed by libevent as memcached. The network module
68 of memaslap is similar to memcached. Libevent can ensure memaslap can
69 handle network very efficiently.
70
71 Effective implementation of multi-threads and concurrency
72 Memslap has the similar implementation of multi-threads to memcached.
73 Memslap creates one or more self-governed threads; each thread is bound
74 with one CPU core if the system tests setting CPU core affinity.
75
76 In addition, each thread has a libevent to manage the events of the
77 network; each thread has one or more self-governed concurrency; and
78 each concurrency has one or more socket connections. All the concurrent
79 tasks don't communicate with each other even though they are in the
80 same thread.
81
82 Memslap can create thousands of socket connections, and each concur‐
83 rency has tens of socket connections. Each concurrency randomly or se‐
84 quentially selects one socket connection from its socket connection
85 pool to run, so memaslap can ensure each concurrency handles one socket
86 connection at any given time. Users can specify the number of concur‐
87 rency and socket connections of each concurrency according to their ex‐
88 pected workload.
89
90 Effective implementation of generating key and value
91 In order to improve time efficiency and space efficiency, memaslap cre‐
92 ates a random characters table with 10M characters. All the suffixes of
93 keys and values are generated from this random characters table.
94
95 Memslap uses the offset in the character table and the length of the
96 string to identify a string. It can save much memory. Each key con‐
97 tains two parts, a prefix and a suffix. The prefix is an uint64_t, 8
98 bytes. In order to verify the data set before, memaslap need to ensure
99 each key is unique, so it uses the prefix to identify a key. The prefix
100 cannot include illegal characters, such as 'r', 'n', '0' and ' '. And
101 memaslap has an algorithm to ensure that.
102
103 Memslap doesn't generate all the objects (key-value pairs) at the be‐
104 ginning. It only generates enough objects to fill the task window (de‐
105 fault 10K objects) of each concurrency. Each object has the following
106 basic information, key prefix, key suffix offset in the character ta‐
107 ble, key length, value offset in the character table, and value length.
108
109 In the work process, each concurrency sequentially or randomly selects
110 an object from the window to do set operation or get operation. At the
111 same time, each concurrency kicks objects out of its window and adds
112 new object into it.
113
114 Simple but useful task scheduling
115 Memslap uses libevent to schedule all concurrent tasks of threads, and
116 each concurrency schedules tasks based on the local task window. Mem‐
117 slap assumes that if each concurrency keeps the same key distribution,
118 value distribution and commands distribution, from outside, memaslap
119 keeps all the distribution as a whole. Each task window includes a lot
120 of objects, each object stores its basic information, such as key,
121 value, expire time, and so on. At any time, all the objects in the win‐
122 dow keep the same and fixed key and value distribution. If an object is
123 overwritten, the value of the object will be updated. Memslap verifies
124 the data or expire-time according to the object information stored in
125 the task window.
126
127 Libevent selects which concurrency to handle based on a specific net‐
128 work event. Then the concurrency selects which command (get or set) to
129 operate based on the command distribution. If it needs to kick out an
130 old object and add a new object, in order to keep the same key and
131 value distribution, the new object must have the same key length and
132 value length.
133
134 If memcached server has two cache layers (memory and SSD), running
135 memaslap with different window sizes can get different cache miss
136 rates. If memaslap adds enough objects into the windows at the begin‐
137 ning, and the cache of memcached cannot store all the objects initial‐
138 ized, then memaslap will get some objects from the second cache layer.
139 It causes the first cache layer to miss. So the user can specify the
140 window size to get the expected miss rate of the first cache layer.
141
142 Useful implementation of multi-servers , UDP, TCP, multi-get and binary
143 protocol
144 Because each thread is self-governed, memaslap can assign different
145 threads to handle different memcached servers. This is just one of the
146 ways in which memaslap tests multiple servers. The only limitation is
147 that the number of servers cannot be greater than the number of
148 threads. The other way to test multiple servers is for replication
149 test. Each concurrency has one socket connection to each memcached
150 server. For the implementation, memaslap can set some objects to one
151 memcached server, and get these objects from the other servers.
152
153 By default, Memslap does single get. If the user specifies multi-get
154 option, memaslap will collect enough get commands and pack and send the
155 commands together.
156
157 Memslap tests both the ASCII protocol and binary protocol, but it runs
158 on the ASCII protocol by default. Memslap by default runs on the TCP
159 protocol, but it also tests UDP. Because UDP is unreliable, dropped
160 packages and out-of-order packages may occur. Memslap creates a memory
161 buffer to handle these problems. Memslap tries to read all the response
162 data of one command from the server and reorders the response data. If
163 some packages get lost, the waiting timeout mechanism can ensure
164 half-baked packages will be discarded and the next command will be
165 sent.
166
168 Below are some usage samples:
169
170 memaslap -s 127.0.0.1:11211 -S 5s
171
172 memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
173
174 memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
175
176 memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
177
178 memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
179
180 memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
181
182 memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
183
184 The user must specify one server at least to run memaslap. The rest of
185 the parameters have default values, as shown below:
186
187 Thread number = 1 Concurrency = 16
188
189 Run time = 600 seconds Configuration file = NULL
190
191 Key size = 64 Value size = 1024
192
193 Get/set = 9:1 Window size = 10k
194
195 Execute number = 0 Single get = true
196
197 Multi-get = false Number of sockets of each concur‐
198 rency = 1
199
200 Reconnect = false Data verification = false
201
202 Expire-time verification = false ASCII protocol = true
203
204 Binary protocol = false Dumping statistic information pe‐
205 riodically = 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 tests
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 al‐
277 lows the user to get the expected throughput. For example, assume that
278 the maximum throughput is 50 kops/s for a specific configuration, you
279 can specify the throughput equal to or less than the maximum throughput
280 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 in‐
369 stead.
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 tested by the binary protocol because the binary protocol of
416 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 op‐
422 tions:
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 "multi-get" to the server.
484
486 This section describes the format of the configuration file. By de‐
487 fault when no configuration file is specified memaslap reads the de‐
488 fault 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
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 Set Statistics
615
616 Type Time(s) Ops TPS(ops/s) Net(M/s) Get_miss Min(us) Max(us)
617 Avg(us) Std_dev Geo_dist
618 Period 5 38425 7685 7.3 0 42 628 240
619 88.05 220.21
620 Global 20 139780 6989 8.0 0 37 3790 253
621 117.93 224.83
622 Total Statistics
623
624 Type Time(s) Ops TPS(ops/s) Net(M/s) Get_miss Min(us) Max(us)
625 Avg(us) Std_dev Geo_dist
626 Period 5 384252 76850 72.5 0 27 2198 207
627 94.72 181.18
628 Global 20 1397720 69886 79.7 0 26 3791 227
629 117.93 195.60
630 ---------------------------------------------------------------------------------------------------------------------------------
631
632 Where
633 Get Statistics
634 Statistics information of get command
635
636 Set Statistics
637 Statistics information of set command
638
639 Total Statistics
640 Statistics information of both get and set command
641
642 Period
643 Result within a period
644
645 Global
646 Accumulated results
647
648 Ops
649 Total operations
650
651 TPS
652 Throughput, operations/second
653
654 Net
655 The rate of network
656
657 Get_miss
658 How many objects can't be gotten
659
660 Min
661 The minimum response time
662
663 Max
664 The maximum response time
665
666 Avg:
667 The average response time
668
669 Std_dev
670 Standard deviation of response time
671
672 Geo_dist
673 Geometric distribution based on natural exponential function
674
675 At the end, memaslap will output something like this:
676
677 ---------------------------------------------------------------------------------------------------------------------------------
678 Get Statistics (1257956 events)
679 Min: 26
680 Max: 3791
681 Avg: 224
682 Geo: 192.60
683 Std: 116.23
684 Log2 Dist:
685 4: 0 10 84490 215345
686 8: 484890 459823 12543 824
687 12: 31
688
689 Set Statistics (139782 events)
690 Min: 37
691 Max: 3790
692 Avg: 253
693 Geo: 224.84
694 Std: 116.83
695 Log2 Dist:
696 4: 0 0 4200 16988
697 8: 50784 65574 2064 167
698 12: 5
699
700 Total Statistics (1397738 events)
701 Min: 26
702 Max: 3791
703 Avg: 227
704 Geo: 195.60
705 Std: 116.60
706 Log2 Dist:
707 4: 0 10 88690 232333
708 8: 535674 525397 14607 991
709 12: 36
710
711 cmd_get: 1257969
712 cmd_set: 139785
713 get_misses: 0
714 verify_misses: 0
715 verify_failed: 0
716 expired_get: 0
717 unexpired_unget: 0
718 written_bytes: 242516030
719 read_bytes: 1003702556
720 object_bytes: 152086080
721 packet_disorder: 0
722 packet_drop: 0
723 udp_timeout: 0
724
725 Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s
726 ---------------------------------------------------------------------------------------------------------------------------------
727
728 Where
729 Get Statistics
730 Get statistics of response time
731
732 Set Statistics
733 Set statistics of response time
734
735 Total Statistics
736 Both get and set statistics of response time
737
738 Min
739 The accumulated and minimum response time
740
741 Max
742 The accumulated and maximum response time
743
744 Avg
745 The accumulated and average response time
746
747 Std
748 Standard deviation of response time
749
750 Log2 Dist
751 Geometric distribution based on logarithm 2
752
753 cmd_get
754 Total get commands done
755
756 cmd_set
757 Total set commands done
758
759 get_misses
760 How many objects can't be gotten from server
761
762 verify_misses
763 How many objects need to verify but can't get them
764
765 verify_failed
766 How many objects with insistent value
767
768 expired_get
769 How many objects are expired but we get them
770
771 unexpired_unget
772 How many objects are unexpired but we can't get them
773
774 written_bytes
775 Total written bytes
776
777 read_bytes
778 Total read bytes
779
780 object_bytes
781 Total object bytes
782
783 packet_disorder
784 How many UDP packages are disorder
785
786 packet_drop
787 How many UDP packages are lost
788
789 udp_timeout
790 How many times UDP time out happen
791
792 Run time
793 Total run time
794
795 Ops
796 Total operations
797
798 TPS
799 Throughput, operations/second
800
801 Net_rate
802 The average rate of network
803
805 -s, --servers=
806 List one or more servers to connect. Servers count must be less
807 than threads count. e.g.: --servers=localhost:1234,local‐
808 host:11211
809
810 -T, --threads=
811 Number of threads to startup, better equal to CPU numbers. De‐
812 fault 8.
813
814 -c, --concurrency=
815 Number of concurrency to simulate with load. Default 128.
816
817 -n, --conn_sock=
818 Number of TCP socks per concurrency. Default 1.
819
820 -x, --execute_number=
821 Number of operations(get and set) to execute for the given test.
822 Default 1000000.
823
824 -t, --time=
825 How long the test to run, suffix: s-seconds, m-minutes, h-hours,
826 d-days e.g.: --time=2h.
827
828 -F, --cfg_cmd=
829 Load the configure file to get command,key and value distribu‐
830 tion list.
831
832 -w, --win_size=
833 Task window size of each concurrency, suffix: K, M e.g.:
834 --win_size=10k. Default 10k.
835
836 -X, --fixed_size=
837 Fixed length of value.
838
839 -v, --verify=
840 The proportion of date verification, e.g.: --verify=0.01
841
842 -d, --division=
843 Number of keys to multi-get once. Default 1, means single get.
844
845 -S, --stat_freq=
846 Frequency of dumping statistic information. suffix: s-seconds,
847 m-minutes, e.g.: --resp_freq=10s.
848
849 -e, --exp_verify=
850 The proportion of objects with expire time, e.g.: --exp_ver‐
851 ify=0.01. Default no object with expire time
852
853 -o, --overwrite=
854 The proportion of objects need overwrite, e.g.: --over‐
855 write=0.01. Default never overwrite object.
856
857 -R, --reconnect
858 Reconnect tests, when connection is closed it will be recon‐
859 nected.
860
861 -U, --udp
862 UDP tests, default memaslap uses TCP, TCP port and UDP port of
863 server must be same.
864
865 -a, --facebook
866 Whether it enables facebook test feature, set with TCP and
867 multi-get with UDP.
868
869 -B, --binary
870 Whether it enables binary protocol. Default with ASCII protocol.
871
872 -P, --tps=
873 Expected throughput, suffix: K, e.g.: --tps=10k.
874
875 -p, --rep_write=
876 The first nth servers can write data, e.g.: --rep_write=2.
877
878 -b, --verbose
879 Whether it outputs detailed information when verification fails.
880
881 -h, --help
882 Display this message and then exit.
883
884 -V, --version
885 Display the version of the application and then exit.
886
888 memaslap -s 127.0.0.1:11211 -S 5s
889
890 memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
891
892 memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
893
894 memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
895
896 memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
897
898 memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
899
900 memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
901
903 The prefix of this program is variable, i.e. it can be configured at
904 build time.
905
906 Usually the client programs of libmemcached-awesome are prefixed with
907 mem, like memcat or memcp.
908
909 It can be configured, though, to replace the prefix with something else
910 like mc, in case of that, the client programs of libmemcached-awesome
911 would be called mccat, mccp, etc. respectively.
912
913 This is a contributed program.
914
915 This program doesn't follow the standard flag/option scheme.
916
918 memcached(1) libmemcached(3)
919
920
921
922
9231.1 Jul 20, 2023 MEMASLAP(1)