Redis-benchmark使用总结
Redis-benchmark为Redis性能测试工具。
指令说明:
- 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次请求
- [root@localhost ~]# redis-benchmark -h 127.0.0.1 -p 6379 -c 5000 -n 100000 -d 100 -q
- PING_INLINE: 34506.55 requests per second
- PING_BULK: 34059.95 requests per second
- SET: 31959.09 requests per second
- GET: 31466.33 requests per second
- INCR: 33311.12 requests per second
- LPUSH: 29265.44 requests per second
- LPOP: 36968.58 requests per second
- SADD: 32030.75 requests per second
- SPOP: 33344.45 requests per second
- LPUSH (needed to benchmark LRANGE): 29735.36 requests per second
- LRANGE_100 (first 100 elements): 16116.04 requests per second
- LRANGE_300 (first 300 elements): 6659.56 requests per second
- LRANGE_500 (first 450 elements): 4108.29 requests per second
Redis-benchmark使用总结的更多相关文章
- Azure Redis Cache (3) 在Windows 环境下使用Redis Benchmark
<Windows Azure Platform 系列文章目录> 熟悉Redis环境的读者都知道,我们可以在Linux环境里,使用Redis Benchmark,测试Redis的性能. ht ...
- Redis 的性能幻想与残酷现实
2011 年,当初选择 Redis 作为主要的内存数据存储,主要吸引我的是它提供多样的基础数据结构可以很方便的实现业务需求.另一方面又比较担心它的性能是否足以支撑,毕竟当时 Redis 还属于比较新的 ...
- 转载----How fast is Redis?
How fast is Redis? Redis includes the redis-benchmark utility that simulates running commands done b ...
- benchmark
redis benchmark How many requests per second can I get out of Redis? Using New Relic to Understand R ...
- Redis 的性能幻想与残酷现实(转)
2011 年,当初选择 Redis 作为主要的内存数据存储,主要吸引我的是它提供多样的基础数据结构可以很方便的实现业务需求.另一方面又比较担心它的性能是否足以支撑,毕竟当时 Redis 还属于比较新的 ...
- Redis 的性能
Redis 的性能幻想与残酷现实 2011 年,当初选择 Redis 作为主要的内存数据存储,主要吸引我的是它提供多样的基础数据结构可以很方便的实现业务需求.另一方面又比较担心它的性能是否足以支撑,毕 ...
- Redis 性能问题的记录
最近线上使用redis, 查询的情况不甚理想, 这个查询操作是个 lua 脚本, 包含如下操作 开发机 redis, 没有其他干扰, 插入的 zset 有 5000 member 左右, 使用的 re ...
- 深入redis内部---网络编程
Redis在anet.h和anet.c中封装了底层套接字实现: 1.anetTcpServer,建立网络套接字服务器,完成对socket(),bind(),listen()等操作的封装,返回socke ...
- Redis集群生产环境源码安装
安装redis集群 根据各人单位生产环境用户搭建一.安装环境 操作系统:centos7.6 关闭防火墙.关闭selinux redis1:192.168.26.128 redis2:192.1 ...
- Redis 6.0 新特性-多线程连环13问!
Redis 6.0 来了 在全国一片祥和IT民工欢度五一节假日的时候,Redis 6.0不声不响地于5 月 2 日正式发布了,吓得我赶紧从床上爬起来,学无止境!学无止境! 对于6.0版本,Redis之 ...
随机推荐
- Sphinx(Coreseek)安装和使用指南
1.安装 1.1安装mmseg ./bootstrap # 必须执行,不然安装会失败 ./configure --prefix=/usr/local/mmseg- #指定安装目录 make make ...
- IntelliJ idea——》删除tag
查看git上所有tag E:\eju_IdeaProjects\house-platform>git tag --11v1. 20181107周三上线 20181120周二上线 v1.0.0 v ...
- 【转】python测试开发面试题
出处:http://my.oschina.net/u/1433482/blog/467954?fromerr=WrfxL2Kw 试卷时间 60分钟,请不要在试卷上作答,用A4纸做答题纸作答. 一,中文 ...
- 【JavaEE】Springmvc搭建方法及example
现在介绍SSH的文章很多,但是适合自己需求的却经常找不到,这些东西呢,会了之后总会感觉别人的程序哪里哪里别扭,会之前呢就感觉很混乱,而且SSH的官方文档,至少在我看来是“会者勉强能看.不会者一片迷茫” ...
- 要胀爆的Angular1.0
尝试从http请求上遏制缓存: http://blog.csdn.net/u010039979/article/details/54376856 if (!$httpProvider.defaults ...
- postman是如何使用的?
1.地址:https://segmentfault.com/a/1190000005055899
- C语言中的指针运算
int a[5]={1,2,3 ,4,5} *p=a; *p++ 等价于*(p++) 等价于a[i++](i++ i首先会被使用任何进行自+) *++p等价于*(++p) 等价于 a[++i] (++ ...
- Myeclipse 选中高亮
打开显示功能 选择Windows->Preferences->Java-> Editor-> Mark Occurrences ,勾选选项.这时,当你单击一个元素的时候,代码中 ...
- 【BZOJ3105】[cqoi2013]新Nim游戏 贪心+线性基
[BZOJ3105][cqoi2013]新Nim游戏 Description 传统的Nim游戏是这样的:有一些火柴堆,每堆都有若干根火柴(不同堆的火柴数量可以不同).两个游戏者轮流操作,每次可以选一个 ...
- 为system对象添加扩展方法
////扩展方法类:必须为非嵌套,非泛型的静态类 public static class DatetimeEx { //通过this声明扩展的类,这里给DateTime类扩展一个Show方法,只有一个 ...