2

We are using arangodb for a very small graph at the moment (60-100) nodes and we would like to limit the memory of the docker container to 1GB using mem_limit in the docker-compose.

Is it possible to configure arangodb to live within this limit?

We are having difficulty finding memory configuration documentation and have only so far come across https://www.arangodb.com/2016/03/put-arangodb-spartan-mode/.

1 Answer 1

3

you can pass any argument available to arangod to the arangod ran in a docker container like this:

docker run \
   -e ARANGO_RANDOM_ROOT_PASSWORD=1 \
   -e ARANGO_STORAGE_ENGINE=rocksdb \
   -p 8529:8529 \
   -d arangodb \
   \
   arangod \
     --log.file /var/log/arangodb3/arangod.log \
     --foxx.queues false \
     --rocksdb.block-cache-size 0 \
     --cache.size 0

and can use that to control all available arangodb parameters. To use less memory you probably would want to use the rocksdb storage engine.

You may want to configure the rocksdb engine, like disabling caches to reduce the memory footprint with lesser performance. You can also disable the cache that is also used to improve graph traversal performance.

However, there is no way to limit ArangoDB to a certain amount of memory, and by putting a limit on it from the outside you will probably sacrifice stability by it not being able to allocate memory and fail with OOM-errors.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. Coming from a Java world I am used to configuring the heap size so I am not used to C++ based applications like arango. If you could help improve my understanding I would really appreciate. Taking docker out of the equation, if arango was on a machine with 4GB will it die if arango pulls in too much data or does that trigger some kind of memory management when it reaches near the 4GB? The main fear is that using mem_limit will hide the memory restriction from arango and it won't know that it is about to die. thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.