Redis Performance Test

Source: Internet
Author: User
Tags benchmark redis keep alive server port
Redis Performance Test

Redis performance testing is accomplished by executing multiple commands at the same time. Grammar

The basic commands for Redis performance testing are as follows:

Redis-benchmark [option] [option value]
instance

The following instance performs 10,000 requests simultaneously to detect performance:

REDIS-BENCHMARK-N 10000 ping_inline:141043.72 Requests per second ping_bulk:142857.14 requests per second set:141442 . Requests per second get:145348.83 requests/second incr:137362.64 requests per second lpush:145348.83 requests p Er second lpop:146198.83 requests per second sadd:146198.83 requests/second spop:149253.73 requests per second Lpus H (needed to benchmark Lrange): 148588.42 Requests/second lrange_100 (A/elements): 58411.21 requests per Secon D lrange_300 (elements): 21195.42 requests per second lrange_500 (I 450 elements): 14539.11 Requests per sec Ond lrange_600 (elements): 10504.20 requests per second mset (keys): 93283.58 Requests/second 

Redis performance test Tools The optional parameters are as follows:

Serial Number Options Description Default Value
1 -H Specify server host Name 127.0.0.1
2 -P Specify server port 6379
3 -S Specify server socket
4 -C Specify the number of concurrent connections 50
5 -N Specify the number of requests 10000
6 -D Specifies 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 Transmission through pipelines <numreq> requests 1
10 -Q Force exit Redis. Show query/sec values only
11 --csv Output in CSV format
12 -L Build loops, Run tests permanently
13 -T Run only a comma-delimited list of test commands.
14 -I. Idle mode. Open only N idle connections and wait.
instance

The following example uses several parameters to test Redis performance:

Redis-benchmark-h 127.0.0.1-p 6379-t set,lpush-n 100000-q

set:146198.83 requests per second
lpush:145560.41 Requests per second

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

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.