ArangoDB

Administrating ArangoDB



Mostly Memory/Durability

Database documents are stored in memory-mapped files. Per default, these memory-mapped files are synced regularly but not instantly. This is often a good tradeoff between storage performance and durability. If this level of durabiity is too low for an application, the server can also sync all modifications to disk instantly. This will give full durability but will come with a performance penalty as each data modification will trigger a sync I/O operation.

AppendOnly/MVCC

Instead of overwriting existing documents, a completely new version of the document is generated. The two benefits are:

  • Objects can be stored coherently and compactly in the main memory.
  • Objects are preserved-isolated writing and reading transactions allow accessing these objects for parallel operations.

The system collects obsolete versions as garbage, recognizing them as forsaken. Garbage collection is asynchronous and runs parallel to other processes.

Configuration

Global Configuration

There are certain default values, which you can store in the configuration file or supply on the command line.


--database.maximal-journal-size size
Maximal size of journal in bytes. Can be overwritten when creating a new collection. Note that this also limits the maximal size of a single document.

The default is 32MB.


--database.force-sync-shapes boolean
Force syncing of shape data to disk when writing shape information. If turned off, syncing will still happen for shapes of collections that have a waitForSync value of true. If turned on, syncing of shape data will always happen, regards of the value of waitForSync.

The default is true.

Per Collection Configuration

You can configure the durability behavior on a per collection basis. Use the ArangoDB shell to change these properties.


collection.properties()
Returns an object containing all collection properties.

  • waitForSync: If true creating a document will only return after the data was synced to disk.
  • journalSize : The size of the journal in bytes.

collection.properties(properties)
Changes the collection properties. properties must be a object with one or more of the following attribute(s):

  • waitForSync: If true creating a document will only return after the data was synced to disk.
  • journalSize : The size of the journal in bytes.

Note that it is not possible to change the journal size after the journal or datafile has been created. Changing this parameter will only effect newly created journals. Also note that you cannot lower the journal size to less then size of the largest document already stored in the collection.

Examples

Read all properties

arango> db.examples.properties()
{ "waitForSync" : false, "journalSize" : 33554432 }

Change a property

arango> db.examples.properties({ waitForSync : false })
{ "waitForSync" : false, "journalSize" : 33554432 }