-.TH "MEMASLAP" "1" "April 10, 2011" "0.47" "libmemcached"
+.TH "MEMASLAP" "1" "April 28, 2012" "1.0.7" "libmemcached"
.SH NAME
memaslap \- libmemcached Documentation
.
.
.SH SYNOPSIS
.sp
-:program:: \fImemaslap\fP
+memaslap [options]
.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 testss 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:
.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 testss 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 tests 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.
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
-testss 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
concurrency is 16. The user can use “—threads” and “\-\-concurrency” to
specify these variables.
.sp
-If the system testss 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
the multiple of the number of threads.
.INDENT 0.0
.IP 1. 3
-.
For 8 CPU cores system
.UNINDENT
.sp
\-\-threads=12 \-\-concurrency=144
.INDENT 0.0
.IP 2. 3
-.
For 16 CPU cores system
.UNINDENT
.sp
win_size=10k
.INDENT 0.0
.IP 2. 3
-.
cache_size=4G
.UNINDENT
.sp
win_size=11k
.INDENT 0.0
.IP 3. 3
-.
cache_size=16G
.UNINDENT
.sp
servers : "servers"
.INDENT 0.0
.INDENT 3.5
-.sp
The servers used by memaslap.
.UNINDENT
.UNINDENT
threads count
.INDENT 0.0
.INDENT 3.5
-.sp
The number of threads memaslap runs with.
.UNINDENT
.UNINDENT
concurrency
.INDENT 0.0
.INDENT 3.5
-.sp
The number of concurrencies memaslap runs with.
.UNINDENT
.UNINDENT
run time
.INDENT 0.0
.INDENT 3.5
-.sp
How long to run memaslap.
.UNINDENT
.UNINDENT
windows size
.INDENT 0.0
.INDENT 3.5
-.sp
The task window size of each concurrency.
.UNINDENT
.UNINDENT
set proportion
.INDENT 0.0
.INDENT 3.5
-.sp
The proportion of set command.
.UNINDENT
.UNINDENT
get proportion
.INDENT 0.0
.INDENT 3.5
-.sp
The proportion of get command.
.UNINDENT
.UNINDENT
Get Statistics
.INDENT 0.0
.INDENT 3.5
-.sp
Statistics information of get command
.UNINDENT
.UNINDENT
Set Statistics
.INDENT 0.0
.INDENT 3.5
-.sp
Statistics information of set command
.UNINDENT
.UNINDENT
Total Statistics
.INDENT 0.0
.INDENT 3.5
-.sp
Statistics information of both get and set command
.UNINDENT
.UNINDENT
Period
.INDENT 0.0
.INDENT 3.5
-.sp
Result within a period
.UNINDENT
.UNINDENT
Global
.INDENT 0.0
.INDENT 3.5
-.sp
Accumulated results
.UNINDENT
.UNINDENT
Ops
.INDENT 0.0
.INDENT 3.5
-.sp
Total operations
.UNINDENT
.UNINDENT
TPS
.INDENT 0.0
.INDENT 3.5
-.sp
Throughput, operations/second
.UNINDENT
.UNINDENT
Net
.INDENT 0.0
.INDENT 3.5
-.sp
The rate of network
.UNINDENT
.UNINDENT
Get_miss
.INDENT 0.0
.INDENT 3.5
-.sp
How many objects can’t be gotten
.UNINDENT
.UNINDENT
Min
.INDENT 0.0
.INDENT 3.5
-.sp
The minimum response time
.UNINDENT
.UNINDENT
Max
.INDENT 0.0
.INDENT 3.5
-.sp
The maximum response time
.UNINDENT
.UNINDENT
Avg:
.INDENT 0.0
.INDENT 3.5
-.sp
The average response time
.UNINDENT
.UNINDENT
Std_dev
.INDENT 0.0
.INDENT 3.5
-.sp
Standard deviation of response time
.UNINDENT
.UNINDENT
Geo_dist
.INDENT 0.0
.INDENT 3.5
-.sp
Geometric distribution based on natural exponential function
.UNINDENT
.UNINDENT
Get Statistics
.INDENT 0.0
.INDENT 3.5
-.sp
Get statistics of response time
.UNINDENT
.UNINDENT
Set Statistics
.INDENT 0.0
.INDENT 3.5
-.sp
Set statistics of response time
.UNINDENT
.UNINDENT
Total Statistics
.INDENT 0.0
.INDENT 3.5
-.sp
Both get and set statistics of response time
.UNINDENT
.UNINDENT
Min
.INDENT 0.0
.INDENT 3.5
-.sp
The accumulated and minimum response time
.UNINDENT
.UNINDENT
Max
.INDENT 0.0
.INDENT 3.5
-.sp
The accumulated and maximum response time
.UNINDENT
.UNINDENT
Avg
.INDENT 0.0
.INDENT 3.5
-.sp
The accumulated and average response time
.UNINDENT
.UNINDENT
Std
.INDENT 0.0
.INDENT 3.5
-.sp
Standard deviation of response time
.UNINDENT
.UNINDENT
Log2 Dist
.INDENT 0.0
.INDENT 3.5
-.sp
Geometric distribution based on logarithm 2
.UNINDENT
.UNINDENT
cmd_get
.INDENT 0.0
.INDENT 3.5
-.sp
Total get commands done
.UNINDENT
.UNINDENT
cmd_set
.INDENT 0.0
.INDENT 3.5
-.sp
Total set commands done
.UNINDENT
.UNINDENT
get_misses
.INDENT 0.0
.INDENT 3.5
-.sp
How many objects can’t be gotten from server
.UNINDENT
.UNINDENT
verify_misses
.INDENT 0.0
.INDENT 3.5
-.sp
How many objects need to verify but can’t get them
.UNINDENT
.UNINDENT
verify_failed
.INDENT 0.0
.INDENT 3.5
-.sp
How many objects with insistent value
.UNINDENT
.UNINDENT
expired_get
.INDENT 0.0
.INDENT 3.5
-.sp
How many objects are expired but we get them
.UNINDENT
.UNINDENT
unexpired_unget
.INDENT 0.0
.INDENT 3.5
-.sp
How many objects are unexpired but we can’t get them
.UNINDENT
.UNINDENT
written_bytes
.INDENT 0.0
.INDENT 3.5
-.sp
Total written bytes
.UNINDENT
.UNINDENT
read_bytes
.INDENT 0.0
.INDENT 3.5
-.sp
Total read bytes
.UNINDENT
.UNINDENT
object_bytes
.INDENT 0.0
.INDENT 3.5
-.sp
Total object bytes
.UNINDENT
.UNINDENT
packet_disorder
.INDENT 0.0
.INDENT 3.5
-.sp
How many UDP packages are disorder
.UNINDENT
.UNINDENT
packet_drop
.INDENT 0.0
.INDENT 3.5
-.sp
How many UDP packages are lost
.UNINDENT
.UNINDENT
udp_timeout
.INDENT 0.0
.INDENT 3.5
-.sp
How many times UDP time out happen
.UNINDENT
.UNINDENT
Run time
.INDENT 0.0
.INDENT 3.5
-.sp
Total run time
.UNINDENT
.UNINDENT
Ops
.INDENT 0.0
.INDENT 3.5
-.sp
Total operations
.UNINDENT
.UNINDENT
TPS
.INDENT 0.0
.INDENT 3.5
-.sp
Throughput, operations/second
.UNINDENT
.UNINDENT
Net_rate
.INDENT 0.0
.INDENT 3.5
-.sp
The average rate of network
.UNINDENT
.UNINDENT
.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 tests, when connection is closed it will be reconnected.
.TP
.B \-U, \-\-udp
-.
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
.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)