Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redis benchmark performance testing using the redis-benchmark command of linux

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report