Redis benchmark performance testing using the redis-benchmark command of linux
This article shows you the use of linux's redis-benchmark command Redis benchmark performance test, the code is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.
The redis-benchmark command can do benchmark performance tests for Redis, and it provides a number of options to help developers and operators test the performance of Redis.
Syntax format: redis-benchmark [parameters]
Common parameters:
Reference example
Run the benchmark test on 127.0.0.1 6379 using the default configuration:
[root@linuxcool ~] # redis-benchmark
Use 20 parallel clients for 192.168.1.1 for a total of 100000 requests:
[root@linuxcool] # redis-benchmark-h 192.168.1.1-p 6379-n 100000-c 20
Using only the SET test, populate 127.0.0.1 6379 with approximately 1 million keys:
[root@linuxcool] # redis-benchmark-t set-n 1000000-r 100000000
Benchmark 127.0.0.1 6379, several commands for generating CSV output:
[root@linuxcool] # redis-benchmark-t ping,set,get-n 100000-- csv
Benchmark a specific command line:
[root@linuxcool ~] # redis-benchmark-r 10000-n 10000 eval 'return redis.call ("ping")' 0
Populate the list with 10000 random elements:
[root@linuxcool] # redis-benchmark-r 10000-n 10000 lpush mylist rand_int the above is the Redis benchmark performance test using linux's redis-benchmark command. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.