分布式缓存Redis之性能测试
来源:互联网 发布:知乎日报的rss 编辑:程序博客网 时间:2024/06/03 22:07
写在前面
本学习教程所有示例代码见GitHub:https://github.com/selfconzrr/Redis_Learning
Redis 性能测试是通过同时执行多个命令实现的。
语法:
redis 性能测试的基本命令如下:
redis-benchmark [option] [option value]
实例
以下实例同时执行 10000 个请求来检测性能:
redis-benchmark -n 100000PING_INLINE: 141043.72 requests per secondPING_BULK: 142857.14 requests per secondSET: 141442.72 requests per secondGET: 145348.83 requests per secondINCR: 137362.64 requests per secondLPUSH: 145348.83 requests per secondLPOP: 146198.83 requests per secondSADD: 146198.83 requests per secondSPOP: 149253.73 requests per secondLPUSH (needed to benchmark LRANGE): 148588.42 requests per secondLRANGE_100 (first 100 elements): 58411.21 requests per secondLRANGE_300 (first 300 elements): 21195.42 requests per secondLRANGE_500 (first 450 elements): 14539.11 requests per secondLRANGE_600 (first 600 elements): 10504.20 requests per secondMSET (10 keys): 93283.58 requests per second
redis 性能测试工具可选参数如下所示:
实例
以下实例我们使用了多个参数来测试 redis 性能:
redis-benchmark -h 127.0.0.1 -p 6379 -t set,lpush -n 100000 -q
SET: 146198.83 requests per second
LPUSH: 145560.41 requests per second
以上实例中主机为 127.0.0.1,端口号为 6379,执行的命令为 set,lpush,请求数为 10000,通过 -q 参数让结果只显示每秒执行的请求数。
—–乐于分享,共同进步
—–Any comments greatly appreciated
—–诚心欢迎各位交流讨论!QQ:1138517609
阅读全文
0 0
- 分布式缓存Redis之性能测试
- 分布式缓存Redis之数据类型
- 分布式缓存Redis之HyperLogLog
- 分布式缓存Redis之事务
- 分布式缓存Redis之ShardedJedis
- Window平台搭建Redis分布式缓存集群 (一)服务器搭建及性能测试
- 分布式锁之Redis缓存锁
- 分布式缓存Redis之二进制安全
- 分布式缓存Redis之Ubuntu常用命令
- 分布式缓存Redis之持久化
- 分布式缓存Redis之Pipeline(管道)
- 分布式缓存Redis之资源释放
- 分布式缓存Redis之Java客户端
- 分布式缓存Redis之Script脚本
- 分布式缓存Redis之cluster集群
- 分布式缓存Redis之适用场景
- Redis-高性能高并发NoSQL分布式缓存
- 分布式缓存Redis之配置文件redis.conf详解
- js实现倒计时
- Fiddler使用总结
- 网络结构体系
- 二叉树的非递归中序遍历
- Java垃圾回收机制特性
- 分布式缓存Redis之性能测试
- C#详解类型基础
- JavaWeb思维导图
- linux基本目录结构
- Windows下用Tensorflow中Android示例实现实时目标检测
- ASP浏览器版本检测+操作系统判断检测
- 重新编译Linux内核踩的坑
- python: return 函数
- Leetcode 刷题 Binary Search Easy难度经验总结