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 ...
随机推荐
- SQL Server系列:系统函数之日期和时间函数
1.current_timestamp :获取数据库系统时间戳 --获取数据库系统时间戳 select current_timestamp go 2.getdate() :获取数据库系统时间戳 --获 ...
- C++篇:第二章_运算符_知识点大全
C++篇为本人学C++时所做笔记(特别是疑难杂点),全是硬货,虽然看着枯燥但会让你收益颇丰,可用作学习C++的一大利器 二.运算符 (一)运算符本身运用限制 %取余运算符要求运算数必须是整型,浮点数取 ...
- 3大方面升级华为云CCE集群体验,助力集群高效运维管理
本文分享自华为云社区<华为云从心打造CCE集群升级体验,助力集群高效运维管理>,作者:云容器大未来 . 在云原生时代浪潮的推动下,Kubernetes的发展日新月异,更新的集群版本可以带来 ...
- 云小课|3种常用Git工作流推荐
本文分享自华为云社区<[云小课]应用平台第44课 常用Git工作流推荐>,作者: 应用万花筒. . 1. Git工作流-动静有法 简单来说,工作流就是开发团队预置的开发流程和解决问题时使用 ...
- 解密数据仓库LLVM技术神奇之处
摘要:广义上讲就是指LLVM本身,它是一套用于开发编译前端与后端的工具套件,狭义上讲LLVM就是指整个编译套件的优化器及后端,而CLANG可以认为是C/C++的前端. 本文分享自华为云社区<Ga ...
- 技术+案例详解无监督学习Autoencoder
摘要:本篇文章将分享无监督学习Autoencoder的原理知识,然后用MNIST手写数字案例进行对比实验及聚类分析. 本文分享自华为云社区<[Python人工智能] 十五.无监督学习Autoen ...
- HanLP 学习
学习 HanLP 需要了解, 双数组Trie树 (Double-array Trie) Aho-Corasick DoubleArrayTire 算法 ACDAT - 基于双数组字典树的AC自动机 T ...
- sqlalchemy union 联合查询
在最近的工作中遇到一个问题,要将两个字段相似的表里的数据统一起来展示在一个统计页面中.如果是单纯的展示数据那很简单,两个表查出来之后组合一下就完事了,但是有坑的地方就是分页和按照时间搜索,这两个功能决 ...
- The Cluster ID Zc7nlyfTQ5qPbhY2d8I_3A doesn't match stored clusterId Some(ZvQZIX9gTB-dj05be_i_-w) in meta.properties.
启动kafka时报错(部分信息): [2022-05-12 20:26:05,589] INFO Cluster ID = Zc7nlyfTQ5qPbhY2d8I_3A (kafka.server.K ...
- k8s-部署 Kubernetes 集群(kubeadm方式)
一 机器准备 IP 主机名 角色 配置 安装组件 192.168.198.150 master-1 master 2U2G master组件 etcd kubectl 192.168.198.151 ...