Redis-benchmark測試

來源:互聯網
上載者:User

標籤:des   style   color   io   os   ar   for   資料   sp   


Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests]> [-k <boolean>]    -h <hostname>      Server hostname (default 127.0.0.1)  -p <port>          Server port (default 6379)  -s <socket>        Server socket (overrides host and port)  -c <clients>       Number of parallel connections (default 50)  -n <requests>      Total number of requests (default 10000)  -d <size>          Data size of SET/GET value in bytes (default 2)  -k <boolean>       1=keep alive 0=reconnect (default 1)  -r <keyspacelen>   Use random keys for SET/GET/INCR, random values for SADD    Using this option the benchmark will get/set keys    in the form mykey_rand:000000012456 instead of constant    keys, the <keyspacelen> argument determines the max    number of values for the random number. For instance    if set to 10 only rand:000000000000 - rand:000000000009    range will be allowed.  -P <numreq>        Pipeline <numreq> requests. Default 1 (no pipeline).  -q                 Quiet. Just show query/sec values 只顯示每秒鐘能處理多少請求數結果  --csv              Output in CSV format  -l                 Loop. Run the tests forever 永久測試  -t <tests>         Only run the comma separated list of tests. The test                      names are the same as the ones produced as output.  -I                 Idle mode. Just open N idle connections and wait.



執行個體:

redis-benchmark -h 127.0.0.1 -p 6379 -q -d 100  
SET/GET 100 bytes 檢測host為127.0.0.1 連接埠為6379的redis伺服器效能


redis-benchmark -h 127.0.0.1 -p 6379 -c 5000 -n 100000 
5000個並發串連,100000個請求,檢測host為127.0.0.1 連接埠為6379的redis伺服器效能 




benchmark工具測試資訊:
測試命令:
redis-benchmark -n 100000 -c 60
向redis伺服器發送100000個請求,每個請求附帶60個並發用戶端
結果(部分):
====== SET ======
對集合寫入測試
  100000 requests completed in 2.38 seconds
100000個請求在2.38秒內完成
  60 parallel clients
每次請求有60個並發用戶端
  3 bytes payload
每次寫入3個位元組的資料
  keep alive: 1
保持一個串連,一台伺服器來處理這些請求


93.06% <= 15 milliseconds
99.96% <= 31 milliseconds
99.98% <= 46 milliseconds
99.99% <= 62 milliseconds
100.00% <= 62 milliseconds
所有請求在62毫秒內完成
42105.26 requests per second
每秒處理42105.26次請求

D:\redis\32bit>redis-benchmark.exe  -h 127.0.0.1 -p 6379 -c 50 -n 100000  -d 100 -qPING (inline): 43459.37 requests per secondPING: 44385.27 requests per secondMSET (10 keys): 34722.22 requests per secondSET: 45085.66 requests per secondGET: 42390.84 requests per secondINCR: 46511.63 requests per secondLPUSH: 46598.32 requests per secondLPOP: 44208.66 requests per secondSADD: 46189.38 requests per secondSPOP: 42247.57 requests per secondLPUSH (again, in order to bench LRANGE): 41425.02 requests per secondLRANGE (first 100 elements): 10055.30 requests per secondLRANGE (first 300 elements): 3786.44 requests per secondLRANGE (first 450 elements): 2476.53 requests per secondLRANGE (first 600 elements): 1885.19 requests per second



redis server 如下:

[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54436[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54437[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54438[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54439[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54440[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54441[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54442[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54443[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54444[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54445[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54446[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54447[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54448[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54449[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54450[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54451[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54452[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54453[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54454[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54455[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54456[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54457[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54458[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54459[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54460[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54461[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54462[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54463[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54464[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54465[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54466[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54467[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54468[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54469[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54470[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54471[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54472[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54473[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54474[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54475[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54476[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54477[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54478[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54479[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54480[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54481[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54482[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54483[4912] 15 Sep 14:44:06 - Accepted 127.0.0.1:54484[4912] 15 Sep 14:44:08 - DB 0: 23 keys (0 volatile) in 32 slots HT.[4912] 15 Sep 14:44:08 - 50 clients connected (0 slaves), 32097952 bytes in use[4912] 15 Sep 14:44:13 - DB 0: 23 keys (0 volatile) in 32 slots HT.[4912] 15 Sep 14:44:13 - 50 clients connected (0 slaves), 32153760 bytes in use


Redis-benchmark測試

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.