Configuration

The programs and tools shipped in anArangoDB package can be configured with various startup options.

arangosh —server.database myDB

server.database = myDB

  • There are also flags which are for command line usage only,such as ‑‑help and ‑‑version. They don’t take any valuein contrast to options.

Find the available options and flags in the Options sub-chapters of therespective Programs & Tools sub-chapter, like theArangoDB Server Options.

The ArangoDB Starter works differentlyto the other programs and tools. It uses setup.json files for its ownconfigurationand has a fluent command line interface to execute certain actions.If you deploy ArangoDB with the Starter, then custom arangod.conf filesare generated by this tool and are used instead of the default configuration.

Command line options

Command line options can be supplied in the style ‑‑option value with twodashes (also known as hyphen minus), the name of the option, a space asseparator and the value. You may also use an equals sign = as separatorlike ‑‑option=value.

The value can be surrounded with double quote marks " like‑‑option="value". This is mandatory if the value contains spaces,but it is optional otherwise.

Some binaries accept one unnamed argument, which means you can take ashortcut and leave out the ‑‑option part and supply the value directly.It does not matter if you supply it as first or last argument, or betweenany of the named arguments. For arangod it is the ‑‑database.directoryoption. The following commands are identical:

  1. arangod my_data_dir
  2. arangod "my_data_dir"
  3. arangod --database.directory my_data_dir
  4. arangod --database.directory=my_data_dir
  5. arangod --database.directory "my_data_dir"
  6. arangod --database.directory="my_data_dir"

Many options belong to a section as in ‑‑section.param, e.g.‑‑server.database, but there can also be options without any section.These options are referred to as global options.

To list available options, you can run a binary with the ‑‑help flag:

  1. arangosh --help

To list the options of a certain section only, use ‑‑help‑{section}like ‑‑help‑server. To list all options including hidden ones use‑‑help‑..

Configuration file format

.conf files for ArangoDB binaries are in a simple key-value pair format.Each option is specified on a separate line in the form:

  1. key = value

It may look like this:

  1. server.endpoint = tcp://127.0.0.1:8529
  2. server.authentication = true

Alternatively, a header section can be specified and options pertaining tothat section can be specified in a shorter form:

  1. [server]
  2. endpoint = tcp://127.0.0.1:8529
  3. authentication = true

So you see, a command line option ‑‑section.param value can be easilytranslated to an option in a configuration file:

  1. [section]
  2. param = value

Whitespace around = is ignored in configuration files.This includes whitespace around equality signs in the parameter value:

  1. log.level = startup = trace

It is the same as without whitespace:

  1. log.level=startup=trace

Comments can be placed in the configuration file by placing one or morehash symbols # at the beginning of a line. Comments that are placed inother places (i.e. not at the beginning of a line) are unsupported and should be avoided to ensure correct parsing of the startup options as intended.

Only command line options with a value should be set within the configurationfile. Command line options which act as flags should only be entered on thecommand line when starting the server.

Using Configuration Files

For each binary (except arangodb, which is the Starter) there is acorresponding .conf file that an ArangoDB package ships with.arangosh.conf contains the default ArangoShell configuration for instance.The configuration files can be adjusted or new ones be created.

To load a particular configuration file, there is a ‑‑configuration optionavailable to let you specify a path to a .conf file. If you want tocompletely ignore a configuration file (likely the default one) withoutnecessarily deleting the file, then add the command line option

  1. -c none

or

  1. --configuration none

The value none is case-insensitive.

Suffixes for Numeric Options

It is possible to add suffixes to numeric options that will cause ArangoDB tomultiply the value by a certain factor. This can be used to conveniently specifyvalues in megabytes or gigabytes for example.

SuffixFactorExample
kib, KiB1024512KiB
mib, MiB1024 ^ 264mib
gib, GiB1024 ^ 33gib
k, K, kb, KB10003k
m, M, mb, MB1000 ^ 23mb
g, G, gb, GB1000 ^ 33GB
%0.015%

Suffix could be used like this in a configuration file:

  1. [rocksdb]
  2. write-buffer-size=512KiB
  3. block-cache-size=512MiB
  4. total-write-buffer-size=2GiB
  5. max-bytes-for-level-multiplier=1K
  6. [cache]
  7. size=2G

Environment variables as parameters

If you want to use an environment variable in a value of a startup option,write the name of the variable wrapped in at signs @. It acts as aplaceholder. It can be combined with fixed strings for instance.

Command line example:

  1. arangod --temp.path @TEMP@/arango_tmp

In a configuration file:

  1. [temp]
  2. path = @TEMP@/arango_tmp

On a Windows system, above setting would typically make the ArangoDB Servercreate its folder for temporary files in %USERPROFILE%\AppData\Local\Temp,i.e. C:\Users\xxx\AppData\Local\Temp\arango_tmp.

Options with multiple values

Certain startup options accept multiple values. In case of parameters beingvectors you can specify one or more times the option with varying values.Whether this is the case can be seen by looking at the Type column of atool’s option table (e.g. ArangoDB Server Options)or the type information provided on a command line in the —help output ofan ArangoDB binary:

  1. --log.level <string...> the global or topic-specific log level

Vectors can be identified by the three dots at the end of the data typeinformation (in angled brackets). For log.level you can set one or morestrings for different log levels for example. Simply repeat the option todo so. On a command line:

  1. arangod --log.level warning --log.level queries=trace --log.level startup=info

This sets a global log level of warning and two topic-specific levels(trace for queries and info for startup). The same in a configuration file:

  1. [log]
  2. level = warning
  3. level = queries=trace
  4. level = startup=info

Configuration precedence

There are built-in defaults, with which all configuration variables are firstinitialized. They can be overridden by configuration files and command lineoptions (in this order). Only a fraction of all available options are set inthe configuration files that ArangoDB ships with. Many options will thereforefall back to the built-in defaults unless they are overridden by the user.

It is common to use modified configuration files together with startupoptions on a command line to override specific settings. Command line optionstake precedence over values set in a configuration file.

If the same option is set multiple times, but only supports a single value,then the last occurrence of the option will become the final value.For example, if you edit arangosh.conf to set:

  1. server.database = myDB1
  2. server.database = myDB2

… and start ArangoShell like:

  1. arangosh --server.database myDB3 --server.database myDB4

… then the database it will connect to is myDB4, because this startup optiontakes a single value only (i.e. it is not a vector), the built-in defaultis _system but the configuration file overrules the setting. It gets set tomyDB1 temporarily before it is replaced by myDB2, which in turn getsoverridden by the command line options twice, first to myDB3 and then thefinal value myDB4.

Change configuration at runtime

In general, supplied startup options can not be changed nor can configurationfiles be reloaded once an executable is started, other than by restarting theexecutable with different options. However, some of the startup optionsdefine default values which can be overridden on a per-query basis forinstance, or adjusted at runtime via an API call. Examples:

Fetch Current Configuration Options

To list the configuration options of a running arangod instance, you canconnect with an ArangoShell and invoke aTransaction by calling db._executeTransaction()and providing a JavaScript function to retrieve the server options:

  1. arangosh> db._executeTransaction({ collections: {}, action: function() {return require("internal").options(); } })

Show execution results

  1. {
  2. "check-configuration" : false,
  3. "config" : "none",
  4. "configuration" : "none",
  5. "console" : false,
  6. "daemon" : false,
  7. "default-language" : "en_US",
  8. "define" : [ ],
  9. "dump-dependencies" : false,
  10. "dump-options" : false,
  11. "fortune" : false,
  12. "gid" : "",
  13. "hund" : false,
  14. "log" : [
  15. "info"
  16. ],
  17. "pid-file" : "",
  18. "supervisor" : false,
  19. "uid" : "",
  20. "version" : false,
  21. "working-directory" : "/var/tmp",
  22. "agency.activate" : false,
  23. "agency.compaction-keep-size" : 50000,
  24. "agency.compaction-step-size" : 1000,
  25. "agency.disaster-recovery-id" : "",
  26. "agency.election-timeout-max" : 5,
  27. "agency.election-timeout-min" : 1,
  28. "agency.endpoint" : [ ],
  29. "agency.max-append-size" : 250,
  30. "agency.my-address" : "",
  31. "agency.pool-size" : 1,
  32. "agency.size" : 1,
  33. "agency.supervision" : false,
  34. "agency.supervision-frequency" : 1,
  35. "agency.supervision-grace-period" : 10,
  36. "agency.wait-for-sync" : true,
  37. "arangosearch.threads" : 0,
  38. "arangosearch.threads-limit" : 0,
  39. "audit.hostname" : "",
  40. "audit.output" : [ ],
  41. "cache.rebalancing-interval" : 2000000,
  42. "cache.size" : 16341590016,
  43. "cluster.agency-endpoint" : [ ],
  44. "cluster.agency-prefix" : "",
  45. "cluster.create-waits-for-sync-replication" : true,
  46. "cluster.index-create-timeout" : 3600,
  47. "cluster.my-address" : "",
  48. "cluster.my-advertised-endpoint" : "",
  49. "cluster.my-role" : "",
  50. "cluster.require-persisted-id" : false,
  51. "cluster.resign-leadership-on-shutdown" : false,
  52. "cluster.synchronous-replication-timeout-factor" : 1,
  53. "cluster.synchronous-replication-timeout-minimum" : 30,
  54. "cluster.synchronous-replication-timeout-per-4k" : 0.1,
  55. "cluster.system-replication-factor" : 2,
  56. "compaction.db-sleep-time" : 1,
  57. "compaction.dead-documents-threshold" : 16384,
  58. "compaction.dead-size-percent-threshold" : 0.1,
  59. "compaction.dead-size-threshold" : 131072,
  60. "compaction.max-file-size-factor" : 3,
  61. "compaction.max-files" : 3,
  62. "compaction.max-result-file-size" : 134217728,
  63. "compaction.min-interval" : 10,
  64. "compaction.min-small-data-file-size" : 131072,
  65. "database.auto-upgrade" : false,
  66. "database.check-version" : false,
  67. "database.directory" : "/tmp/arangosh_eIJLPK/tmp-67-564247407/rocksdb/data",
  68. "database.force-sync-properties" : true,
  69. "database.ignore-datafile-errors" : false,
  70. "database.init-database" : false,
  71. "database.maximal-journal-size" : 33554432,
  72. "database.required-directory-state" : "any",
  73. "database.restore-admin" : false,
  74. "database.throw-collection-not-loaded-error" : false,
  75. "database.upgrade-check" : true,
  76. "database.wait-for-sync" : false,
  77. "foxx.api" : true,
  78. "foxx.queues" : true,
  79. "foxx.queues-poll-interval" : 1,
  80. "foxx.store" : true,
  81. "frontend.proxy-request-check" : true,
  82. "frontend.trusted-proxy" : [ ],
  83. "frontend.version-check" : true,
  84. "http.allow-method-override" : false,
  85. "http.hide-product-header" : false,
  86. "http.keep-alive-timeout" : 300,
  87. "http.trusted-origin" : [ ],
  88. "javascript.allow-admin-execute" : false,
  89. "javascript.app-path" : "/tmp/arangosh_eIJLPK/tmp-67-564247407/rocksdb/apps",
  90. "javascript.copy-installation" : false,
  91. "javascript.enabled" : true,
  92. "javascript.gc-frequency" : 60,
  93. "javascript.gc-interval" : 2000,
  94. "javascript.module-directory" : [
  95. "/work/ArangoDB/enterprise/js"
  96. ],
  97. "javascript.script" : [ ],
  98. "javascript.script-parameter" : [ ],
  99. "javascript.startup-directory" : "/work/ArangoDB/js",
  100. "javascript.v8-contexts" : 64,
  101. "javascript.v8-contexts-max-age" : 60,
  102. "javascript.v8-contexts-max-invocations" : 0,
  103. "javascript.v8-contexts-minimum" : 1,
  104. "javascript.v8-max-heap" : 3072,
  105. "javascript.v8-options" : [ ],
  106. "ldap.async-connect" : false,
  107. "ldap.basedn" : "",
  108. "ldap.binddn" : "",
  109. "ldap.debug" : false,
  110. "ldap.enabled" : false,
  111. "ldap.network-timeout" : 0,
  112. "ldap.port" : 389,
  113. "ldap.prefix" : "",
  114. "ldap.referrals" : false,
  115. "ldap.refresh-rate" : 300,
  116. "ldap.restart" : false,
  117. "ldap.retries" : 1,
  118. "ldap.roles-attribute-name" : "",
  119. "ldap.roles-exclude" : "",
  120. "ldap.roles-include" : "",
  121. "ldap.roles-search" : "",
  122. "ldap.roles-transformation" : [ ],
  123. "ldap.search-attribute" : "uid",
  124. "ldap.search-filter" : "objectClass=*",
  125. "ldap.search-scope" : "sub",
  126. "ldap.serialize-timeout" : 5,
  127. "ldap.serialized" : false,
  128. "ldap.server" : "",
  129. "ldap.suffix" : "",
  130. "ldap.superuser-role" : "",
  131. "ldap.timeout" : 0,
  132. "ldap.tls" : false,
  133. "ldap.tls-cacert-dir" : "",
  134. "ldap.tls-cacert-file" : "",
  135. "ldap.tls-cert-check-strategy" : "hard",
  136. "ldap.tls-version" : "1.2",
  137. "ldap.url" : "",
  138. "log.color" : true,
  139. "log.escape" : true,
  140. "log.file" : "/tmp/arangosh_eIJLPK/tmp-67-564247407/rocksdb/log",
  141. "log.file-group" : "",
  142. "log.file-mode" : "",
  143. "log.force-direct" : false,
  144. "log.foreground-tty" : false,
  145. "log.keep-logrotate" : false,
  146. "log.level" : [
  147. "info"
  148. ],
  149. "log.line-number" : false,
  150. "log.output" : [
  151. "file:///tmp/arangosh_eIJLPK/tmp-67-564247407/rocksdb/log"
  152. ],
  153. "log.performance" : false,
  154. "log.prefix" : "",
  155. "log.request-parameters" : true,
  156. "log.role" : false,
  157. "log.shorten-filenames" : true,
  158. "log.thread" : false,
  159. "log.thread-name" : false,
  160. "log.use-local-time" : false,
  161. "log.use-microtime" : false,
  162. "nonce.size" : 4194304,
  163. "query.cache-entries" : 128,
  164. "query.cache-entries-max-size" : 268435456,
  165. "query.cache-entry-max-size" : 16777216,
  166. "query.cache-include-system-collections" : false,
  167. "query.cache-mode" : "off",
  168. "query.fail-on-warning" : false,
  169. "query.memory-limit" : 0,
  170. "query.optimizer-max-plans" : 128,
  171. "query.registry-ttl" : 600,
  172. "query.slow-streaming-threshold" : 10,
  173. "query.slow-threshold" : 10,
  174. "query.smart-joins" : false,
  175. "query.tracking" : true,
  176. "query.tracking-with-bindvars" : true,
  177. "random.generator" : 1,
  178. "replication.active-failover" : false,
  179. "replication.auto-start" : true,
  180. "replication.automatic-failover" : false,
  181. "rocksdb.allow-fallocate" : true,
  182. "rocksdb.block-align-data-blocks" : false,
  183. "rocksdb.block-cache-shard-bits" : -1,
  184. "rocksdb.block-cache-size" : 19609908019,
  185. "rocksdb.compaction-read-ahead-size" : 2097152,
  186. "rocksdb.debug-logging" : false,
  187. "rocksdb.delayed_write_rate" : 0,
  188. "rocksdb.dynamic-level-bytes" : true,
  189. "rocksdb.enable-pipelined-write" : false,
  190. "rocksdb.enable-statistics" : false,
  191. "rocksdb.encryption-key-generator" : "",
  192. "rocksdb.encryption-keyfile" : "",
  193. "rocksdb.enforce-block-cache-size-limit" : false,
  194. "rocksdb.intermediate-commit-count" : 1000000,
  195. "rocksdb.intermediate-commit-size" : 536870912,
  196. "rocksdb.level0-compaction-trigger" : 2,
  197. "rocksdb.level0-slowdown-trigger" : 20,
  198. "rocksdb.level0-stop-trigger" : 36,
  199. "rocksdb.limit-open-files-at-startup" : false,
  200. "rocksdb.max-background-jobs" : 8,
  201. "rocksdb.max-bytes-for-level-base" : 268435456,
  202. "rocksdb.max-bytes-for-level-multiplier" : 10,
  203. "rocksdb.max-subcompactions" : 0,
  204. "rocksdb.max-total-wal-size" : 83886080,
  205. "rocksdb.max-transaction-size" : 18446744073709552000,
  206. "rocksdb.max-write-buffer-number" : 9,
  207. "rocksdb.min-write-buffer-number-to-merge" : 1,
  208. "rocksdb.num-levels" : 7,
  209. "rocksdb.num-threads-priority-high" : 4,
  210. "rocksdb.num-threads-priority-low" : 4,
  211. "rocksdb.num-uncompressed-levels" : 2,
  212. "rocksdb.optimize-filters-for-hits" : false,
  213. "rocksdb.recycle-log-file-num" : 0,
  214. "rocksdb.sync-interval" : 100,
  215. "rocksdb.table-block-size" : 16384,
  216. "rocksdb.throttle" : true,
  217. "rocksdb.total-write-buffer-size" : 26146544025,
  218. "rocksdb.transaction-lock-timeout" : 1000,
  219. "rocksdb.use-direct-io-for-flush-and-compaction" : false,
  220. "rocksdb.use-direct-reads" : false,
  221. "rocksdb.use-file-logging" : false,
  222. "rocksdb.use-fsync" : false,
  223. "rocksdb.wal-archive-size-limit" : 0,
  224. "rocksdb.wal-directory" : "",
  225. "rocksdb.wal-file-timeout" : 10,
  226. "rocksdb.wal-file-timeout-initial" : 180,
  227. "rocksdb.wal-recovery-skip-corrupted" : false,
  228. "rocksdb.write-buffer-size" : 67108864,
  229. "server.allow-use-database" : false,
  230. "server.authentication" : false,
  231. "server.authentication-system-only" : true,
  232. "server.authentication-timeout" : 0,
  233. "server.authentication-unix-sockets" : true,
  234. "server.check-max-memory-mappings" : true,
  235. "server.descriptors-minimum" : 0,
  236. "server.endpoint" : [
  237. "tcp://127.0.0.1:37891"
  238. ],
  239. "server.flush-interval" : 1000000,
  240. "server.gid" : "",
  241. "server.jwt-secret-keyfile" : "",
  242. "server.local-authentication" : true,
  243. "server.maintenance-actions-block" : 2,
  244. "server.maintenance-actions-linger" : 3600,
  245. "server.maintenance-threads" : 9,
  246. "server.maximal-queue-size" : 4096,
  247. "server.maximal-threads" : 64,
  248. "server.minimal-threads" : 2,
  249. "server.prio1-size" : 1048576,
  250. "server.rest-server" : true,
  251. "server.scheduler-queue-size" : 128,
  252. "server.statistics" : true,
  253. "server.storage-engine" : "rocksdb",
  254. "server.uid" : "",
  255. "ssl.cafile" : "",
  256. "ssl.cipher-list" : "HIGH:!EXPORT:!aNULL@STRENGTH",
  257. "ssl.ecdh-curve" : "prime256v1",
  258. "ssl.keyfile" : "",
  259. "ssl.options" : 2147485780,
  260. "ssl.protocol" : 5,
  261. "ssl.require-peer-certificate" : false,
  262. "ssl.session-cache" : false,
  263. "tcp.backlog-size" : 64,
  264. "tcp.reuse-address" : true,
  265. "temp.path" : "",
  266. "vst.maxsize" : 30720,
  267. "wal.allow-oversize-entries" : true,
  268. "wal.directory" : "",
  269. "wal.flush-timeout" : 15000,
  270. "wal.historic-logfiles" : 10,
  271. "wal.ignore-logfile-errors" : false,
  272. "wal.ignore-recovery-errors" : false,
  273. "wal.logfile-size" : 33554432,
  274. "wal.open-logfiles" : 0,
  275. "wal.reserve-logfiles" : 3,
  276. "wal.slots" : 1048576,
  277. "wal.sync-interval" : 100000,
  278. "wal.throttle-wait" : 15000,
  279. "wal.throttle-when-pending" : 0,
  280. "wal.use-mlock" : false
  281. }

Hide execution results