RavenDB holds onto almost all of the memory available on server.

47 views
Skip to first unread message

Kashyap Shah

unread,
Jul 7, 2014, 8:21:47 PM7/7/14
to rav...@googlegroups.com
We have a fairly huge RavenDB database in production and I was trying to find out how does it allocates memory. We are seeing in our environment it is consuming almost all of the memory on server (7.0 GB of total 8.0 GB) and is constantly holding on to it. Is this normal? Are there ways to allocate a fixed amount of memory for RavenDB. What could be the reasons it's grabing onto almost all memory available. 

We have another problem that I wanted to see if you have any reasoning behind. We frequently see our indexes goes stale for extended period of times. Is there a good explanation why this happens. We have a 20+ million documents and 16 indexes in our database. Most of the operations are insert and a small portion of it updates. We have 100K documents added every day. Is the size the issue? Should we look archiving older documents to another DB. Is there any limits on amount of documents that ravendb can handle. Are there any recommended strategies to handle large ravendb databases.

Look forward to hearing from you.

Thanks,
Kashyap

Mauro Servienti

unread,
Jul 8, 2014, 12:56:40 AM7/8/14
to rav...@googlegroups.com
Have you got any LoadDocument in your indexes?
What about the disk I/O perf? (that is generally a good reason behind a lot of memory consumption)

.m
--
(no keyboard keys have been killed due to the really annoying OSX spell checker)

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oren Eini (Ayende Rahien)

unread,
Jul 8, 2014, 2:49:50 AM7/8/14
to ravendb
Hi,
RavenDB by default will use as much memory as it can, to do its operations.
It will leave, by default, 768MB for the OS and other stuff, but it assumes that you want it to make maximum use of your machine resources.
This can be controlled by the Raven/AvailableMemoryForRaisingIndexBatchSizeLimit flag.

Indexes are stale for as long as they have documents to go through. If you can post the /stats for the database, it would help, but basically, whenever you inset / update any document, that immediately cause all indexes to become stale, until they can go through that document. On high insert systems, that means that most of the time the indexes are stale. It is expected and fine.
Note that you don't really care about the index staleness, you care about their _latencies_. That is, how far back are the indexes.
If they are 50ms late than the latest document insert, that is fine.

Another thing that has a heavy impact here is the I/O on the system.



Oren Eini

CEO


Mobile: + 972-52-548-6969

Office:  + 972-4-622-7811

Fax:      + 972-153-4622-7811





--
Reply all
Reply to author
Forward
0 new messages