memory usage doesn't drop off after inserting 260,000 documents

124 views
Skip to first unread message

balazs

unread,
Jan 30, 2013, 4:13:08 PM1/30/13
to rav...@googlegroups.com
According to performance monitor, memory usage on the server climbed 10+ gigs after inserting 260,000 documents through the RavenDb client.  Indexing was also going on, so that wasn't completely worrisome.  However, indexing and inserting of documents has been done for some 25 minutes now and performance monitor doesn't show any drop in the memory usage.  Nothing is being done on that server at moment.  Is this normal?  Is there some sort of prolonged delay in garbage collection? 

balazs

unread,
Jan 30, 2013, 4:17:27 PM1/30/13
to rav...@googlegroups.com
After a good half hour, it suddenly released that 10+ gigs when SQL Server was started on that machine.  I guess the OS finally GC-d it.

Chris Marisic

unread,
Jan 30, 2013, 4:24:06 PM1/30/13
to rav...@googlegroups.com
RavenDB has many built in caching aspects, it likely has a large amount of data sitting in the caches waiting to be read from in the near feature. I'm sure Ayende can give a more finite number, but i personally wouldn't be concerned about that memory usage unless it lasted for numerous hours, such that it seemed to actually negatively impacted the throughput of ravendb or led to esent version store out of memory scenarios etc.


On Wednesday, January 30, 2013 4:13:08 PM UTC-5, balazs wrote:

balazs

unread,
Jan 30, 2013, 4:25:18 PM1/30/13
to rav...@googlegroups.com
We've already seen one ESENT out of memory scenario here during an import, which is why I am concerned.  We were nearing max capacity.

Matt Warren

unread,
Jan 30, 2013, 7:25:14 PM1/30/13
to ravendb
You can limit the document cache using "Raven/MemoryCacheLimitMegabytes" however there are other things that take memory, such as Esent and pre-fetching. See http://ravendb.net/docs/server/administration/configuration for more info, but it's probably best to let Raven do it's think and self-adjust where needed.

The ESENT out of memory, version store issue is related to this value "Raven/Esent/MaxVerPages"

But as Chris says, RavenDB generally takes as much memory as is available, on the assumption that it's running as a server. It does however cut-back if it is detect low-memory situations.



--
You received this message because you are subscribed to the Google Groups "ravendb" 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/groups/opt_out.
 
 

Oren Eini (Ayende Rahien)

unread,
Jan 30, 2013, 7:46:22 PM1/30/13
to ravendb
Guys,
What is likely to have happened is that the there were no enough new allocations for the .NET GC to run and clean up stuff, that is all.
If you _really_ care for that you can force this to happen via /admin/gc, but I would discourage that.
Let the server manage the memory on its own.

In your case, when SQL Server started, the OS requested memory to be freed, and we did so.
Reply all
Reply to author
Forward
0 new messages