Investigating high memory usage

374 views
Skip to first unread message

Thomas Weiss

unread,
Apr 27, 2017, 6:02:11 AM4/27/17
to ArangoDB
Hi everyone,

I would like to get your comments concerning the very high memory usage I'm seeing on my production server.
Some numbers:
- Running Ubuntu 16.04 and ArangoDB 3.1.15
- 5 document collections, 12 edge collections
- Around 200,000 documents
- A dump takes approximately 50MB of disk space
- A rather heavy usage of Foxx

Now this take 1.5GB of memory on that Linux server. I've always been a bit surprised by the memory consumption but at the beginning I thought that ArangoDB required a lot of RAM to run and that was a fixed overhead that would not grow with the data, but I was wrong: it seems that the memory consumption increases linearly with the amount of data. Also for reference, I've a secondary DB (same VM config) that replicates the primary asynchronously and this one consumes more than 1GB as well.

So today I did the following experiment: I dumped the database and restored it on my Mac. I made sure all collections are loaded and had a look at the memory: only 200MB and it even fell to 50MB for some reason. This makes me think that there could be something wrong with the way I run ArangoDB on Ubuntu or with the system config?

Any comment would be welcome, if you'd like to get the dump to test it on your side I would be happy to share it.

Thanks in advance,
Thomas

Thomas Weiss

unread,
May 1, 2017, 10:23:28 PM5/1/17
to ArangoDB
As a follow-up to my previous message, I was looking at another ArangoDB instance I'm running (this one in staging, the previous one I mentioned was in production) and I noticed that the memory consumption was slowly but steadily growing over the week-end even though nobody was using the DB!
I logged on the VM and did a /etc/init.d/arangodb3 status, which reported around 1GB of memory used. Then I rebooted the VM and noticed a significantly drop in memory usage, and after all collections were loaded again, it stabilized at around 700MB, so I gained 30% by restarting the instance (but again, steadily growing since then although no one uses the DB).

Wilfried Gösgens

unread,
May 2, 2017, 4:28:26 AM5/2/17
to ArangoDB
Hi,
can you try to disable the server statistics as described here:

https://docs.arangodb.com/3.1/Manual/Administration/Configuration/GeneralArangod.html#toggling-server-statistics

(this will remove the graphs you see in the webinterface)

--server.statistics false


If you don't use foxx queues, you can also disable them:
--foxx.queues false

You should then see that this behaviour stops.

Cheers,
Willi

Since

Thomas Weiss

unread,
May 6, 2017, 12:17:23 AM5/6/17
to ArangoDB
Hi Wilfried,

Thanks a lot for those hints. I've disabled the server statistics on one instance and I'm watching the evolution of the memory increase.

Besides that, would there be any reason why the same dataset would consume 10x more memory on Ubuntu compared to Mac OS?

Cheers,
Thomas
Reply all
Reply to author
Forward
0 new messages