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. 【SDOI2018】反回文串(【ARC064 F】Rotated Palindromes 加强版)

    题意 给你一个正整数 \(n\),求有多少字符集为 \(1\) 到 \(k\) 之间整数的字符串,使得该字符串可以由一个长度为 \(n\) 的回文串循环移位得到. ARC原题 \(100\%\) 的数 ...

  2. NIM 1

    博弈论(一):Nim游戏 重点结论:对于一个Nim游戏的局面(a1,a2,...,an),它是P-position当且仅当a1^a2^...^an=0,其中^表示位异或(xor)运算. Nim游戏是博 ...

  3. PHP程序员的技能图谱

    PHP知识图谱      

  4. PAT乙级1031

    题目链接 https://pintia.cn/problem-sets/994805260223102976/problems/994805290334011392 题解 emmm.对于每个身份证号, ...

  5. Web的了解和servlet的初次见面

    web 相信大家都不陌生,平常我们浏览网页用的都是web服务.互联网起初的web就是非常简单的页面,但是随着客户需求越来越复杂,需要的功能越来越多,我们的服务器端需要处理的请求越来越多,需要区分不同的 ...

  6. Linux之top 监视系统任务的工具

    top 监视系统任务的工具: 和ps 相比,top是动态监视系统任务的工具,top 输出的结果是连续的:  top 命令用法及参数: top 调用方法: top 选择参数 参数: -b  以批量模式运 ...

  7. webpack拷贝插件 copy-webpack-plugin

    copy-webpack-plugin 安装 npm install --save-dev copy-webpack-plugin 作用:在webpack中拷贝文件和文件夹 from 定义要拷贝的源文 ...

  8. IDEA部署Tomcat报错:No artifacts marked for deployment

    刚开始碰到这个问题还被坑了,搞了好半天...所以我准备记录一下,走的弯路就不说了,因为我没图

  9. css3小动画:鼠标hover后text-decoration的动画

    实现效果 具体实现 利用css3 ::after或者::before伪元素实现.html代码 <a class="abstract-title" href="/ar ...

  10. js数据持久化本地数据存储-JSON.parse和JSON.stringify的区别

    JSON.stringify()的作用是将 JavaScript 值转换为 JSON 字符串, 而JSON.parse()可以将JSON字符串转为一个对象. 简单点说,它们的作用是相对的,我用JSON ...