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

Hide execution results