Skip to content

Commit e7b5cbf

Browse files
authored
Merge pull request #1721 from Simran-B/patch-1
[ArangoDB] Add section about Limiting resource utilization
2 parents ef56dcb + a75fae1 commit e7b5cbf

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

arangodb/content.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,29 @@ unix> docker exec -it jolly_joker arangosh
126126

127127
See more information about [Configuration](https://www.arangodb.com/docs/stable/administration-configuration.html)
128128

129+
### Limiting resource utilization
130+
131+
`arangod` checks the following environment variables, which can be used to restrict how much memory and how many CPU cores it should use:
132+
133+
- `ARANGODB_OVERRIDE_DETECTED_TOTAL_MEMORY` *(introduced in v3.6.3)*
134+
135+
This variable can be used to override the automatic detection of the total amount of RAM present on the system. One can specify a decimal number (in bytes). Furthermore, if `G` or `g` is appended, the value is multiplied by `2^30`. If `M` or `m` is appended, the value is multiplied by `2^20`. If `K` or `k` is appended, the value is multiplied by `2^10`. That is, `64G` means 64 gigabytes.
136+
137+
The total amount of RAM detected is logged as an INFO message at server start. If the variable is set, the overridden value is shown. Various default sizes are calculated based on this value (e.g. RocksDB buffer cache size).
138+
139+
Setting this option can in particular be useful in two cases:
140+
141+
1. If `arangod` is running in a container and its cgroup has a RAM limitation, then one should specify this limitation in this environment variable, since it is currently not automatically detected.
142+
2. If `arangod` is running alongside other services on the same machine and thus sharing the RAM with them, one should limit the amount of memory using this environment variable.
143+
144+
- `ARANGODB_OVERRIDE_DETECTED_NUMBER_OF_CORES` *(introduced in v3.7.1)*
145+
146+
This variable can be used to override the automatic detection of the number of CPU cores present on the system.
147+
148+
The number of CPU cores detected is logged as an INFO message at server start. If the variable is set, the overridden value is shown. Various default values for threading are calculated based on this value.
149+
150+
Setting this option is useful if `arangod` is running in a container or alongside other services on the same machine and shall not use all available CPUs.
151+
129152
## Persistent Data
130153

131154
ArangoDB supports two different storage engines as of ArangoDB 3.2. You can choose them while instantiating the container with the environment variable `ARANGO_STORAGE_ENGINE`. With `mmfiles` you choose the classic storage engine, `rocksdb` will choose the newly introduced storage engine based on [RocksDB](http://rocksdb.org/). The default choice is `mmfiles`.

0 commit comments

Comments
 (0)