Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much memory space does an ArangoDB index need?

Tags:

arangodb

I'd like to calculate our server requirements for ArangoDB.

I know that ArangoDB stores the indexes in RAM, but how much space do indexes use?

like image 355
Lenny Avatar asked Sep 03 '25 17:09

Lenny


1 Answers

That depend on the kind of index you use.

You can use "figures" to see how many memory is needed:

arangosh [_system]> db.test.ensureSkiplist("attribute1")
arangosh [_system]> db.test.ensureFulltextIndex("attribute2");
arangosh [_system]> db._query("FOR i IN 1 .. 1000 INSERT { 'attribute1': i, 'attribute2': 'Text' } INTO test");
arangosh [_system]> db.test.figures()
...
  "indexes" : { 
    "count" : 3, 
    "size" : 77376 
  }, 

Is the total amount needed for all indexes. There is always the primary index.

For a hash index the memory consumption is roughly:

4 * n * sizeof(void*)

where n is the number of documents.

like image 81
fceller Avatar answered Sep 07 '25 20:09

fceller