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服务器性能

E:\Code\github\redis-config\bin\windows (master -> origin)
λ redis-benchmark -h 127.0.0.1 -p 6380 -n 10000 -q
PING_INLINE: 71428.57 requests per second
PING_BULK: 79365.08 requests per second
SET: 72992.70 requests per second
GET: 59880.24 requests per second
INCR: 74074.07 requests per second
LPUSH: 71428.57 requests per second
LPOP: 75187.97 requests per second
SADD: 72463.77 requests per second
SPOP: 75187.97 requests per second
LPUSH (needed to benchmark LRANGE): 71428.57 requests per second
LRANGE_100 (first 100 elements): 28011.21 requests per second
LRANGE_300 (first 300 elements): 14245.01 requests per second
LRANGE_500 (first 450 elements): 10593.22 requests per second
LRANGE_600 (first 600 elements): 8431.70 requests per second
MSET (10 keys): 52083.33 requests per second

  

redis-benchmark使用说明的更多相关文章

  1. Azure Redis Cache (3) 在Windows 环境下使用Redis Benchmark

    <Windows Azure Platform 系列文章目录> 熟悉Redis环境的读者都知道,我们可以在Linux环境里,使用Redis Benchmark,测试Redis的性能. ht ...

  2. redis API使用说明

    List相关: LPOP key : 删除并取得LIST头部一个元素 RPOP key : 删除并取得LIST尾部一个元素 BLPOP key [key ...] timeout : 删除并取得LIS ...

  3. Redis常见使用说明

    1 概述Remote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统.Redis是一个开源的使用ANSI C语言编写. ...

  4. Redis 的性能幻想与残酷现实

    2011 年,当初选择 Redis 作为主要的内存数据存储,主要吸引我的是它提供多样的基础数据结构可以很方便的实现业务需求.另一方面又比较担心它的性能是否足以支撑,毕竟当时 Redis 还属于比较新的 ...

  5. 转载----How fast is Redis?

    How fast is Redis? Redis includes the redis-benchmark utility that simulates running commands done b ...

  6. benchmark

    redis benchmark How many requests per second can I get out of Redis? Using New Relic to Understand R ...

  7. Redis 的性能幻想与残酷现实(转)

    2011 年,当初选择 Redis 作为主要的内存数据存储,主要吸引我的是它提供多样的基础数据结构可以很方便的实现业务需求.另一方面又比较担心它的性能是否足以支撑,毕竟当时 Redis 还属于比较新的 ...

  8. Redis 的性能

    Redis 的性能幻想与残酷现实 2011 年,当初选择 Redis 作为主要的内存数据存储,主要吸引我的是它提供多样的基础数据结构可以很方便的实现业务需求.另一方面又比较担心它的性能是否足以支撑,毕 ...

  9. Redis 性能问题的记录

    最近线上使用redis, 查询的情况不甚理想, 这个查询操作是个 lua 脚本, 包含如下操作 开发机 redis, 没有其他干扰, 插入的 zset 有 5000 member 左右, 使用的 re ...

  10. 深入redis内部---网络编程

    Redis在anet.h和anet.c中封装了底层套接字实现: 1.anetTcpServer,建立网络套接字服务器,完成对socket(),bind(),listen()等操作的封装,返回socke ...

随机推荐

  1. MyBatis: Invalid bound statement (not found)错误的可能原因

    MyBatis: Invalid bound statement (not found)错误的可能原因 其他原因导致此问题解决参考: 1.检查 xml 文件所在 package 名称是否和 Mappe ...

  2. java HttpClientUtil帮助类

    自己写的java模拟请求帮助类,已经包含header头构造,会话session维持 package com.haozl.back.util; import java.io.File; import j ...

  3. jquery中.each()方法遍历循环如何终止方法

    使用return false 终止循环 function checkStar(obj){ var flag=false; //获取本节点星级 var star = obj.getAttribute(& ...

  4. 19.8.28 flutter学习笔记

    1:字符串的操作 length打印字符串的长度.“isEmpty”判断字符串是否为空. “contains()是否包含某个字符串”.”substring(startIndex,endIndex)截取一 ...

  5. 14-SQLServer索引碎片

    一.总结 1.数据库的存储本身是无序的,建立聚集索引之后,就会按照聚集索引的物理顺序存入硬盘: 2.建立索引完全是为了提升读取的速度,相对写入的速度就会降低,没有索引的表写入时最快的,但是大多数系统读 ...

  6. jQuery.getScript(url, [callback])

    jQuery.getScript(url, [callback]) 概述 通过 HTTP GET 请求载入并执行一个 JavaScript 文件.大理石平台精度等级 jQuery 1.2 版本之前,g ...

  7. docker stack /swarm 替代 docker-compose 进行部署

    之前一直用docker-compose开发了几个单例的service, 今天开始压力测试, 结果发现postgres的CPU负载很重, 就想设置cpus 结果发现docker-compose V3之后 ...

  8. hdu 5821 Ball 思维题

    Ball Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submis ...

  9. spark on yarn 动态资源分配报错的解决:org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException: The auxService:spark_shuffle does not exist

    组件:cdh5.14.0 spark是自己编译的spark2.1.0-cdh5.14.0 第一步:确认spark-defaults.conf中添加了如下配置: spark.shuffle.servic ...

  10. 关于自定义sparkSQL数据源(Hbase)操作中遇到的坑

    自定义sparkSQL数据源的过程中,需要对sparkSQL表的schema和Hbase表的schema进行整合: 对于spark来说,要想自定义数据源,你可以实现这3个接口: BaseRelatio ...