Technical Alert #3: Set Linux variable overcommit_memory to 0 or 1 - ArangoDB

Sign up for ArangoGraph Insights Platform

Before signing up, please accept our terms & conditions and privacy policy.

What to expect after you signup
You can try out ArangoDB Cloud FREE for 14 days. No credit card required and you are not obligated to keep using ArangoDB Cloud.

At the end of your free trial, enter your credit card details to continue using ArangoDB Cloud.

If you decide that ArangoDB Cloud is not (yet) for you, you can simply leave and come back later.

Technical Alert #3: Set Linux variable overcommit_memory to 0 or 1

Technical Alert #3: Set Linux variable overcommit_memory to 0 or 1

This is a Technical Alert to inform all Users and Customers running ArangoDB on Linux that the new recommended kernel setting for overcommit_memory for both MMFiles and RocksDB storage engine is 0 or 1. The kernel default is 0.

Issue Description

Previously we were recommending to set overcommit_memory to 2 when using the RocksDB storage engine. We are now recommending to set 0 or 1, regardless of the storage engine in use.

When overcommit_memory is set to 2, the server might run into problems as the number of memory mappings will keep growing.

To not incur in possible memory issues, it is extremely important that the overcommit_memory setting is set to 0 or 1 and not to 2.

Issue Resolution

overcommit_memory can be set dynamically on Linux without the need of restarting the operation system. You can set it as follows, before executing arangod:

sudo bash -c "echo 0 >/proc/sys/vm/overcommit_memory"

Please make sure that the change above is permanent to a system reboot (e.g. use a script that sets it and ask the operating system to execute this script every time it starts).

Important Additional Information

Prior to ArangoDB v. 3.2.18, 3.3.20 or 3.4.0-RC.5 the ArangoDB log file was including a warning to set overcommit_memory to 2, when using the RocksDB storage engine. Starting from versions 3.2.18, 3.3.20 and 3.4.0-RC.5 such warning is not written anymore in the log.

Important: the recommendation of this Technical Alert (to not set overcommit_memory to 2) remains valid even if you are using an old ArangoDB version that prints that wrong warning in the log file.

Additional Questions

In case of any questions, please contact us. ArangoDB Customers can open a support ticket in our Support Platform.