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..46f5ba1d4 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,25 @@ 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. + +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. + ## Choosing the right Memgraph flag set When streaming data from systems like Kafka, the incoming payload is often **standardized**,