From 422c0e15d323178eb1ac0a792fc1fdd539356960 Mon Sep 17 00:00:00 2001 From: imilinovic Date: Mon, 29 Sep 2025 15:01:10 +0200 Subject: [PATCH 1/3] vm.max_map_count info --- .../system-configuration.mdx | 5 ++++ .../memgraph-in-high-throughput-workloads.mdx | 26 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/pages/database-management/system-configuration.mdx b/pages/database-management/system-configuration.mdx index ec7fbeaae..5c1928a36 100644 --- a/pages/database-management/system-configuration.mdx +++ b/pages/database-management/system-configuration.mdx @@ -56,6 +56,11 @@ For optimal system performance, the `vm.max_map_count` value should be chosen in accordance with your system's RAM, aiming for approximately one memory map area per 128 KB of system memory. + +The recommended values below are starting points and may need to be increased depending on your workload. +If you encounter `munmap` errors or crashes due to `bad_alloc` errors, you should try increasing the `vm.max_map_count` value beyond the recommended amount. + + | Amount of RAM | `vm.max_map_count` value | |---------------|-------------------------| | 8GB - 32GB | `vm.max_map_count=262144`| diff --git a/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx b/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx index 50a941b65..410d97de4 100644 --- a/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx +++ b/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx @@ -74,6 +74,9 @@ The suggestions for high-throughput workloads **complement** several key section [general suggestions guide](/memgraph-in-production/general-suggestions). These sections offer important context and additional best practices tailored for performance, stability, and scalability in high-throughput systems: +- [Hardware configuration](#hardware-configuration)
+ Critical system settings for high-throughput workloads, including `vm.max_map_count` configuration. + - [Choosing the right Memgraph flag set](#choosing-the-right-memgraph-flag-set)
Memgraph offers specific flags to optimize streaming graph updates. @@ -90,6 +93,29 @@ additional best practices tailored for performance, stability, and scalability i - [Queries that best suit your workload](#queries-that-best-suit-your-workload) Learn how to optimize update queries coming at the database. +## Hardware configuration + +High-throughput workloads place significant demands on system resources, making proper hardware configuration essential for stable and performant operations. + +### Memory map configuration + +One of the most critical system settings for high-throughput workloads is configuring the kernel parameter `vm.max_map_count`. +This setting ensures that the system can allocate enough virtual memory areas, which is essential for avoiding memory-related issues. + + +The standard recommended values for `vm.max_map_count` may be insufficient for high-throughput operations. +If you encounter `munmap` errors or crashes due to `bad_alloc` errors, you should try increasing the `vm.max_map_count` value beyond the recommended amount. + + +You can find detailed setup instructions and recommended values in our +[system configuration documentation](/database-management/system-configuration#recommended-values-for-the-vmmax_map_count-parameter). + +If you're deploying Memgraph on Kubernetes, our Helm charts include an **init container** that automatically sets `vm.max_map_count` +during startup. However, this container requires **root privileges** to execute. If you're running in a restricted environment +or prefer not to use privileged containers, you'll need to **manually configure** this parameter on the host machine. + +Properly configuring `vm.max_map_count` is a one-time setup but essential for a stable and performant high-throughput Memgraph deployment. + ## Choosing the right Memgraph flag set When streaming data from systems like Kafka, the incoming payload is often **standardized**, From 5ecfed6efe6f18b18b93db5e538aee2d2427cb47 Mon Sep 17 00:00:00 2001 From: imilinovic Date: Mon, 29 Sep 2025 15:24:07 +0200 Subject: [PATCH 2/3] remove unnecessary words --- .../workloads/memgraph-in-high-throughput-workloads.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx b/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx index 410d97de4..0dd9d1767 100644 --- a/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx +++ b/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx @@ -114,8 +114,6 @@ If you're deploying Memgraph on Kubernetes, our Helm charts include an **init co during startup. However, this container requires **root privileges** to execute. If you're running in a restricted environment or prefer not to use privileged containers, you'll need to **manually configure** this parameter on the host machine. -Properly configuring `vm.max_map_count` is a one-time setup but essential for a stable and performant high-throughput Memgraph deployment. - ## Choosing the right Memgraph flag set When streaming data from systems like Kafka, the incoming payload is often **standardized**, From 8b42d2819a275fa882766982bfb50b7ef829ebb1 Mon Sep 17 00:00:00 2001 From: imilinovic Date: Mon, 29 Sep 2025 19:48:14 +0200 Subject: [PATCH 3/3] PR changes --- .../workloads/memgraph-in-high-throughput-workloads.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx b/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx index 0dd9d1767..46f5ba1d4 100644 --- a/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx +++ b/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx @@ -97,8 +97,6 @@ additional best practices tailored for performance, stability, and scalability i High-throughput workloads place significant demands on system resources, making proper hardware configuration essential for stable and performant operations. -### Memory map configuration - One of the most critical system settings for high-throughput workloads is configuring the kernel parameter `vm.max_map_count`. This setting ensures that the system can allocate enough virtual memory areas, which is essential for avoiding memory-related issues.