Leilin Peng Share: Redis performance test

  Redis performance testing is done by simultaneously execute multiple commands.

  grammar

  Basic commands redis performance test are as follows:

  redis-benchmark [option] [option value]

  Examples

  The following examples are performed simultaneously 10,000 request detection performance:

  $ redis-benchmark -n 10000 -q

  PING_INLINE: 141043.72 requests per second

  PING_BULK: 142857.14 requests per second

  SET: 141442.72 requests per second

  GET: 145348.83 requests per second

  INCR: 137362.64 requests per second

  LPUSH: 145348.83 requests per second

  LPOP: 146198.83 requests per second

  SADD: 146198.83 requests per second

  SPOP: 149253.73 requests per second

  LPUSH (needed to benchmark LRANGE): 148588.42 requests per second

  LRANGE_100 (first 100 elements): 58411.21 requests per second

  LRANGE_300 (first 300 elements): 21195.42 requests per second

  LRANGE_500 (first 450 elements): 14539.11 requests per second

  LRANGE_600 (first 600 elements): 10504.20 requests per second

  MSET (10 keys): 93283.58 requests per second

  Performance testing tool redis optional parameters are as follows:

  No. Description Default Option

  1-h specify the server hostname 127.0.0.1

  2-p specified server port 6379

  3-s server socket designated

  4-c specifies the number of concurrent connections 50

  5-n designation request number 10000

  6-d specifies SET / GET values ​​in the form of 2-byte data size

  7-k1=keep alive 0=reconnect1

  8-rSET / GET / INCR random key, SADD random values

  9-P tunnel request through 1

  10-q Force Quit redis. Display only query / sec value

  11 - csv output in CSV format

  12-l generating cycle, a test is performed permanently

  Run 13-t test only a comma-separated list of commands.

  14-IIdle mode. Open only N idle and waiting for the connection.

  Examples

  The following examples we use multiple parameters to test the performance redis:

  $ redis-benchmark -h 127.0.0.1 -p 6379 -t set,lpush -n 10000 -q

  SET: 146198.83 requests per second

  LPUSH: 145560.41 requests per second

  Examples of the above host 127.0.0.1, port number 6379, the command is set, lpush, 10,000 requests, so that only the results -q parameter displays the number of requests executed per second. (Editor: Leilin Peng Source: network intrusion deleted)

Guess you like

Origin www.cnblogs.com/linpeng1/p/11315188.html
Recommended