1MEMSLAP.POP(1)                      memslap                     MEMSLAP.POP(1)
2
3
4

NAME

6       memslap - Load testing and benchmarking tool for memcached
7

SYNOPSIS

9         memslap [options]
10

DESCRIPTION

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

FEATURES

30       Memslap is developed to for the following purposes:
31
32       Manages network connections with libevent asynchronously.
33       Set both TCP and UDP up to use non-blocking IO.
34       Improves parallelism: higher performance in multi-threads environments.
35       Improves time efficiency: faster processing speed.
36       Generates key and value more efficiently; key size distribution and
37       value size distribution are configurable.
38       Supports get, multi-get, and set commands; command distribution is
39       configurable.
40       Supports controllable miss rate and overwrite rate.
41       Supports data and expire-time verification.
42       Supports dumping statistic information periodically.
43       Supports thousands of TCP connections.
44       Supports binary protocol.
45       Supports facebook test (set with TCP and multi-get with UDP) and
46       replication test.
47

DETAILS

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

USAGE

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

Configuration file

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

Format of output

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

OPTIONS

773       -s, --servers=
774           List one or more servers to connect. Servers count must be less
775       than
776           threads count. e.g.: --servers=localhost:1234,localhost:11211
777
778       -T, --threads=
779           Number of threads to startup, better equal to CPU numbers. Default
780       8.
781
782       -c, --concurrency=
783           Number of concurrency to simulate with load. Default 128.
784
785       -n, --conn_sock=
786           Number of TCP socks per concurrency. Default 1.
787
788       -x, --execute_number=
789           Number of operations(get and set) to execute for the
790           given test. Default 1000000.
791
792       -t, --time=
793           How long the test to run, suffix: s-seconds, m-minutes, h-hours,
794           d-days e.g.: --time=2h.
795
796       -F, --cfg_cmd=
797           Load the configure file to get command,key and value distribution
798       list.
799
800       -w, --win_size=
801           Task window size of each concurrency, suffix: K, M e.g.:
802       --win_size=10k.
803           Default 10k.
804
805       -X, --fixed_size=
806           Fixed length of value.
807
808       -v, --verify=
809           The proportion of date verification, e.g.: --verify=0.01
810
811       -d, --division=
812           Number of keys to multi-get once. Default 1, means single get.
813
814       -S, --stat_freq=
815           Frequency of dumping statistic information. suffix: s-seconds,
816           m-minutes, e.g.: --resp_freq=10s.
817
818       -e, --exp_verify=
819           The proportion of objects with expire time, e.g.:
820       --exp_verify=0.01.
821           Default no object with expire time
822
823       -o, --overwrite=
824           The proportion of objects need overwrite, e.g.: --overwrite=0.01.
825           Default never overwrite object.
826
827       -R, --reconnect
828           Reconnect support, when connection is closed it will be
829       reconnected.
830
831       -U, --udp
832           UDP support, default memslap uses TCP, TCP port and UDP port of
833           server must be same.
834
835       -a, --facebook
836           Whether it enables facebook test feature, set with TCP and multi-
837       get with UDP.
838
839       -B, --binary
840           Whether it enables binary protocol. Default with ASCII protocol.
841
842       -P, --tps=
843           Expected throughput, suffix: K, e.g.: --tps=10k.
844
845       -p, --rep_write=
846           The first nth servers can write data, e.g.: --rep_write=2.
847
848       -b, --verbose
849           Whether it outputs detailed information when verification fails.
850
851       -h, --help
852           Display this message and then exit.
853
854       -V, --version
855           Display the version of the application and then exit.
856

EXAMPLES

858       memslap -s 127.0.0.1:11211 -S 5s
859
860       memslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
861
862       memslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
863
864       memslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
865
866       memslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
867
868       memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
869
870       memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
871

HOME

873       To find out more information please check:
874       <http://launchpad.org/libmemcached>
875

AUTHORS

877       Mingqiang Zhuang <mingqiangzhuang@hengtiansoft.com> (Schooner
878       Technolgy) Brian Aker, <brian@tangent.org>
879

SEE ALSO

881       memcached(1) libmemcached(3)
882
883
884
885                                  2010-06-28                    MEMSLAP.POP(1)
Impressum