MEMASLAP(1) libmemcached-awesome MEMASLAP(1) (NAME) memaslap - Memcached (SYNOPSIS) memaslap [] --help --servers MEMCACHED_SERVERS (DESCRIPTION) memaslap () memcached . (overwrite) (miss rate) get/set (throughput) . UDP (facebook test) (replication) (multi-get) . Memaslap memcached libevent . memaslap (CPU) . . memaslap --servers MEMCACHED_SERVERS <#envvar- MEMCACHED_SERVERS> . (FEATURES) Memslap : libevent. TCP UDP / (Non-blocking I/O). : . : . . get multi-get set . (miss rate) (overwrite rate) . . . TCP. (). ( set TCP multi-get UDP) (Replication). (DETAILS) memaslap TCP UDP / . memcached libevent . memaslap memcached . libevent memaslap . Memslap memcached . (CPU core affinity) . libevent . . Memslap . memaslap . . memaslap . . Memslap . : . uint64_t . memaslap . 'r' 'n' '0' (' ') memaslap . Memslap ( -) (task window ) . . set get . . Memslap libevent . Memslap memaslap . . . (overwrite) . Memslap . libevent . (get set) . . memcached ( SSD) memaslap (miss rate) . memaslap memcached memaslap miss . . UDP TCP - memaslap memcached . memaslap . . (Replication) . memcached . memaslap memcached (set) (get). Memslap get . multi-get memaslap get . Memslap ASCII () ASCII . TCP UDP . UDP (packet loss) . Memslap . . (timeout) . (USAGE) : memaslap -s 127.0.0.1:11211 -S 5s memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2 memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40 memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2 memaslap . : = 1 = 16 = 600 = NULL = 64 = 1024 Get/set = 9:1 = 10k = 0 (Single get) = true (Multi-get) = false = 1 = false = false = false ASCII = true = false = false = 0% UDP = false TCP = true = false = false = false "--cfg_cmd" . memaslap ( = = get/set = 9:1) . " " . . . . . . . memaslap set get set get . get . memaslap . . . "--threads" "--concurrency" . memaslap . . . . 1. : : --threads=2 --concurrency=128 --threads=8 --concurrency=128 --threads=8 --concurrency=256 --threads=12 --concurrency=144 2. : : --threads=8 --concurrency=128 --threads=16 --concurrency=256 --threads=16 --concurrency=512 --threads=24 --concurrency=288 memaslap memcached . . memaslap : . "--tps" memaslap . . (kops/s) . . 10k . Schooner Memcached . : : . (cache_size=1M) ( SSD): win_size=10k 2. 4G: () : win_size=8k () : win_size=11k 3. 16G: () : win_size=32k () : win_size=46k : cache_size / concurrency / (key_size + value_size) * 0.5 : cache_size / concurrency / (key_size + value_size) * 0.7 Memslap . "--verify=" "-v" ( ). "--exp_verify=" "-e" . "--verbose" . : --exp_verify=0.01 --verify=0.1 . memaslap . Memslap . . Memslap . "--servers=" "-s" . : --servers=10.1.1.1:11211,10.1.1.2:11212,10.1.1.3:11213 --threads=6 --concurrency=36 (10.1.1.1) (10.1.1.2) (10.1.1.3) . memaslap . memaslap . memaslap memcached memaslap . memaslap . . : --time=30s ( ) --execute_number=100000 ( ) "--stat_freq=" "-S" . : --stat_freq=20s Memslap get set . " " . (Multi-get) "--division=" "-d" (multi-get) . get TCP . multi-get . Memslap multi-get TCP UDP . ASCII : ASCII "multi-get" get "multi-get" . UDP TCP Memslap UDP TCP . TCP memaslap "--reconnect" . "--udp" UDP UDP : UDP . UDP memcached . UDP . (Facebook test) TCP UDP. : "--facebook --division=50" TCP : "--conn_sock=" : --facebook --division=50 --conn_sock=200 memaslap TCP UDP . Memslap TCP UDP . "--division=50" UDP . (Replication test) memcached "--rep_write=" . : --servers=10.1.1.1:11211,10.1.1.2:11212 --rep_write=2 memaslap . . memaslap . TCP memaslap "--conn_sock=" "-n" . . . : --threads=8 --concurrency=128 --conn_sock=128 memaslap TCP * = . (Binary Protocol) "--binary" "-B" . UDP ( memcached 1.3.3 UDP ). : --binary memcached UDP memaslap UDP . 1.3.3 "--division=50" get . (CONFIGURATION FILE) . memaslap ~/.memaslap.cnf . : --------------------------------------------------------------------------- #comments should start with '#' #key #start_len end_len proportion # #key length range from start_len to end_len #start_len must be equal to or greater than 16 #end_len must be equal to or less than 250 #start_len must be equal to or greater than end_len #memaslap will generate keys according to the key range #proportion: indicates keys generated from one range accounts for the total generated keys # #example1: key range 16~100 accounts for 80% # key range 101~200 accounts for 10% # key range 201~250 accounts for 10% # total should be 1 (0.8+0.1+0.1 = 1) # # 16 100 0.8 # 101 200 0.1 # 201 249 0.1 # #example2: all keys length are 128 bytes # # 128 128 1 key 128 128 1 #value #start_len end_len proportion # #value length range from start_len to end_len #start_len must be equal to or greater than 1 #end_len must be equal to or less than 1M #start_len must be equal to or greater than end_len #memaslap will generate values according to the value range #proportion: indicates values generated from one range accounts for the total generated values # #example1: value range 1~1000 accounts for 80% # value range 1001~10000 accounts for 10% # value range 10001~100000 accounts for 10% # total should be 1 (0.8+0.1+0.1 = 1) # # 1 1000 0.8 # 1001 10000 0.1 # 10001 100000 0.1 # #example2: all value length are 128 bytes # # 128 128 1 value 2048 2048 1 #cmd #cmd_type cmd_proportion # #currently memaslap only testss get and set command. # #cmd_type #set 0 #get 1 # #example: set command accounts for 50% # get command accounts for 50% # total should be 1 (0.5+0.5 = 1) # # cmd # 0 0.5 # 1 0.5 cmd 0 0.1 1.0 0.9 (FORMAT OF OUTPUT) memaslap : servers : 127.0.0.1:11211 threads count: 1 concurrency: 16 run time: 20s windows size: 10k set proportion: set_prop=0.10 get proportion: get_prop=0.90 servers memaslap. threads count memaslap. concurrency . run time . windows size . set proportion set. get proportion get. : --------------------------------------------------------------------------------------------------------------------------------- Get Statistics Type Time(s) Ops TPS(ops/s) Net(M/s) Get_miss Min(us) Max(us) Avg(us) Std_dev Geo_dist Period 5 345826 69165 65.3 0 27 2198 203 95.43 177.29 Global 20 1257935 62896 71.8 0 26 3791 224 117.79 192.60 Set Statistics Type Time(s) Ops TPS(ops/s) Net(M/s) Get_miss Min(us) Max(us) Avg(us) Std_dev Geo_dist Period 5 38425 7685 7.3 0 42 628 240 88.05 220.21 Global 20 139780 6989 8.0 0 37 3790 253 117.93 224.83 Total Statistics Type Time(s) Ops TPS(ops/s) Net(M/s) Get_miss Min(us) Max(us) Avg(us) Std_dev Geo_dist Period 5 384252 76850 72.5 0 27 2198 207 94.72 181.18 Global 20 1397720 69886 79.7 0 26 3791 227 117.93 195.60 --------------------------------------------------------------------------------------------------------------------------------- Get Statistics get. Set Statistics set. Total Statistics get set. Period . Global . Ops . TPS (Operations/Second). Net . Get_miss . Min (). Max (). Avg (). Std_dev . Geo_dist . memaslap : --------------------------------------------------------------------------------------------------------------------------------- Get Statistics (1257956 events) Min: 26 Max: 3791 Avg: 224 Geo: 192.60 Std: 116.23 Log2 Dist: 4: 0 10 84490 215345 8: 484890 459823 12543 824 12: 31 Set Statistics (139782 events) Min: 37 Max: 3790 Avg: 253 Geo: 224.84 Std: 116.83 Log2 Dist: 4: 0 0 4200 16988 8: 50784 65574 2064 167 12: 5 Total Statistics (1397738 events) Min: 26 Max: 3791 Avg: 227 Geo: 195.60 Std: 116.60 Log2 Dist: 4: 0 10 88690 232333 8: 535674 525397 14607 991 12: 36 cmd_get: 1257969 cmd_set: 139785 get_misses: 0 verify_misses: 0 verify_failed: 0 expired_get: 0 unexpired_unget: 0 written_bytes: 242516030 read_bytes: 1003702556 object_bytes: 152086080 packet_disorder: 0 packet_drop: 0 udp_timeout: 0 Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s --------------------------------------------------------------------------------------------------------------------------------- Get Statistics get. Set Statistics set. Total Statistics get set. Min . Max . Avg . Std . Log2 Dist . cmd_get get . cmd_set set . get_misses (miss). verify_misses . verify_failed . expired_get . unexpired_unget . written_bytes . read_bytes . object_bytes . packet_disorder UDP . packet_drop UDP (Drop). udp_timeout UDP. Run time . Ops . TPS . Net_rate . (OPTIONS) -s, --servers= . . : --servers=localhost:1234,localhost:11211 -T, --threads= . 8. -c, --concurrency= . 128. -n, --conn_sock= TCP . 1. -x, --execute_number= (get set) . 1000000. -t, --time= : s () m () h () d (). : --time=2h -F, --cfg_cmd= . -w, --win_size= K M. : --win_size=10k. 10k. -X, --fixed_size= (Value). -v, --verify= . : --verify=0.01 -d, --division= (multi-get). 1 . -S, --stat_freq= : s () m (). : --stat_freq=10s -e, --exp_verify= . : --exp_verify=0.01. . -o, --overwrite= . : --overwrite=0.01. ( ). -R, --reconnect . -U, --udp UDP TCP . TCP UDP . -a, --facebook ( TCP UDP). -B, --binary (). ASCII . -P, --tps= K. : --tps=10k -p, --rep_write= n . : --rep_write=2 -b, --verbose . -h, --help . -V, --version . (EXAMPLES) memaslap -s 127.0.0.1:11211 -S 5s memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2 memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40 memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2 (NOTES) . libmemcached-awesome mem memcat memcp. mc libmemcached-awesome mccat mccp . (contributed) . / . (SEE ALSO) memcached(1) libmemcached(3) 1.1 March 7, 2026 MEMASLAP(1)