Redis性能测试Redis-benchmark
Redis-benchmark是官方自带的Redis性能测试工具
测试Redis在你的系统及你的配置下的读写性能
redis-benchmark可以模拟N个机器,同时发送M个请求
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.
eg:
100个并发连接,1000个请求,检测host为localhost 端口为6379的redis服务器性能
redis-benchmark.exe -h 127.0.0.1 -p 6379 -c 100 -n 1000
====== PING_INLINE ======
requests completed in 0.07 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
22.00% <= milliseconds
24.90% <= milliseconds
75.90% <= milliseconds
89.70% <= milliseconds
89.80% <= milliseconds
90.00% <= milliseconds
90.10% <= milliseconds
90.20% <= milliseconds
90.40% <= milliseconds
90.50% <= milliseconds
96.20% <= milliseconds
100.00% <= milliseconds
14705.88 requests per second ====== PING_BULK ======
requests completed in 0.03 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
0.20% <= milliseconds
79.20% <= milliseconds
89.40% <= milliseconds
100.00% <= milliseconds
31250.00 requests per second ====== SET ======
requests completed in 0.03 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
8.20% <= milliseconds
91.60% <= milliseconds
100.00% <= milliseconds
34482.76 requests per second ====== GET ======
requests completed in 0.04 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
30.40% <= milliseconds
58.30% <= milliseconds
66.10% <= milliseconds
87.50% <= milliseconds
99.90% <= milliseconds
100.00% <= milliseconds
27777.78 requests per second ====== INCR ======
requests completed in 0.04 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
23.60% <= milliseconds
27.90% <= milliseconds
75.20% <= milliseconds
99.70% <= milliseconds
100.00% <= milliseconds
26315.79 requests per second ====== LPUSH ======
requests completed in 0.03 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
74.70% <= milliseconds
83.40% <= milliseconds
93.20% <= milliseconds
100.00% <= milliseconds
29411.76 requests per second ====== LPOP ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 2.50% <= milliseconds
100.00% <= milliseconds
76923.08 requests per second ====== SADD ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 1.90% <= milliseconds
100.00% <= milliseconds
76923.08 requests per second ====== SPOP ======
requests completed in 0.03 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
1.10% <= milliseconds
99.70% <= milliseconds
100.00% <= milliseconds
33333.34 requests per second ====== LPUSH (needed to benchmark LRANGE) ======
requests completed in 0.03 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
66.80% <= milliseconds
69.70% <= milliseconds
77.00% <= milliseconds
91.20% <= milliseconds
99.10% <= milliseconds
100.00% <= milliseconds
32258.06 requests per second ====== LRANGE_100 (first elements) ======
requests completed in 0.05 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
37.70% <= milliseconds
90.10% <= milliseconds
93.70% <= milliseconds
99.60% <= milliseconds
100.00% <= milliseconds
20000.00 requests per second ====== LRANGE_300 (first elements) ======
requests completed in 0.08 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
33.70% <= milliseconds
69.80% <= milliseconds
74.70% <= milliseconds
80.40% <= milliseconds
87.70% <= milliseconds
90.20% <= milliseconds
93.10% <= milliseconds
96.70% <= milliseconds
98.40% <= milliseconds
99.80% <= milliseconds
100.00% <= milliseconds
12345.68 requests per second ====== LRANGE_500 (first elements) ======
requests completed in 0.10 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
1.00% <= milliseconds
30.10% <= milliseconds
72.40% <= milliseconds
80.40% <= milliseconds
84.90% <= milliseconds
88.50% <= milliseconds
90.70% <= milliseconds
92.70% <= milliseconds
95.10% <= milliseconds
96.60% <= milliseconds
97.80% <= milliseconds
98.80% <= milliseconds
100.00% <= milliseconds
10101.01 requests per second ====== LRANGE_600 (first elements) ======
requests completed in 0.14 seconds
parallel clients
bytes payload
keep alive: 0.10% <= milliseconds
3.20% <= milliseconds
31.60% <= milliseconds
58.90% <= milliseconds
78.60% <= milliseconds
80.70% <= milliseconds
82.30% <= milliseconds
84.20% <= milliseconds
86.30% <= milliseconds
89.00% <= milliseconds
89.30% <= milliseconds
89.90% <= milliseconds
90.40% <= milliseconds
90.80% <= milliseconds
91.10% <= milliseconds
91.90% <= milliseconds
92.40% <= milliseconds
93.10% <= milliseconds
93.80% <= milliseconds
95.10% <= milliseconds
96.90% <= milliseconds
97.70% <= milliseconds
98.40% <= milliseconds
99.10% <= milliseconds
99.90% <= milliseconds
100.00% <= milliseconds
7299.27 requests per second ====== MSET ( keys) ======
requests completed in 0.02 seconds
parallel clients
bytes payload
keep alive: 0.70% <= milliseconds
93.80% <= milliseconds
99.40% <= milliseconds
100.00% <= milliseconds
52631.58 requests per second
只显示每秒钟能处理多少请求数结果
redis-benchmark.exe -h 127.0.0.1 -p 6379 -q
PING_INLINE: 87873.46 requests per second
PING_BULK: 90009.01 requests per second
SET: 81037.28 requests per second
GET: 91324.20 requests per second
INCR: 89605.73 requests per second
LPUSH: 80256.82 requests per second
LPOP: 90826.52 requests per second
SADD: 89525.52 requests per second
SPOP: 91996.32 requests per second
LPUSH (needed to benchmark LRANGE): 90090.09 requests per second
LRANGE_100 (first elements): 34638.03 requests per second
LRANGE_300 (first elements): 17099.86 requests per second
LRANGE_500 (first elements): 12238.41 requests per second
LRANGE_600 (first elements): 9712.51 requests per second
MSET ( keys): 56657.22 requests per second
显示详细资料的方式
redis-benchmark -h 127.0.0.1 -p 6609 -n 1000
====== PING_INLINE ======
requests completed in 0.02 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
62500.00 requests per second ====== PING_BULK ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
76923.08 requests per second ====== SET ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
83333.34 requests per second ====== GET ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
76923.08 requests per second ====== INCR ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
83333.34 requests per second ====== LPUSH ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
76923.08 requests per second ====== LPOP ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
76923.08 requests per second ====== SADD ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
83333.34 requests per second ====== SPOP ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
83333.34 requests per second ====== LPUSH (needed to benchmark LRANGE) ======
requests completed in 0.01 seconds
parallel clients
bytes payload
keep alive: 100.00% <= milliseconds
83333.34 requests per second ====== LRANGE_100 (first elements) ======
requests completed in 0.03 seconds
parallel clients
bytes payload
keep alive: 99.00% <= milliseconds
100.00% <= milliseconds
34482.76 requests per second ====== LRANGE_300 (first elements) ======
requests completed in 0.06 seconds
parallel clients
bytes payload
keep alive: 1.40% <= milliseconds
97.70% <= milliseconds
100.00% <= milliseconds
16949.15 requests per second ====== LRANGE_500 (first elements) ======
requests completed in 0.08 seconds
parallel clients
bytes payload
keep alive: 1.10% <= milliseconds
44.00% <= milliseconds
98.40% <= milliseconds
100.00% <= milliseconds
12195.12 requests per second ====== LRANGE_600 (first elements) ======
requests completed in 0.10 seconds
parallel clients
bytes payload
keep alive: 0.80% <= milliseconds
7.10% <= milliseconds
86.80% <= milliseconds
97.90% <= milliseconds
100.00% <= milliseconds
9803.92 requests per second ====== MSET ( keys) ======
requests completed in 0.02 seconds
parallel clients
bytes payload
keep alive: 95.60% <= milliseconds
100.00% <= milliseconds
58823.53 requests per second
Redis性能测试Redis-benchmark的更多相关文章
- Redis性能测试工具benchmark简介
Redis自己提供了一个性能测试工具redis-benchmark.redis-benchmark可以模拟N个机器,同时发送M个请求. 用法:redis-benchmark [-h -h <ho ...
- Redis性能测试
Redis 性能测试 Redis 性能测试是通过同时执行多个命令实现的.Redis性能测试主要是通过src文件夹下的redis-benchmark来实现(Linux系统下) 语法 redis 性能测试 ...
- 【Redis】Redis学习(一) Redis初步入门
一.Redis基础知识 1.1 Redis简介 Redis是一个开源(BSD许可),内存存储的数据结构服务器,可用作数据库,高速缓存和消息队列代理.它支持字符串.哈希表.列表.集合.有序集合,位图,h ...
- Redis 性能测试
Redis 性能测试是通过同时执行多个命令实现的. 语法 redis 性能测试的基本命令如下: redis-benchmark [option] [option value] 实例 以下实例同时执行 ...
- 10.Redis 性能测试
转自:http://www.runoob.com/redis/redis-tutorial.html Redis 性能测试是通过同时执行多个命令实现的. 语法 redis 性能测试的基本命令如下: r ...
- redis和redis php扩展安装(转)
redis是一个内存数据库,比memcache支持更丰富的value类型,新浪微博就使用redis来做缓存. redis的源码安装 wget http://download.redis.io/redi ...
- 初识redis(redis基础命令)
redis简介redis是一个开源(BSD许可)的使用C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,它可以用作数据库.缓存和消息中间件,并提供多种语言的API.从201 ...
- redis和redis php扩展安装
redis的源码安装 wget http://download.redis.io/redis-stable.tar.gz tar -zxvf redis-stable.tar.gz cd redis- ...
- 【Redis】Redis开篇与如何安装单机版Redis,这次我会了!!
写在前面 很早之前,就有不少小伙伴微信留言说:冰河,你能不能写一个Redis专栏啊,我最近在学习Redis,看书看不下去,学习视频又觉得视频太长了,还是看你的文章比较给力!哈哈,原来我写的文章能够让小 ...
随机推荐
- web前端开发与iOS终端开发的异同[转]
* {-webkit-tap-highlight-color: rgba(0,0,0,0);}html {-webkit-text-size-adjust: none;}body {font-fami ...
- select 操作选中添加、删除操作Javascript
//添加选中项 function addItem() { var myMember = document.getElementById("myMember"); var other ...
- mac键盘图表大全
Mac键盘图标与对应快捷按键 ⌘——Command () ⌃ ——Control ⌥——Option (alt) ⇧——Shift ⇪——Caps Lock fn——功能键就是fn *.m*.h切换 ...
- 通过shell脚本来rerun一个oozie调度失败的job,从而可以跳过执行失败的节点
标题很长:通过shell脚本来rerun一个oozie调度失败的job,从而可以跳过执行失败的节点 不过目前从oozie调度测试的例子来看,oozie本身的retry好像并没有参数可以控制跳过失败的节 ...
- CubieTruck入手第一天
基本的參考资料整理例如以下: mod=viewthread&tid=160" id="thread_subject" style="word-wrap: ...
- 有赞MySQL自动化运维之路—ZanDB
有赞MySQL自动化运维之路—ZanDB 一.前言 在互联网时代,业务规模常常出现爆发式的增长.快速的实例交付,数据库优化以及备份管理等任务都对DBA产生了更高的要求,单纯的凭借记忆力去管理那几十 ...
- Listener 监听对象的创建和销毁
HttpSessionListener.ServletContextListener.ServletRequestListener分别用于控制Session.context.request的创建和销毁 ...
- Javascript Notes
Get started with Programming Javascript中的保留字,但是大部分却没在这个语言中使用.undefined,NaN,Infinity也应该算保留字. abstract ...
- 让QtCreator在调试时显示字符串 Qt调试助手 QtDebuggingHelper qtc-debugging-helper
When starting gdb with application message “Debugging Helper Missing” is displayed [Solved] http://q ...
- 【Qt开发】QThread 实用技巧、误区----但文档中没有提到
本文主要内容: 在任务一中,用 四 种方式实现:点击界面按钮,开线程运行一段程序,结果显示在一个Label上.1. 用不正确的方式得到看似正确的结果2. 用Qt Manual 和 例子中使用的方法3. ...