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 ...
随机推荐
- DataX快速入门
DataX3.0快速入门 一.DataX3.0概览 DataX是阿里云DataWorks数据集成的开源版本,在阿里巴巴集团内部被广泛使用的离线数据同步工具/平台.解决了数据库之中的数据同步.迁移问题, ...
- 案例解析关于ArkUI框架中ForEach的潜在陷阱与性能优化
本文分享自华为云社区<深入解析ForEach的潜在陷阱与性能优化:错误用法与性能下降的案例分析>,作者:柠檬味拥抱 . 在ArkUI框架中,ForEach接口是基于数组类型数据进行循环渲染 ...
- 如何给MindSpore添加一个新的硬件后端?快速构建测试环境!
摘要:介绍如何给MindSpore添加一个新的硬件后端. 本文分享自华为云社区<如何给MindSpore添加一个新的硬件后端?快速构建测试环境!>,原文作者:HWCloudAI. Mind ...
- web自动化测试(3):web功能自动化测试selenium基础课
继上篇<web自动化测试(1):为什么选择selenium做自动化测试>,本文介绍如selenium使用 做UI自动化测试,需要什么技能 前端相关技术:HTML.XML.JavaScrip ...
- centos8 测地卸载php5.6 与卸载php7
centos8 yum php 默认安装 php7.1.2 我想卸载php7 ,安装php5.6 yum remove php 无法彻底卸载干净.必须强制删除,使用下面命令查看全部php软件包 rpm ...
- Ambari2.7.3.0添加组件
Ambari 2.7.3.0安装新组件和之前版本略有不同,本文将简述安装新组件的简单过程. 前提是大家已经安装好Ambari 2.7.3.0 这时候由于有一些组件没有添加,就需要安装新的组件. 首先我 ...
- SQL SERVER 查询表结构,导出到Excel 生成代码用
查询所有表 select * from information_schema.tables SQL SERVER 查询表结构,导出到Excel 生成代码用 --快速查看表结构字段(比较全面的) SEL ...
- LinkedBlockingQueue实现的生产者和消费者模型
首先 LinkedBlockingQueue 是线程安全的阻塞队列,LinkedBlockingQueue实现的生产者和消费者模型 阻塞队列与我们平常接触的普通队列(LinkedList或ArrayL ...
- Linux--内存管理浅谈
本文旨在宏观的了解linux的内存管理制度,理解相关概念,故很多方面不作过深叙述,感兴趣的可自行研究:如有错误,请指出. 一.进程与内存 当一个进程启动时,它需要获取系统分配给它的内存空间,并且设置好 ...
- Python报错:AttributeError: type object 'str' has no attribute '_name_'(机器学习实战treePlotter代码)解决方案
错误信息: 学习<机器学习实战>这本书时,按照书上的代码运行,产生了错误,但是在代码中没有错误提示,产生错误的代码如下: if type(secondDict[key])._name_ = ...