Redis Performance Test

Source: Internet
Author: User
Tags benchmark keep alive

Redis Performance Test

Redis performance testing is accomplished by executing multiple commands at the same time. Redis performance testing is implemented primarily through the Redis-benchmark under the SRC folder (Linux system)


The basic commands for Redis performance testing are as follows:

    1. Redis-benchmark [option] [option value]

The following instances perform 10,000 requests at the same time to detect performance:

  1. Redis-Benchmark -n 100000
  2. Ping_inline: 141043.72 requests per second
  3. Ping_bulk: 142857.14 requests per second
  4. SET: 141442.72 requests per second
  5. GET: 145348.83 requests per second
  6. INCR: 137362.64 requests per second
  7. Lpush: 145348.83 requests per second
  8. Lpop: 146198.83 requests per second
  9. Sadd: 146198.83 requests per second
  10. SPOP: 149253.73 requests per second
  11. Lpush (needed to benchmark Lrange): 148588.42 requests per second
  12. Lrange_100 (first elements): 58411.21 requests per second
  13. lrange_300 (first elements): 21195.42 requests per second
  14. lrange_500 (first elements): 14539.11 requests per second
  15. lrange_600 (first elements): 10504.20 requests per second
  16. MSET ( keys): 93283.58 requests per second

The optional parameters for the Redis Performance test tool are as follows:

Serial Number Options Description Default Value
1 -H Specify the server host name
2 -P Specify server port 6379
3 -S Specify the server socket
4 -C Specify number of concurrent connections 50
5 -N Specify the number of requests 10000
6 -D Specifies the data size of the Set/get value as a byte 2
7 -K 1=keep Alive 0=reconnect 1
8 -R SET/GET/INCR using random key, sadd using random values
9 -P Transfer <numreq> request via pipelines 1
10 -Q Force quit Redis. Show only query/sec values
11 --csv Output in CSV format
12 -L Build loops, perform tests permanently
13 -T Only run a comma-delimited list of test commands.
14 -I. Idle mode. Open only N idle connections and wait.

The following example uses several parameters to test Redis performance:

  1. Redis-Benchmark -H 127.0. 0.1 -p 6379 -t set,lpush -n 100000 -Q
  2. SET: 146198.83 requests per second
  3. Lpush: 145560.41 requests per second

In the example above, the host is, the port number is 6379, the command executed is Set,lpush, the number of requests is 10000, and with the-Q parameter, the result shows only the number of requests executed per second.

Redis Performance Test

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.