Limit the amount of RAM that RavenDB takes up

186 views
Skip to first unread message

AndyMcGoldrick

unread,
Sep 9, 2011, 7:25:01 AM9/9/11
to ravendb
Is there anyway of limiting how mach memory the server will use?

I am running the database as a service.

Thanks

Andy

Itamar Syn-Hershko

unread,
Sep 9, 2011, 7:26:57 AM9/9/11
to rav...@googlegroups.com
Not through RavenDB, no

Matt Warren

unread,
Sep 9, 2011, 7:46:50 AM9/9/11
to ravendb
You can follow some of the tips here http://ravendb.net/faq/low-memory-footprint.
Also you can limit how much caching Raven does by using code like
this:

using (DocumentCacher.SkipSettingDocumentsInDocumentCache())
{
...
}

See https://groups.google.com/group/ravendb/browse_thread/thread/eb24bcc97a1fa2b/
for a bit more info.

Note: as Itamar said you can't limit the amount of memory to a set
amount, you can just reduce it.

Matt Warren

unread,
Sep 9, 2011, 8:01:49 AM9/9/11
to ravendb
Actually you probably don't want to prevent RavenDB from caching docs
(using using SkipSettingDocumentsInDocumentCache) as that will be a
perf hit, instead you just want to configure how much RAM it can use
for the cache.

You can do that using the settings MemoryCacheLimitPercentage and
MemoryCacheLimitCheckInterval, see
https://groups.google.com/group/ravendb/browse_thread/thread/6415c0bcb87bcaef/
for a bit more info.

On Sep 9, 12:46 pm, Matt Warren <mattd...@gmail.com> wrote:
> You can follow some of the tips herehttp://ravendb.net/faq/low-memory-footprint.
> Also you can limit how much caching Raven does by using code like
> this:
>
> using (DocumentCacher.SkipSettingDocumentsInDocumentCache())
> {
>    ...
>
> }
>
> Seehttps://groups.google.com/group/ravendb/browse_thread/thread/eb24bcc9...

AndyMcGoldrick

unread,
Sep 9, 2011, 10:40:04 AM9/9/11
to ravendb
Thanks a lot this is just what I was looking for.

My initial question was not phrased too well! :-) I meant reduce
instead of a set a hard limit.

Thanks again

Andy



On Sep 9, 1:01 pm, Matt Warren <mattd...@gmail.com> wrote:
> Actually you probably don't want to prevent RavenDB from caching docs
> (using using SkipSettingDocumentsInDocumentCache) as that will be a
> perf hit, instead you just want to configure how much RAM it can use
> for the cache.
>
> You can do that using the settings MemoryCacheLimitPercentage and
> MemoryCacheLimitCheckInterval, seehttps://groups.google.com/group/ravendb/browse_thread/thread/6415c0bc...
Reply all
Reply to author
Forward
0 new messages