📜  Redis基准测试

📅  最后修改于: 2020-12-02 01:21:14             🧑  作者: Mango

Redis基准

Redis基准测试是一个实用工具,可通过同时使用多(n)条命令来检查Redis的性能。

句法

redis-benchmark [option] [option value]

让我们将Redis Benchmark命令称为:

redis基准-n 100000


请参阅Redis基准测试中的可用选项列表:

Index Option Description Default Value
1 -h Specifies server host name 127.0.0.1
2 -p Specifies server port 6379
3 -s Specifies server socket
4 -c Specifies the number of parallel connections 50
5 -n Specifies the total number of requests 10000
6 -d Specifies data size of SET/GET value in bytes 2
7 -k 1=keep alive, 0=reconnect 1
8 -r Use random keys for SET/GET/INCR, random values for SADD
9 -p Pipeline requests 1
10 -h Specifies server host name
11 -q Forces Quiet to Redis. Just shows query/sec values
12 –csv Output in CSV format
13 -l Generates loop, Run the tests forever
14 -t Only runs the comma-separated list of tests
15 -I Idle mode. Just opens N idle connections and wait

让我们以一个示例来展示Redis基准测试实用程序中的多个使用选项。

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