Redis on Windows
- This is a port for Windows based on Redis.
- We officially support the 64-bit version only. Although you can build the 32-bit version from source if desired.
- You can download the latest unsigned binaries and the unsigned MSI installer from the release page.
- For releases prior to 2.8.17.1, the binaries can found in a zip file inside the source archive, under the bin/release folder.
- Signed binaries are available through NuGet and Chocolatey.
- Redis can be installed as a Windows Service.
Windows-specific changes
- There is a replacement for the UNIX fork() API that simulates the copy-on-write behavior using a memory mapped file on 2.8. Version 3.0 is using a similar behavior but dropped the memory mapped file in favor of the system paging file.
- In 3.0 we switch the default memory allocator from dlmalloc to jemalloc that is supposed to do a better job at managing the heap fragmentation.
- Because Redis makes some assumptions about the values of file descriptors, we have built a virtual file descriptor mapping layer.
Redis release notes
There are two current active branches: 2.8 and 3.0.
- Redis on UNIX 2.8 release notes
- Redis on Windows 2.8 release notes
- Redis on UNIX 3.0 release notes
- Redis on Windows 3.0 release notes
How to configure and deploy Redis on Windows
Premise
Redis on Windows 3.0 introduces a new memory management architecture that:
- improves performance
- reduces the system requirements
- simplifies configuration
On top of the new architecture, the switch from dlmalloc to jemalloc improves the heap
management reducing heap fragmentation.
Memory Configuration Settings Changes
In Redis on Windows 2.8 the memory allocation architecture was based on a memory
mapped file that was created at startup. The size and location of the memory mapped file
were configured using two flags:
maxheap
heapdir
Since Redis on Windows 3.0 doesn't use a memory mapped file anymore, those two flags
are treated as any other invalid flag, therefore if they are present in the configuration file or
passed as a command line argument, Redis will fail to start.
System Paging File Size Requirements
The new memory management architecture uses the system paging file to back the
Redis heap, therefore there are some system requirements to make sure that Redis
doesn't run out of heap space.
Redis on Windows 2.8 was allocating the heap space at once at startup, if more heap
space was needed later on, it was going to fail with an out of memory error. Redis on
Windows 3.0, on the contrary, allocates the heap memory on demand. At startup it only
allocated the minimum amount of heap required to start and it keeps allocating more
memory when needed.
Given that the heap is subject to fragmentation and given some other internal
requirements (i.e. copy on write mechanism to simulate the Unix fork API), a safe minimum
requirement for the system paging file is 2 times the size of physical memory.
By default a freshly installed Windows machine allows the system paging file to grow up
to 3.5 times the size of physical memory (provided that there is enough disk space for it),
therefore the default system paging file configuration is already sufficient to run Redis on
Windows 3.0.
Preventing Redis from running out-of-memory
If other programs, beside Redis, are running on the same machine and they also use
the system paging file or if the system paging file reaches a high degree of fragmentation,
there is still the possibility of an out-of-memory error. A machine reboot will defragment the
system paging file and reduce the possibility of such an event. Increasing the size setting
and setting the Initial size
equal to the Maximum size
also helps.
How to build Redis using Visual Studio
You can use the free Visual Studio 2013 Community Edition. Regardless which Visual Studio edition you use, make sure you have updated to Update 5, otherwise you will get a "illegal use of this type as an expression" error.
-
Open the solution file msvs\redisserver.sln in Visual Studio, select a build configuration (Debug or Release) and target (x64) then build.
This should create the following executables in the msvs\$(Target)\$(Configuration) folder:
- redis-server.exe
- redis-benchmark.exe
- redis-cli.exe
- redis-check-dump.exe
- redis-check-aof.exe
Testing
To run the Redis test suite some manual work is required:
- The tests assume that the binaries are in the src folder. Use mklink to create a symbolic link to the files in the msvs\x64\Debug|Release folders. You will need symbolic links for src\redis-server, src\redis-benchmark, src\redis-check-aof, src\redis-check-dump, src\redis-cli, and src\redis-sentinel.
- The tests make use of TCL. This must be installed separately.
- To run the cluster tests against 3.0, Ruby On Windows is required.
- To run the tests you need to have a Unix shell on your machine, or MinGW tools in your path. To execute the tests, run the following command: "tclsh8.5.exe tests/test_helper.tcl --clients N", where N is the number of parallel clients . If a Unix shell is not installed you may see the following error message: "couldn't execute "cat": no such file or directory".
- By default the test suite launches 16 parallel tests, but 2 is the suggested number.
相关推荐
【Redis on Windows Release Notes】是针对在Windows操作系统上运行Redis的特定版本的更新记录文档,主要涵盖从2021年至2022年的技术改进、修复和功能增强。Redis是一个开源、高性能的键值存储系统,常用于数据库、...
**Redis on Windows Release Notes** Redis 是一个开源的、基于键值对的数据存储系统,常用于数据库、缓存和消息中间件。它以其高性能、低延迟和丰富的数据结构而闻名。在Windows平台上部署Redis,可以为那些主要...
Redis on Windows是由MSOpenTech开发的,旨在提供一个在Windows操作系统上稳定、功能等效且性能相近于POSIX系统的Redis版本。在相同的硬件环境下,它实现了与POSIX版本几乎一致的运行性能。为了使Redis充分利用...
Redis on Windows是MSOpenTech开发的一个版本,旨在在Windows操作系统上提供与POSIX系统(如Linux)上功能相当且性能相近的Redis缓存服务。这个实现主要是为了满足那些希望在Windows环境中利用Redis强大功能的用户...
4. `Redis on Windows.docx`、`Windows Service Documentation.docx`、`Redis on Windows Release Notes.docx`:这些文档提供了关于如何在Windows上安装、配置和管理Redis服务的详细指南,包括版本的发行说明,以及...
4. `Redis on Windows.docx`、`Windows Service Documentation.docx`、`Redis on Windows Release Notes.docx`:这些文档提供了关于在Windows上安装、配置和管理Redis的详细信息,包括服务的创建、操作指南和版本...
而`Redis on Windows.docx`、`Windows Service Documentation.docx` 和 `Redis on Windows Release Notes.docx` 这些文档,分别提供了关于在Windows上安装和运行Redis的详细指南、服务相关的文档以及版本发布说明,...
由于 Redis 原生不支持 Windows 平台,但微软的开源技术团队(Microsoft Open Tech group)为 Windows 用户提供了移植版。在本文中,我们将深入探讨如何在 Windows 上安装和使用 Redis,以及相关的管理工具。 首先...
压缩包中的其他文档,如`Redis在windows下安装过程.docx`、`Redis on Windows.docx`、`Windows Service Documentation.docx`和`Redis on Windows Release Notes.docx`提供了更详细的安装指南、使用说明和更新记录,...
4. `Redis on Windows.docx`:这可能是一个文档,详细介绍了如何在Windows环境下安装和使用Redis,包括可能遇到的问题和解决方法。 5. `Redis on Windows Release Notes.docx`:这是关于Redis 2.8在Windows平台上...
"Redis on Windows.docx"很可能是一个详细的安装教程,指导用户如何在Windows环境中安装和配置Redis。"Windows Service Documentation.docx"可能包含了关于如何将Redis作为Windows服务进行安装和管理的信息。"Redis ...
安装 Redis on Windows: 1. 解压 "Windows-redis-2.2.1" 压缩包到你选择的目录。 2. 打开 "redis.windows-service.conf" 文件进行基本配置,如端口设置(默认为 6379)、日志文件路径等。 3. 可以通过 "redis-...
提供的文档如`Redis on Windows.docx`、`Windows Service Documentation.docx`和`Redis on Windows Release Notes.docx`包含了关于在Windows上安装、配置和使用Redis的详细指南,以及版本更新的详细信息。...
- "Redis on Windows Release Notes.docx":包含了 Redis for Windows 特定版本的发行说明,列出新功能、改进和已知问题。 5. **运行 Redis on Windows** - 要启动 Redis 服务,可以使用 "redis-server.exe" 并...
**安装与配置Redis on Windows:** 1. 解压下载的"redis-6.2.14-win-amd64"到指定目录。 2. 修改`redis.windows.conf`配置文件,根据需求调整参数,如默认端口6379、最大内存限制、是否启用保护模式等。 3. 启动...
4. `Redis on Windows.docx`和`Windows Service Documentation.docx` 这两个文档可能是关于如何在Windows系统上安装和管理Redis服务的指南,通常会包含如何将Redis注册为Windows服务、如何启动和停止服务以及故障...