Windows 和 linux 下面 Redis 性能比较
Windows 和 linux 下面 Redis 性能比较
问题来源
公司里面有一些环境还是使用Windows来跑
对应的. Redis和nginx 也是跑在Windows上面
但是微软官网自从 3.2.100 之后就再也没有编译过Windows版本的redis
网上能找到的基本上都不让用于生产.
但是3.2.100 版本太早了, 很多特性支持的也不是很好.
这里想比较一下他们两者的性能. 以便备忘.
版本说明
1. Windows 上面采用微软编译的 3.2.100 和 github上面有人编译的 6.2.12的版本
2. linux上面采用 6.2.8的版本
都采用默认参数启动.
测试脚本为:
redis-benchmark.exe -h 127.0.0.1 -p 6379 -n 100000 -c 20 -q
./redis-benchmark -h 127.0.0.1 -p 6379 -n 100000 -c 20 -q
Windows上面的其他问题
1. 微软的系统有一个 3200 个文件打开数的限制.
我花了一个小时没有找到一个合适的注册表修改方法来避开这个参数.
# Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
# Current maximum open files is 3200. maxclients has been reduced to 3168 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
注意提示信息还是 linux的方法.Redis 默认有32个文件数是留给内部使用的.
2. 部分自行用cygwin 或者是 msys2 编译的版本稳定性不足. 运行一段时间就会卡死宕机.
上生产必须进行严格的 压力和性能测试才可以.
机器配置信息
机器用的是一个 两路的2015年产的服务器
CPU为: E5-2620v2 2.1Ghz
内存为: 256G
磁盘为: 5快2T near-line 7200rpm HDD raid6
操作系统: Win2019
虚拟机为Windows 上面的CentOS8.0 虚拟机.
部分结论
微软编译的 3.2.100 是github 吃瓜群众编译的 6.2.12 的 1.4倍的性能.
linux上面的6.2.8 是 github 吃瓜群众编译的6.2.12的 2.3 倍的性能
linux上面 6.2.8 是 windows 3.2.100 性能的 1.6 倍
Windows 上面的redis 被碾压..
部分图标


如下是详细结果
Windows 3.2.100
PING_INLINE: 22296.54 requests per second
PING_BULK: 22872.83 requests per second
SET: 22967.39 requests per second
GET: 23380.88 requests per second
INCR: 22246.94 requests per second
LPUSH: 23375.41 requests per second
RPUSH: 22862.37 requests per second
LPOP: 23239.60 requests per second
RPOP: 22794.62 requests per second
SADD: 23299.16 requests per second
SPOP: 23062.73 requests per second
LPUSH (needed to benchmark LRANGE): 23272.05 requests per second
LRANGE_100 (first 100 elements): 12515.64 requests per second
LRANGE_300 (first 300 elements): 7000.84 requests per second
LRANGE_500 (first 450 elements): 5093.21 requests per second
LRANGE_600 (first 600 elements): 4213.72 requests per second
MSET (10 keys): 19845.21 requests per second
Windows 6.2.12
PING_INLINE: 15822.78 requests per second, p50=0.863 msec
PING_MBULK: 15900.78 requests per second, p50=0.847 msec
SET: 15669.07 requests per second, p50=0.863 msec
GET: 15900.78 requests per second, p50=0.855 msec
INCR: 15943.88 requests per second, p50=0.855 msec
LPUSH: 15669.07 requests per second, p50=0.895 msec
RPUSH: 15710.92 requests per second, p50=0.887 msec
LPOP: 15661.71 requests per second, p50=0.887 msec
RPOP: 15987.21 requests per second, p50=0.863 msec
SADD: 16048.79 requests per second, p50=0.855 msec
HSET: 15812.78 requests per second, p50=0.895 msec
SPOP: 15787.81 requests per second, p50=0.847 msec
ZADD: 15600.62 requests per second, p50=0.911 msec
ZPOPMIN: 15959.15 requests per second, p50=0.847 msec
LPUSH (needed to benchmark LRANGE): 15800.28 requests per second, p50=0.887 msec
LRANGE_100 (first 100 elements): 9330.97 requests per second, p50=1.383 msec
LRANGE_300 (first 300 elements): 4779.20 requests per second, p50=2.119 msec
LRANGE_500 (first 500 elements): 3214.19 requests per second, p50=3.191 msec
LRANGE_600 (first 600 elements): 2837.85 requests per second, p50=3.663 msec
MSET (10 keys): 14751.44 requests per second, p50=1.023 msec
linux 6.2.8
PING_INLINE: 37453.18 requests per second, p50=0.279 msec
PING_MBULK: 36589.83 requests per second, p50=0.287 msec
SET: 37160.91 requests per second, p50=0.295 msec
GET: 36630.04 requests per second, p50=0.295 msec
INCR: 36589.83 requests per second, p50=0.295 msec
LPUSH: 37355.25 requests per second, p50=0.303 msec
RPUSH: 37383.18 requests per second, p50=0.303 msec
LPOP: 36968.58 requests per second, p50=0.311 msec
RPOP: 37064.49 requests per second, p50=0.303 msec
SADD: 37023.32 requests per second, p50=0.295 msec
HSET: 36683.79 requests per second, p50=0.303 msec
SPOP: 37160.91 requests per second, p50=0.295 msec
ZADD: 36913.99 requests per second, p50=0.311 msec
MSET (10 keys): 36941.26 requests per second, p50=0.375 msec
Windows 和 linux 下面 Redis 性能比较的更多相关文章
- Windows 和 Linux 上Redis的安装守护进程配置
# Windows 和 Linux 上Redis的安装守护进程配置 Redis 简介 Redis是目前最常用的非关系型数据库(NOSql)之一,常以Key-Value的形式存储.Redis读写速度 ...
- windows下和linux下 Redis 安装
Redis 是一个高性能的key-value数据库, 使用内存作为主存储,数据访问速度非常快,当然它也提供了两种机制支持数据持久化存储.比较遗憾的是,Redis项目不直接支持Windows,Windo ...
- mysql-5.7.xx在lcentos7下的安装以及mysql在windows以及linux上的性能差异
前言: 在centos上安装mysql,整整折腾了将近一天,因为是第一次安装,的确是踩了不少坑,这里详细记录下来,方便各位有同样需求的小伙伴参考. 该选择什么版本? mysql5.7有很多小版本,但是 ...
- Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务
一.引言 今天本来没有打算写这篇文章,当初我感觉使用这个工具应该很简单,下载的过程也不复杂,也没有打算记录下来.但是在使用的过程中还是出现了一些问题,为了给第一次使用Redis Desktop Man ...
- redis安装,windows,linux版本并部署服务
一.使用场景 项目中采用数据库访问量过大或访问过于频繁,将会对数据库带来很大的压力.redis数据库是以非关系数据库的出现,后来redis的迭代版本支持了缓存数据.登录session状 ...
- Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务(转载6)
Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务 一.引言 今天本来没有打算写这篇文章,但是,今天测试Redis的时候发现了两个问题 ...
- Windows五种IO模型性能分析和Linux五种IO模型性能分析
Windows五种IO模型性能分析和Linux五种IO模型性能分析 http://blog.csdn.net/jay900323/article/details/18141217 http://blo ...
- 【Azure Redis 缓存】Windows和Linux系统本地安装Redis, 加载dump.rdb中数据以及通过AOF日志文件追加数据
任务描述 本次集中介绍使用Windows和Linux()搭建本地Redis服务器的步骤,从备份的RDB文件中加载数据,以及如何生成AOF文件和通过AOF文件想已经运行的Redis追加数据. 操作步骤 ...
- Linux 安装Redis 5.0
结构如下: Redis 官方不建议Redis安装在WINDOWS 服务器上(尤其是生产中分布式事物缓存). linux 下Redis 5.0主从复制(一主二从)哨兵模式的搭建:https://www. ...
- 【Redis学习】:Windows环境下的Redis安装与配置
Redis简介 REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统. Redis是一个开源的使用ANSI C ...
随机推荐
- 论文复现丨基于ModelArts进行图像风格化绘画
摘要:这个 notebook 基于论文「Stylized Neural Painting, arXiv:2011.08114.」提供了最基本的「图片生成绘画」变换的可复现例子. 本文分享自华为云社区& ...
- 带你了解TensorFlow pb模型常用处理方法
摘要:TensorFlow 模型训练完成后,通常会通过frozen过程保存一个最终的pb模型. 本文分享自华为云社区<TensorFlow pb模型修改和优化>,作者:luchangli. ...
- 抓包工具 Fiddler 抓取 exe 包
浏览器访问网页,可以使用 Fiddler 直接抓去,如果是 exe的客户端,可以借助 Proxifier 工具 设置完成后,添加代理规则,排除fiddler,也就是让fiddler进行网络直连.不然f ...
- BOM批量查询
1业务要求 1.当多层展开时: 根据"BOM应用程序"字段CAPID在TC04中取出"选择ID"TC04-CSLID: 再根据TCS41-CSLID= TC0 ...
- POJ 1417 True Liars (并查集+DP)
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 1556 Accepted: 457 Description After havi ...
- AcWing 每日一题 - Summer
本篇解题记录题源来自 AcWing 的 Summer 每日一题 补题链接:Here 2021/07/01 done Week 1 星期一 AcWing 3485. 最大异或和 (Hard 思路 先求出 ...
- vivo 悟空活动中台 - H5 活动加载优化
本文首发于 vivo互联网技术 微信公众号 链接: https://mp.weixin.qq.com/s/6gtVR0nVNcZvREjwftZgzA作者:悟空中台研发团队 [悟空活动中台]系列往期精 ...
- uni-app app定位当前地理位置
https://blog.csdn.net/HXH_csdn/article/details/112258398?utm_medium=distribute.pc_relevant.none-task ...
- P4913【黄】
这题好像可以用线段树什么的高级做法来做,但我感觉我这个简单做法不管是时间还是空间都和那些复杂的做法差不了太多.重点是很优雅,思路非常简单,而且代码很短,用OOP思想写成的代码可读性极高,不用注释估计都 ...
- Jenkins安装完成后,一直停留在页面Please wait while Jenkins is getting ready to work...的解决方法
一.打开jenkins一直显示如下页面: