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 ...
随机推荐
- 关于Triple DES(3DES)对称加密算法
一.引言 在网络安全领域,对称加密算法作为一种常见的加密手段,被广泛应用于保障数据传输的保密性和完整性.其中,DES(Data Encryption Standard)算法作为一种经典的对称加密算法, ...
- 26、Flutter中命名路由
Flutter 中的命名路由 main.dart中配置路由 void main() { runApp(MaterialApp( theme: ThemeData( appBarTheme: const ...
- picker组件增加搜索item条目的功能
picker组件顶部有搜索框,能搜索条目,如果条目很多的时候,上下翻很麻烦了,而且不容易找到,可以先全查,然后js搜索 wxml <button bindtap="openFlag&q ...
- 打通Rasa Action Server和LLM接口的尝试方法
本文使用最简单的方法对打通 Rasa Action Server 和 LLM 接口进行了尝试,即当 Rasa 对话 intent 为 out_of_scope 时,调用 action_gpt_fa ...
- vscode 启动go
{ "version": "0.2.0", "configurations": [ { "name": "La ...
- Mysql tls 会话:再一次抓包之后,我认识到…
本文分享自华为云社区<有些事你只有抓包才知道之mysql tls会话>,作者:张俭. 你的mysql客户端和服务端之间开启tls了吗?你的回答可能是No,我根本没开启mysql的tls. ...
- “互联网+”大赛之AI创新应用赛题攻略:大胆脑洞,共绘智慧生活蓝图
摘要:本次"互联网+"大赛AI创新应用赛题的设置是希望学生可以从日常实际应用需求出发,结合自己的奇思妙想,提升智能终端用户的使用体验,为构建万物互联的智能世界贡献一份力量. 本文分 ...
- 小熊派:用OpenHarmory3.0点亮LED
摘要:作为一个代表性的完整的开发,本案例可以分成3大部分:代码文件的规划,LED灯的驱动开发,点亮LED的业务开发. 本文分享自华为云社区<在小熊派Micro上用OpenHarmory3.0点亮 ...
- 华为云FusionInsight连续三次获得第一,加速释放数据要素价值
摘要:近日,IDC发布<中国大数据平台市场研究报告,2021 H1>,华为云FusionInsight智能数据湖已连续三次获得大数据平台市场份额第一. 本文分享自华为云社区<华为云F ...
- PPT 商务PPT 如何展示你的产品
PPT 商务PPT 如何展示你的产品 如何优雅的展示产品 如何展示互联网产品 直接产品截图,比较生硬,简单粗暴 使用场景+样机 放一个电脑或手机的外壳 如何展示产品 如何展示现实中的产品 多角度剪裁 ...