From 21d96d0fd2d7927b2aefe0514ad6cc156a669f11 Mon Sep 17 00:00:00 2001 From: David Edler Date: Mon, 16 Oct 2023 11:01:05 +0200 Subject: [PATCH] add max map count setting for linux to the admin tips --- docs/management/admin.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/management/admin.md b/docs/management/admin.md index 8d31b9a14d..9ba5abf6a1 100644 --- a/docs/management/admin.md +++ b/docs/management/admin.md @@ -21,6 +21,8 @@ aliases: [ * To ensure the Linux kernel feature Transparent Huge Pages does not impact Redis memory usage and latency, run the command: `echo never > /sys/kernel/mm/transparent_hugepage/enabled` to disable it. See [Latency Diagnosis - Latency induced by transparent huge pages](https://redis.io/docs/management/optimization/latency/#latency-induced-by-transparent-huge-pages) for additional context. +* The default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions Add `vm.max_map_count = 262144` to `/etc/sysctl.conf`. Then, reboot or run the command `sysctl vm.max_map_count=262144` to activate the setting. + ### Memory * Ensured that swap is enabled and that your swap file size is equal to amount of memory on your system. If Linux does not have swap set up, and your Redis instance accidentally consumes too much memory, Redis can crash when it is out of memory, or the Linux kernel OOM killer can kill the Redis process. When swapping is enabled, you can detect latency spikes and act on them.