X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fman%2Fmemaslap.1;h=9df53e7ab69be60f86dc4e8e0a1291bbec1b54be;hb=f065750cfe2a57587f372b80006c6a3399825cff;hp=cc8c0cb74eb737e173e1c6bd616ae92fad44920f;hpb=281c398ba3a10af677494c4453cd09d85ca921e0;p=m6w6%2Flibmemcached diff --git a/docs/man/memaslap.1 b/docs/man/memaslap.1 index cc8c0cb7..9df53e7a 100644 --- a/docs/man/memaslap.1 +++ b/docs/man/memaslap.1 @@ -1,4 +1,4 @@ -.TH "MEMASLAP" "1" "April 08, 2011" "0.47" "libmemcached" +.TH "MEMASLAP" "1" "April 08, 2012" "1.0.6" "libmemcached" .SH NAME memaslap \- libmemcached Documentation . @@ -30,32 +30,34 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .. .\" Man page generated from reStructeredText. . -.sp -memaslap \- Load testing and benchmarking tool for memcached .SH SYNOPSIS .sp -.nf -.ft C memaslap [options] -.ft P -.fi +.INDENT 0.0 +.TP +.B \-\-help +.UNINDENT +.INDENT 0.0 +.TP +.B MEMCACHED_SERVERS +.UNINDENT .SH DESCRIPTION .sp -\fBmemaslap\fP is a load generation and benchmark tool for memcached(1) -servers. It generates configurable workload such as threads, concurrencies, connections, -run time, overwrite, miss rate, key size, value size, get/set proportion, -expected throughput, and so on. Furthermore, it also supports data +\fBmemaslap\fP is a load generation and benchmark tool for memcached +servers. It generates configurable workload such as threads, concurrencies, +connections, run time, overwrite, miss rate, key size, value size, get/set +proportion, expected throughput, and so on. Furthermore, it also testss data verification, expire\-time verification, UDP, binary protocol, facebook test, replication test, multi\-get and reconnection, etc. .sp -Memslap manages network connections like memcached with +Memaslap manages network connections like memcached with libevent. Each thread of memaslap is bound with a CPU core, all the threads don\(aqt communicate with each other, and there are several socket connections in each thread. Each connection keeps key size distribution, value size distribution, and command distribution by itself. .sp -You can specify servers via the \fB\-\-servers\fP option or via the -environment variable \fBMEMCACHED_SERVERS\fP. +You can specify servers via the \fImemslap \-\-servers\fP option or via the +environment variable \fI\%MEMCACHED_SERVERS\fP. .SH FEATURES .sp Memslap is developed to for the following purposes: @@ -94,7 +96,7 @@ memaslap can handle network very efficiently. .sp Memslap has the similar implementation of multi\-threads to memcached. Memslap creates one or more self\-governed threads; -each thread is bound with one CPU core if the system supports setting CPU +each thread is bound with one CPU core if the system testss setting CPU core affinity. .sp In addition, each thread has a libevent to manage the events of the network; @@ -165,9 +167,9 @@ layer. .sp Because each thread is self\-governed, memaslap can assign different threads to handle different memcached servers. This is just one of -the ways in which memaslap supports multiple servers. The only +the ways in which memaslap tests multiple servers. The only limitation is that the number of servers cannot be greater than the number -of threads. The other way to support multiple servers is for replication +of threads. The other way to test multiple servers is for replication test. Each concurrency has one socket connection to each memcached server. For the implementation, memaslap can set some objects to one memcached server, and get these objects from the other servers. @@ -176,10 +178,10 @@ By default, Memslap does single get. If the user specifies multi\-get option, memaslap will collect enough get commands and pack and send the commands together. .sp -Memslap supports both the ASCII protocol and binary protocol, +Memslap testss both the ASCII protocol and binary protocol, but it runs on the ASCII protocol by default. Memslap by default runs on the TCP protocol, but it also -supports UDP. Because UDP is unreliable, dropped packages and out\-of\-order +tests UDP. Because UDP is unreliable, dropped packages and out\-of\-order packages may occur. Memslap creates a memory buffer to handle these problems. Memslap tries to read all the response data of one command from the server and reorders the response data. If some packages @@ -246,8 +248,8 @@ rounded to 3 decimal places. The minimum value size is 1 bytes; the maximum value size is 1M bytes. The precision of proportion is 0.001. The proportion of distribution will be rounded to 3 decimal places. -Currently, memaslap only supports set and get commands. And it -supports 100% set and 100% get. For 100% get, it will preset some objects to +Currently, memaslap only testss set and get commands. And it +testss 100% set and 100% get. For 100% get, it will preset some objects to the server. .SS Multi\-thread and concurrency .sp @@ -257,7 +259,7 @@ number of them. The default number of threads is 1; the default number of concurrency is 16. The user can use “—threads” and “\-\-concurrency” to specify these variables. .sp -If the system supports setting CPU affinity and the number of threads +If the system tests setting CPU affinity and the number of threads specified by the user is greater than 1, memaslap will try to bind each thread to a different CPU core. So if you want to get the best performance memaslap, it is better to specify the number of @@ -267,7 +269,6 @@ of the limitation of implementation, the number of concurrencies could be the multiple of the number of threads. .INDENT 0.0 .IP 1. 3 -. For 8 CPU cores system .UNINDENT .sp @@ -282,7 +283,6 @@ For example: \-\-threads=12 \-\-concurrency=144 .INDENT 0.0 .IP 2. 3 -. For 16 CPU cores system .UNINDENT .sp @@ -316,7 +316,7 @@ throughput using “\-\-tps” option. Most of the time, the user does not need to specify the window size. The default window size is 10k. For Schooner Memcached, the user can specify different window sizes to get different cache miss rates based on the test -case. Memslap supports cache miss rate between 0% and 100%. +case. Memslap testss cache miss rate between 0% and 100%. If you use this utility to test the performance of Schooner Memcached, you can specify a proper window size to get the expected cache miss rate. The formula for calculating window size is as follows: @@ -328,7 +328,6 @@ concurrency=128. win_size=10k .INDENT 0.0 .IP 2. 3 -. cache_size=4G .UNINDENT .sp @@ -341,7 +340,6 @@ win_size=8k win_size=11k .INDENT 0.0 .IP 3. 3 -. cache_size=16G .UNINDENT .sp @@ -364,11 +362,11 @@ The formula for calculating window size for cache miss rate 5%: cache_size / concurrency / (key_size + value_size) * 0.7 .SS Verification .sp -Memslap supports both data verification and expire\-time +Memslap testss both data verification and expire\-time verification. The user can use "\-\-verify=" or "\-v" to specify the proportion -of data verification. In theory, it supports 100% data verification. The +of data verification. In theory, it testss 100% data verification. The user can use "\-\-exp_verify=" or "\-e" to specify the proportion of -expire\-time verification. In theory, it supports 100% expire\-time +expire\-time verification. In theory, it testss 100% expire\-time verification. Specify the "\-\-verbose" options to get more detailed error information. .sp @@ -376,9 +374,9 @@ For example: \-\-exp_verify=0.01 –verify=0.1 , it means that 1% of the objects set with expire\-time, 10% of the objects gotten will be verified. If the objects are gotten, memaslap will verify the expire\-time and value. -.SS multi\-servers and multi\-clients +.SS multi\-servers and multi\-config .sp -Memslap supports multi\-servers based on self\-governed thread. +Memslap testss multi\-servers based on self\-governed thread. There is a limitation that the number of servers cannot be greater than the number of threads. Memslap assigns one thread to handle one server at least. The user can use the "\-\-servers=" or "\-s" option to specify @@ -427,10 +425,10 @@ For more information on the format of dumping statistic information, refer to .SS Multi\-get .sp The user can use "\-\-division=" or "\-d" to specify multi\-get keys count. -Memslap by default does single get with TCP. Memslap also supports data +Memslap by default does single get with TCP. Memslap also testss data verification and expire\-time verification for multi\-get. .sp -Memslap supports multi\-get with both TCP and UDP. Because of +Memslap testss multi\-get with both TCP and UDP. Because of the different implementation of the ASCII protocol and binary protocol, there are some differences between the two. For the ASCII protocol, memaslap sends one “multi\-get” to the server once. For the @@ -438,7 +436,7 @@ binary protocol, memaslap sends several single get commands together as “multi\-get” to the server. .SS UDP and TCP .sp -Memslap supports both UDP and TCP. For TCP, +Memslap testss both UDP and TCP. For TCP, memaslap does not reconnect the memcached server if socket connections are lost. If all the socket connections are lost or memcached server crashes, memaslap will exit. If the user specifies the “\-\-reconnect” @@ -449,10 +447,10 @@ limitations: .sp UDP cannot set data more than 1400 bytes. .sp -UDP is not supported by the binary protocol because the binary protocol of -memcached does not support that. +UDP is not testsed by the binary protocol because the binary protocol of +memcached does not tests that. .sp -UDP doesn’t support reconnection. +UDP doesn’t tests reconnection. .SS Facebook test .sp Set data with TCP and multi\-get with UDP. Specify the following options: @@ -492,8 +490,8 @@ server 0 and server 1 crash, memaslap will exit. .SS Supports thousands of TCP connections .sp Start memaslap with "\-\-conn_sock=" or "\-n" to enable this -feature. Make sure that your system can support opening thousands of files -and creating thousands of sockets. However, this feature does not support +feature. Make sure that your system can tests opening thousands of files +and creating thousands of sockets. However, this feature does not tests reconnection if sockets disconnect. .sp For example: @@ -507,7 +505,7 @@ connections, and the total number of TCP socket connections is 128 * 128 = .SS Supports binary protocol .sp Start memaslap with "\-\-binary" or "\-B" options to enable this -feature. It supports all the above features except UDP, because the latest +feature. It testss all the above features except UDP, because the latest memcached 1.3.3 does not implement binary UDP protocol. .sp For example: @@ -515,7 +513,7 @@ For example: \-\-binary .sp Since memcached 1.3.3 doesn\(aqt implement binary UDP protocol, -memaslap does not support UDP. In addition, memcached 1.3.3 does not support +memaslap does not tests UDP. In addition, memcached 1.3.3 does not tests multi\-get. If you specify "\-\-division=50" option, it just sends 50 get commands together as “mulit\-get” to the server. .SH CONFIGURATION FILE @@ -528,7 +526,7 @@ Below is a sample configuration file: .sp .nf .ft C -*************************************************************************** +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- #comments should start with \(aq#\(aq #key #start_len end_len proportion @@ -583,7 +581,7 @@ value #cmd #cmd_type cmd_proportion # -#currently memaslap only supports get and set command. +#currently memaslap only testss get and set command. # #cmd_type #set 0 @@ -623,7 +621,6 @@ get proportion: get_prop=0.90 servers : "servers" .INDENT 0.0 .INDENT 3.5 -.sp The servers used by memaslap. .UNINDENT .UNINDENT @@ -631,7 +628,6 @@ The servers used by memaslap. threads count .INDENT 0.0 .INDENT 3.5 -.sp The number of threads memaslap runs with. .UNINDENT .UNINDENT @@ -639,7 +635,6 @@ The number of threads memaslap runs with. concurrency .INDENT 0.0 .INDENT 3.5 -.sp The number of concurrencies memaslap runs with. .UNINDENT .UNINDENT @@ -647,7 +642,6 @@ The number of concurrencies memaslap runs with. run time .INDENT 0.0 .INDENT 3.5 -.sp How long to run memaslap. .UNINDENT .UNINDENT @@ -655,7 +649,6 @@ How long to run memaslap. windows size .INDENT 0.0 .INDENT 3.5 -.sp The task window size of each concurrency. .UNINDENT .UNINDENT @@ -663,7 +656,6 @@ The task window size of each concurrency. set proportion .INDENT 0.0 .INDENT 3.5 -.sp The proportion of set command. .UNINDENT .UNINDENT @@ -671,7 +663,6 @@ The proportion of set command. get proportion .INDENT 0.0 .INDENT 3.5 -.sp The proportion of get command. .UNINDENT .UNINDENT @@ -714,7 +705,6 @@ Global 20 1397720 69886 79.7 0 26 3791 227 Get Statistics .INDENT 0.0 .INDENT 3.5 -.sp Statistics information of get command .UNINDENT .UNINDENT @@ -722,7 +712,6 @@ Statistics information of get command Set Statistics .INDENT 0.0 .INDENT 3.5 -.sp Statistics information of set command .UNINDENT .UNINDENT @@ -730,7 +719,6 @@ Statistics information of set command Total Statistics .INDENT 0.0 .INDENT 3.5 -.sp Statistics information of both get and set command .UNINDENT .UNINDENT @@ -738,7 +726,6 @@ Statistics information of both get and set command Period .INDENT 0.0 .INDENT 3.5 -.sp Result within a period .UNINDENT .UNINDENT @@ -746,7 +733,6 @@ Result within a period Global .INDENT 0.0 .INDENT 3.5 -.sp Accumulated results .UNINDENT .UNINDENT @@ -754,7 +740,6 @@ Accumulated results Ops .INDENT 0.0 .INDENT 3.5 -.sp Total operations .UNINDENT .UNINDENT @@ -762,7 +747,6 @@ Total operations TPS .INDENT 0.0 .INDENT 3.5 -.sp Throughput, operations/second .UNINDENT .UNINDENT @@ -770,7 +754,6 @@ Throughput, operations/second Net .INDENT 0.0 .INDENT 3.5 -.sp The rate of network .UNINDENT .UNINDENT @@ -778,7 +761,6 @@ The rate of network Get_miss .INDENT 0.0 .INDENT 3.5 -.sp How many objects can’t be gotten .UNINDENT .UNINDENT @@ -786,7 +768,6 @@ How many objects can’t be gotten Min .INDENT 0.0 .INDENT 3.5 -.sp The minimum response time .UNINDENT .UNINDENT @@ -794,7 +775,6 @@ The minimum response time Max .INDENT 0.0 .INDENT 3.5 -.sp The maximum response time .UNINDENT .UNINDENT @@ -802,7 +782,6 @@ The maximum response time Avg: .INDENT 0.0 .INDENT 3.5 -.sp The average response time .UNINDENT .UNINDENT @@ -810,7 +789,6 @@ The average response time Std_dev .INDENT 0.0 .INDENT 3.5 -.sp Standard deviation of response time .UNINDENT .UNINDENT @@ -818,7 +796,6 @@ Standard deviation of response time Geo_dist .INDENT 0.0 .INDENT 3.5 -.sp Geometric distribution based on natural exponential function .UNINDENT .UNINDENT @@ -884,7 +861,6 @@ Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s Get Statistics .INDENT 0.0 .INDENT 3.5 -.sp Get statistics of response time .UNINDENT .UNINDENT @@ -892,7 +868,6 @@ Get statistics of response time Set Statistics .INDENT 0.0 .INDENT 3.5 -.sp Set statistics of response time .UNINDENT .UNINDENT @@ -900,7 +875,6 @@ Set statistics of response time Total Statistics .INDENT 0.0 .INDENT 3.5 -.sp Both get and set statistics of response time .UNINDENT .UNINDENT @@ -908,7 +882,6 @@ Both get and set statistics of response time Min .INDENT 0.0 .INDENT 3.5 -.sp The accumulated and minimum response time .UNINDENT .UNINDENT @@ -916,7 +889,6 @@ The accumulated and minimum response time Max .INDENT 0.0 .INDENT 3.5 -.sp The accumulated and maximum response time .UNINDENT .UNINDENT @@ -924,7 +896,6 @@ The accumulated and maximum response time Avg .INDENT 0.0 .INDENT 3.5 -.sp The accumulated and average response time .UNINDENT .UNINDENT @@ -932,7 +903,6 @@ The accumulated and average response time Std .INDENT 0.0 .INDENT 3.5 -.sp Standard deviation of response time .UNINDENT .UNINDENT @@ -940,7 +910,6 @@ Standard deviation of response time Log2 Dist .INDENT 0.0 .INDENT 3.5 -.sp Geometric distribution based on logarithm 2 .UNINDENT .UNINDENT @@ -948,7 +917,6 @@ Geometric distribution based on logarithm 2 cmd_get .INDENT 0.0 .INDENT 3.5 -.sp Total get commands done .UNINDENT .UNINDENT @@ -956,7 +924,6 @@ Total get commands done cmd_set .INDENT 0.0 .INDENT 3.5 -.sp Total set commands done .UNINDENT .UNINDENT @@ -964,7 +931,6 @@ Total set commands done get_misses .INDENT 0.0 .INDENT 3.5 -.sp How many objects can’t be gotten from server .UNINDENT .UNINDENT @@ -972,7 +938,6 @@ How many objects can’t be gotten from server verify_misses .INDENT 0.0 .INDENT 3.5 -.sp How many objects need to verify but can’t get them .UNINDENT .UNINDENT @@ -980,7 +945,6 @@ How many objects need to verify but can’t get them verify_failed .INDENT 0.0 .INDENT 3.5 -.sp How many objects with insistent value .UNINDENT .UNINDENT @@ -988,7 +952,6 @@ How many objects with insistent value expired_get .INDENT 0.0 .INDENT 3.5 -.sp How many objects are expired but we get them .UNINDENT .UNINDENT @@ -996,7 +959,6 @@ How many objects are expired but we get them unexpired_unget .INDENT 0.0 .INDENT 3.5 -.sp How many objects are unexpired but we can’t get them .UNINDENT .UNINDENT @@ -1004,7 +966,6 @@ How many objects are unexpired but we can’t get them written_bytes .INDENT 0.0 .INDENT 3.5 -.sp Total written bytes .UNINDENT .UNINDENT @@ -1012,7 +973,6 @@ Total written bytes read_bytes .INDENT 0.0 .INDENT 3.5 -.sp Total read bytes .UNINDENT .UNINDENT @@ -1020,7 +980,6 @@ Total read bytes object_bytes .INDENT 0.0 .INDENT 3.5 -.sp Total object bytes .UNINDENT .UNINDENT @@ -1028,7 +987,6 @@ Total object bytes packet_disorder .INDENT 0.0 .INDENT 3.5 -.sp How many UDP packages are disorder .UNINDENT .UNINDENT @@ -1036,7 +994,6 @@ How many UDP packages are disorder packet_drop .INDENT 0.0 .INDENT 3.5 -.sp How many UDP packages are lost .UNINDENT .UNINDENT @@ -1044,7 +1001,6 @@ How many UDP packages are lost udp_timeout .INDENT 0.0 .INDENT 3.5 -.sp How many times UDP time out happen .UNINDENT .UNINDENT @@ -1052,7 +1008,6 @@ How many times UDP time out happen Run time .INDENT 0.0 .INDENT 3.5 -.sp Total run time .UNINDENT .UNINDENT @@ -1060,7 +1015,6 @@ Total run time Ops .INDENT 0.0 .INDENT 3.5 -.sp Total operations .UNINDENT .UNINDENT @@ -1068,7 +1022,6 @@ Total operations TPS .INDENT 0.0 .INDENT 3.5 -.sp Throughput, operations/second .UNINDENT .UNINDENT @@ -1076,7 +1029,6 @@ Throughput, operations/second Net_rate .INDENT 0.0 .INDENT 3.5 -.sp The average rate of network .UNINDENT .UNINDENT @@ -1084,109 +1036,86 @@ The average rate of network .INDENT 0.0 .TP .B \-s, \-\-servers= -. List one or more servers to connect. Servers count must be less than threads count. e.g.: \-\-servers=localhost:1234,localhost:11211 .TP .B \-T, \-\-threads= -. Number of threads to startup, better equal to CPU numbers. Default 8. .TP .B \-c, \-\-concurrency= -. Number of concurrency to simulate with load. Default 128. .TP .B \-n, \-\-conn_sock= -. Number of TCP socks per concurrency. Default 1. .TP .B \-x, \-\-execute_number= -. Number of operations(get and set) to execute for the given test. Default 1000000. .TP .B \-t, \-\-time= -. How long the test to run, suffix: s\-seconds, m\-minutes, h\-hours, d\-days e.g.: \-\-time=2h. .TP .B \-F, \-\-cfg_cmd= -. Load the configure file to get command,key and value distribution list. .TP .B \-w, \-\-win_size= -. Task window size of each concurrency, suffix: K, M e.g.: \-\-win_size=10k. Default 10k. .TP .B \-X, \-\-fixed_size= -. Fixed length of value. .TP .B \-v, \-\-verify= -. The proportion of date verification, e.g.: \-\-verify=0.01 .TP .B \-d, \-\-division= -. Number of keys to multi\-get once. Default 1, means single get. .TP .B \-S, \-\-stat_freq= -. Frequency of dumping statistic information. suffix: s\-seconds, m\-minutes, e.g.: \-\-resp_freq=10s. .TP .B \-e, \-\-exp_verify= -. The proportion of objects with expire time, e.g.: \-\-exp_verify=0.01. Default no object with expire time .TP .B \-o, \-\-overwrite= -. The proportion of objects need overwrite, e.g.: \-\-overwrite=0.01. Default never overwrite object. .UNINDENT .INDENT 0.0 .TP .B \-R, \-\-reconnect -. -Reconnect support, when connection is closed it will be reconnected. +Reconnect tests, when connection is closed it will be reconnected. .TP .B \-U, \-\-udp -. -UDP support, default memaslap uses TCP, TCP port and UDP port of +UDP tests, default memaslap uses TCP, TCP port and UDP port of server must be same. .TP .B \-a, \-\-facebook -. Whether it enables facebook test feature, set with TCP and multi\-get with UDP. .TP .B \-B, \-\-binary -. Whether it enables binary protocol. Default with ASCII protocol. .UNINDENT .INDENT 0.0 .TP .B \-P, \-\-tps= -. Expected throughput, suffix: K, e.g.: \-\-tps=10k. .TP .B \-p, \-\-rep_write= -. The first nth servers can write data, e.g.: \-\-rep_write=2. .UNINDENT .INDENT 0.0 .TP .B \-b, \-\-verbose -. Whether it outputs detailed information when verification fails. .TP .B \-h, \-\-help -. Display this message and then exit. .TP .B \-V, \-\-version -. Display the version of the application and then exit. .UNINDENT .SH EXAMPLES @@ -1207,18 +1136,18 @@ memaslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m \-p 2 .SH HOME .sp To find out more information please check: -\fI\%http://launchpad.org/libmemcached\fP +\fI\%http://libmemcached.org/\fP .SH AUTHORS .sp Mingqiang Zhuang <\fI\%mingqiangzhuang@hengtiansoft.com\fP> (Schooner Technolgy) Brian Aker, <\fI\%brian@tangent.org\fP> .SH SEE ALSO .sp -\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP +\fImemcached(1)\fP \fIlibmemcached(3)\fP .SH AUTHOR Brian Aker .SH COPYRIGHT -2011, Brian Aker +2011, Brian Aker DataDifferential, http://datadifferential.com/ .\" Generated by docutils manpage writer. .\" .