redis-benchmark同時圧力試験


前言:
Redis-benchmark:Redisはredis-benchmarkというツールを持っていて、N個のクライアントがM個の要求を同時に発行することをシミュレートします.(Apache abプログラムと同様).redis-benchmark-hを使用して基準パラメータを表示できます.
パラメータの概要:
      :
  :redis-benchmark [-h <  >] [-p <  >] [-c <   >] [-n <  ]> [-k <  >]
-h      <   >      (    127.0.0.1)
-p      <  >     (  6379) #             9   6397  !!!∑(゚Д゚ノ)ノ
-s      <socket>      (       )
-a      <  > Redis       
-c      <   >     (   50)
-n      <  >    (   100000)
-d      <  > SET / GET      (      )(   2)
-dbnum  <db>         (   0)
-k      <   > 1 =      0 =    (  1)
-r      <keyspacelen>      SET / GET / INCR,      SADD      ,          __ rand_ int__         12        0 keyspacelen-1。           
   。               。
-P     <numreq>  <numreq>  。    1(   )。
-q          /  
--csv   CSV    
-l         

-t     <  >            。            。

-I          。     N        。 

テストの開始:
redis-benchmark -h localhost -p 6379 -a adc.123 -c 100 -n 100000 -q
redis-benchmark              -c100   -n 100000   -q   ,     

以下はテスト結果です
[root@localhost bin]# redis-benchmark -h localhost -p 6379 -a adc.123 -c 100 -n 100000 -q

PING_INLINE: 126582.27 requests per second
PING_BULK: 123915.74 requests per second
2939:M 07 Jan 2021 20:01:14.327 * 10000 changes in 60 seconds. Saving...
2939:M 07 Jan 2021 20:01:14.328 * Background saving started by pid 75528
75528:C 07 Jan 2021 20:01:14.330 * DB saved on disk
75528:C 07 Jan 2021 20:01:14.331 * RDB: 5 MB of memory used by copy-on-write
2939:M 07 Jan 2021 20:01:14.428 * Background saving terminated with success
SET: 125786.16 requests per second     
GET: 123762.38 requests per second
INCR: 125156.45 requests per second
LPUSH: 127551.02 requests per second
RPUSH: 126903.55 requests per second
LPOP: 127388.53 requests per second
RPOP: 125470.52 requests per second
SADD: 125786.16 requests per second
HSET: 125470.52 requests per second
SPOP: 122549.02 requests per second
ZADD: 125786.16 requests per second
ZPOPMIN: 123915.74 requests per second
LPUSH (needed to benchmark LRANGE): 127551.02 requests per second
LRANGE_100 (first 100 elements): 57703.40 requests per second
LRANGE_300 (first 300 elements): 24319.07 requests per second
LRANGE_500 (first 450 elements): 17500.88 requests per second
LRANGE_600 (first 600 elements): 13958.68 requests per second
MSET (10 keys): 123001.23 requests per seco

set書き込みは毎秒約12 w,読み出しは毎秒約12 w,総合毎秒約12 wが見られる.
次に-qを削除して、詳細を見て、多すぎるべきで、書き込みと読み取りの情報だけを呼び出しました.
redis-benchmark -h localhost -p 6379 -a adc.123 -c 100 -n 100000

2939:M 07 Jan 2021 20:08:49.475 * Background saving terminated with success
====== SET ======
  100000 requests completed in 0.80 seconds    #100000     0.8    
  100 parallel clients #100   
  3 bytes payload      #  3      -d   
  keep alive: 1        #              ,     
  multi-thread: no

97.47% <= 1 milliseconds
99.88% <= 2 milliseconds
99.97% <= 3 milliseconds
100.00% <= 3 milliseconds                #     3       
124843.95 requests per second            #       12w  

====== GET ======
  100000 requests completed in 0.80 seconds
  100 parallel clients
  3 bytes payload
  keep alive: 1
  multi-thread: no

97.43% <= 1 milliseconds
99.70% <= 2 milliseconds
100.00% <= 2 milliseconds
125313.29 requests per second