Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pages/database-management/system-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Callout type="warning">
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.
</Callout>

| Amount of RAM | `vm.max_map_count` value |
|---------------|-------------------------|
| 8GB - 32GB | `vm.max_map_count=262144`|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) <br />
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) <br />
Memgraph offers specific flags to optimize streaming graph updates.

Expand All @@ -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.

<Callout type="warning">
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.
</Callout>

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**,
Expand Down