|
| 1 | +# Building |
| 2 | + |
| 3 | +``` |
| 4 | +cmake . |
| 5 | +make libmemcached memtier |
| 6 | +``` |
| 7 | + |
| 8 | +# Mem(a)slap |
| 9 | + |
| 10 | +``` |
| 11 | + * -s, --servers= : List one or more servers to connect. Servers count must be less than threads count. |
| 12 | + e.g.: –servers=localhost:1234,localhost:11211 |
| 13 | + * -T, --threads= : Number of threads to startup, better equal to CPU numbers. |
| 14 | + Default 8. |
| 15 | + * -c, --concurrency= : Number of concurrency to simulate with load. |
| 16 | + Default 128. |
| 17 | + * -n, --conn_sock= : Number of TCP socks per concurrency. |
| 18 | + Default 1. |
| 19 | + * -x, --execute_number= : Number of operations(get and set) to execute for the given test. |
| 20 | + Default 1000000. |
| 21 | + * -t, --time= : How long the test to run, suffix: s,m,h,d |
| 22 | + e.g.: –time=2h. |
| 23 | + * -F, --cfg_cmd= : Load the configure file to get command, key and value distribution list. |
| 24 | + * -w, --win_size= : Task window size of each concurrency, suffix: K, M |
| 25 | + e.g.: –win_size=10k. Default 10k. |
| 26 | + * -X, --fixed_size= : Fixed length of value. |
| 27 | + * -v, --verify= : The proportion of date verification, e.g.: |
| 28 | + –verify=0.01 |
| 29 | + * -d, --division= : Number of keys to multi-get once. |
| 30 | + Default 1, means single get. |
| 31 | + * -S, --stat_freq= : Frequency of dumping statistic information. suffix: s,m |
| 32 | + e.g.: –resp_freq=10s. |
| 33 | + * -e, --exp_verify : The proportion of objects with expire time |
| 34 | + e.g.: –exp_verify=0.01 |
| 35 | + Default no object with expire time |
| 36 | + * -o, --overwrite= : The proportion of objects need overwrite |
| 37 | + e.g.: –overwrite=0.01. |
| 38 | + Default never overwrite object. |
| 39 | + * -R, --reconnect= : Reconnect tests, when connection is closed it will be reconnected. |
| 40 | + * -U, --udp : UDP tests, default memaslap uses TCP, TCP port and UDP port of server must be same. |
| 41 | + * -a, --facebook : Whether it enables facebook test feature, set with TCP and multi-get with UDP. |
| 42 | + * -B, --binary : Whether it enables binary protocol. |
| 43 | + Default with ASCII protocol. |
| 44 | + * -P, --tps= : Expected throughput, suffix: K |
| 45 | + e.g.: –tps=10k. |
| 46 | + * -p, --rep_write= : The first nth servers can write data |
| 47 | + e.g.: –rep_write=2. |
| 48 | + * -b, --verbose : Whether it outputs detailed information when verification fails. |
| 49 | + * -h, --help : Display this message and then exit. |
| 50 | + * -V, --version : Display the version of the application and then exit. |
| 51 | +``` |
| 52 | + |
| 53 | +Configuration file: |
| 54 | +``` |
| 55 | +################################### |
| 56 | +# |
| 57 | +# key |
| 58 | +# start_len end_len proportion |
| 59 | +# |
| 60 | +# example1: key range 16~100 accounts for 80% |
| 61 | +# key range 101~200 accounts for 10% |
| 62 | +# key range 201~250 accounts for 10% |
| 63 | +# total should be 1 (0.8+0.1+0.1 = 1) |
| 64 | +# |
| 65 | +# 16 100 0.8 |
| 66 | +# 101 200 0.1 |
| 67 | +# 201 249 0.1 |
| 68 | +# |
| 69 | +# example2: all keys length are 128 bytes |
| 70 | +# |
| 71 | +# 128 128 1 |
| 72 | +# |
| 73 | +################################### |
| 74 | +# |
| 75 | +# value |
| 76 | +# start_len end_len proportion |
| 77 | +# |
| 78 | +# example1: value range 1~1000 accounts for 80% |
| 79 | +# value range 1001~10000 accounts for 10% |
| 80 | +# value range 10001~100000 accounts for 10% |
| 81 | +# total should be 1 (0.8+0.1+0.1 = 1) |
| 82 | +# |
| 83 | +# 1 1000 0.8 |
| 84 | +# 1001 10000 0.1 |
| 85 | +# 10001 100000 0.1 |
| 86 | +# |
| 87 | +# example2: all value length are 128 bytes |
| 88 | +# |
| 89 | +# 128 128 1 |
| 90 | +# |
| 91 | +################################### |
| 92 | +# |
| 93 | +# cmd |
| 94 | +# cmd_type cmd_proportion |
| 95 | +# |
| 96 | +# currently memaslap only testss get and set command. |
| 97 | +# |
| 98 | +# cmd_type: |
| 99 | +# set 0 |
| 100 | +# get 1 |
| 101 | +# |
| 102 | +# example: set command accounts for 50% |
| 103 | +# get command accounts for 50% |
| 104 | +# total should be 1 (0.5+0.5 = 1) |
| 105 | +# |
| 106 | +# cmd |
| 107 | +# 0 0.5 |
| 108 | +# 1 0.5 |
| 109 | +# |
| 110 | +################################### |
| 111 | +``` |
| 112 | + |
| 113 | +# Memtier benchmark |
| 114 | + |
| 115 | +``` |
| 116 | +A memcache/redis NoSQL traffic generator and performance benchmarking tool. |
| 117 | +
|
| 118 | +Connection and General Options: |
| 119 | + -s, --server=ADDR Server address (default: localhost) |
| 120 | + -p, --port=PORT Server port (default: 6379) |
| 121 | + -S, --unix-socket=SOCKET UNIX Domain socket name (default: none) |
| 122 | + -P, --protocol=PROTOCOL Protocol to use (default: redis). Other |
| 123 | + supported protocols are memcache_text, |
| 124 | + memcache_binary. |
| 125 | + -x, --run-count=NUMBER Number of full-test iterations to perform |
| 126 | + -D, --debug Print debug output |
| 127 | + --client-stats=FILE Produce per-client stats file |
| 128 | + --out-file=FILE Name of output file (default: stdout) |
| 129 | + --show-config Print detailed configuration before running |
| 130 | + --hide-histogram Don't print detailed latency histogram |
| 131 | +
|
| 132 | +Test Options: |
| 133 | + -n, --requests=NUMBER Number of total requests per client (default: 10000) |
| 134 | + use 'allkeys' to run on the entire key-range |
| 135 | + -c, --clients=NUMBER Number of clients per thread (default: 50) |
| 136 | + -t, --threads=NUMBER Number of threads (default: 4) |
| 137 | + --test-time=SECS Number of seconds to run the test |
| 138 | + --ratio=RATIO Set:Get ratio (default: 1:10) |
| 139 | + --pipeline=NUMBER Number of concurrent pipelined requests (default: 1) |
| 140 | + --reconnect-interval=NUM Number of requests after which re-connection is performed |
| 141 | + --multi-key-get=NUM Enable multi-key get commands, up to NUM keys (default: 0) |
| 142 | + -a, --authenticate=CREDENTIALS Authenticate to redis using CREDENTIALS, which depending |
| 143 | + on the protocol can be PASSWORD or USER:PASSWORD. |
| 144 | + --select-db=DB DB number to select, when testing a redis server |
| 145 | + --distinct-client-seed Use a different random seed for each client |
| 146 | + --randomize random seed based on timestamp (defalut is constant value) |
| 147 | +
|
| 148 | +Object Options: |
| 149 | + -d --data-size=SIZE Object data size (default: 32) |
| 150 | + --data-offset=OFFSET Actual size of value will be data-size + data-offset |
| 151 | + Will use SETRANGE / GETRANGE (default: 0) |
| 152 | + -R --random-data Indicate that data should be randomized |
| 153 | + --data-size-range=RANGE Use random-sized items in the specified range (min-max) |
| 154 | + --data-size-list=LIST Use sizes from weight list (size1:weight1,..sizeN:weightN) |
| 155 | + --data-size-pattern=R|S Use together with data-size-range |
| 156 | + when set to R, a random size from the defined data sizes will be used, |
| 157 | + when set to S, the defined data sizes will be evenly distributed across |
| 158 | + the key range, see --key-maximum (default R) |
| 159 | + --expiry-range=RANGE Use random expiry values from the specified range |
| 160 | +
|
| 161 | +Imported Data Options: |
| 162 | + --data-import=FILE Read object data from file |
| 163 | + --data-verify Enable data verification when test is complete |
| 164 | + --verify-only Only perform --data-verify, without any other test |
| 165 | + --generate-keys Generate keys for imported objects |
| 166 | + --no-expiry Ignore expiry information in imported data |
| 167 | +
|
| 168 | +Key Options: |
| 169 | + --key-prefix=PREFIX Prefix for keys (default: "memtier-") |
| 170 | + --key-minimum=NUMBER Key ID minimum value (default: 0) |
| 171 | + --key-maximum=NUMBER Key ID maximum value (default: 10000000) |
| 172 | + --key-pattern=PATTERN Set:Get pattern (default: R:R) |
| 173 | + G for Gaussian distribution. |
| 174 | + R for uniform Random. |
| 175 | + S for Sequential. |
| 176 | + P for Parallel (Sequential were each client has a subset of the key-range). |
| 177 | + --key-stddev The standard deviation used in the Gaussian distribution |
| 178 | + (default is key range / 6) |
| 179 | + --key-median The median point used in the Gaussian distribution |
| 180 | + (default is the center of the key range) |
| 181 | + --help Display this help |
| 182 | + --version Display version information |
| 183 | +
|
| 184 | +``` |
0 commit comments