Redis performance test

Source: Internet
Author: User
Tags keep alive redis cluster install redis

Redis performance test

Redis performance testing is achieved by executing multiple commands at the same time. Redis performance testing is mainly implemented through redis-benchmark in the src folder (in Linux)

Syntax

The basic commands for redis performance testing are as follows:

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

The following instances simultaneously execute 10000 requests to detect performance:

  1. Redis-benchmark-n 100000
  2.  
  3. PING_INLINE: 141043.72 requests per second
  4. PING_BULK: 142857.14 requests per second
  5. SET: 141442.72 requests per second
  6. GET: 145348.83 requests per second
  7. INCR: 137362.64 requests per second
  8. LPUSH: 145348.83 requests per second
  9. LPOP: 146198.83 requests per second
  10. SADD: 146198.83 requests per second
  11. SPOP: 149253.73 requests per second
  12. LPUSH (needed to benchmark LRANGE): 148588.42 requests per second
  13. LRANGE_100 (first 100 elements): 58411.21 requests per second
  14. LRANGE_300 (first 300 elements): 21195.42 requests per second
  15. LRANGE_500 (first 450 elements): 14539.11 requests per second
  16. LRANGE_600 (first 600 elements): 10504.20 requests per second
  17. MSET (10 keys): 93283.58 requests per second

The redis performance testing tool has the following optional parameters:

Serial number Option Description Default Value
1 -H Specify the server host name 127.0.0.1
2 -P Specify the server port 6379
3 -S Specify server socket  
4 -C Number of concurrent connections 50
5 -N Number of requests 10000
6 -D Specify the data size of the SET/GET value in bytes 2
7 -K 1 = keep alive 0 = reconnect 1
8 -R SET/GET/INCR use random key, SADD use random Value  
9 -P Transfer <numreq> requests in a pipeline 1
10 -Q Force exit redis. Show query/sec values only  
11 -- Csv Output in CSV format  
12 -L Generate a loop and run the test permanently  
13 -T Run only the list of test commands separated by commas.  
14 -I Idle mode. Open only N idle connections and wait.  
Instance

The following instances use multiple parameters to test redis performance:

  1. Redis-benchmark-h 127.0.0.1-p 6379-t set, lpush-n 100000-q
  2.  
  3. SET: 146198.83 requests per second
  4. LPUSH: 145560.41 requests per second

In the above instance, the host is 127.0.0.1, the port number is 6379, the command to be executed is set, lpush, and the number of requests is 10000. Through the-q Parameter, only the number of requests executed per second is displayed.

You may also like the following articles about Redis. For details, refer:

Install and test Redis in Ubuntu 14.04

Basic configuration of Redis master-slave Replication

Redis cluster details

Install Redis in Ubuntu 12.10 (graphic explanation) + Jedis to connect to Redis

Redis series-installation, deployment, and maintenance

Install Redis in CentOS 6.3

Learning notes on Redis installation and deployment

Redis. conf

Redis details: click here
Redis: click here

This article permanently updates the link address:

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: info-contact@alibabacloud.com 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.