注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

snoopyxdy的博客

https://github.com/DoubleSpout

 
 
 

日志

 
 

redis性能小测  

2015-05-13 15:54:27|  分类: 沉淀 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
这次分别测试,正常启动redis,taskset启动redis帮顶第二个cpu,docker启动redis这3种情况
redis 版本 2.8.19

redis配置都用默认的配置,如下:

daemonize yes
port 6379


1、正常启动redis

 启动命令:redis-server /etc/redis.conf 

 性能测试命令:redis-benchmark -h 127.0.0.1 -p 6379 -q -d 100

PING_INLINE: 47103.16 requests per second
PING_BULK: 68259.38 requests per second
SET: 65616.80 requests per second
GET: 64850.84 requests per second
INCR: 65876.16 requests per second
LPUSH: 40966.82 requests per second
LPOP: 65146.58 requests per second
SADD: 60901.34 requests per second
SPOP: 59382.42 requests per second
LPUSH (needed to benchmark LRANGE): 66755.67 requests per second
LRANGE_100 (first 100 elements): 24515.81 requests per second
LRANGE_300 (first 300 elements): 12295.58 requests per second
LRANGE_500 (first 450 elements): 7918.28 requests per second
LRANGE_600 (first 600 elements): 4784.92 requests per second
MSET (10 keys): 44682.75 requests per second

 性能测试命令:redis-benchmark -h 127.0.0.1 -p 6379 -q -d 500

PING_INLINE: 54945.05 requests per second

PING_BULK: 68540.09 requests per second

SET: 68073.52 requests per second

GET: 50813.01 requests per second

INCR: 56657.22 requests per second

LPUSH: 69589.42 requests per second

LPOP: 66533.60 requests per second

SADD: 70422.54 requests per second

SPOP: 54112.55 requests per second

LPUSH (needed to benchmark LRANGE): 49164.21 requests per second

LRANGE_100 (first 100 elements): 10578.65 requests per second

LRANGE_300 (first 300 elements): 3867.87 requests per second

LRANGE_500 (first 450 elements): 2625.36 requests per second

LRANGE_600 (first 600 elements): 1686.94 requests per second

MSET (10 keys): 39123.63 requests per second


2、利用 taskset 帮顶一个cpu启动redis

启动命令:taskset -c 01 redis-server /etc/redis.conf

性能测试命令:redis-benchmark -h 127.0.0.1 -p 6379 -q -d 100

PING_INLINE: 54377.38 requests per second
PING_BULK: 71530.76 requests per second
SET: 68681.32 requests per second
GET: 67659.00 requests per second
INCR: 71839.09 requests per second
LPUSH: 68870.52 requests per second
LPOP: 71479.62 requests per second
SADD: 68027.21 requests per second
SPOP: 55741.36 requests per second
LPUSH (needed to benchmark LRANGE): 66711.14 requests per second
LRANGE_100 (first 100 elements): 29877.50 requests per second
LRANGE_300 (first 300 elements): 12230.92 requests per second
LRANGE_500 (first 450 elements): 8132.06 requests per second
LRANGE_600 (first 600 elements): 5923.47 requests per second
MSET (10 keys): 36873.16 requests per second

性能测试命令:redis-benchmark -h 127.0.0.1 -p 6379 -q -d 500

PING_INLINE: 55991.04 requests per second

PING_BULK: 66269.05 requests per second

SET: 63653.72 requests per second

GET: 58651.02 requests per second

INCR: 65019.51 requests per second

LPUSH: 65104.17 requests per second

LPOP: 62266.50 requests per second

SADD: 70771.41 requests per second

SPOP: 67980.97 requests per second

LPUSH (needed to benchmark LRANGE): 66666.66 requests per second

LRANGE_100 (first 100 elements): 13051.42 requests per second

LRANGE_300 (first 300 elements): 4299.41 requests per second

LRANGE_500 (first 450 elements): 2699.27 requests per second

LRANGE_600 (first 600 elements): 1668.72 requests per second

MSET (10 keys): 31387.32 requests per second


3、时候用 docker 正常启动 redis

启动命令:

docker run -v /myredis/conf/redis.conf:/usr/local/etc/redis/redis.conf -p 6379:6379 --name myredis -d redis:2.8.19

性能测试命令:redis-benchmark -h 127.0.0.1 -p 6379 -q -d 100

PING_INLINE: 9511.13 requests per second

PING_BULK: 11918.95 requests per second

SET: 11184.43 requests per second

GET: 12239.90 requests per second

INCR: 8203.45 requests per second

LPUSH: 10544.07 requests per second

LPOP: 10288.07 requests per second

SADD: 12119.74 requests per second

SPOP: 10296.54 requests per second

LPUSH (needed to benchmark LRANGE): 9562.06 requests per second

LRANGE_100 (first 100 elements): 7514.28 requests per second

LRANGE_300 (first 300 elements): 4647.92 requests per second

LRANGE_500 (first 450 elements): 2856.49 requests per second

LRANGE_600 (first 600 elements): 2484.41 requests per second

MSET (10 keys): 10114.29 requests per second

下面500的不用测试了

总结一下,docker之后对性能的影响比较大,使用taskset可以稍微提升redis的性能




  评论这张
 
阅读(370)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016