You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Oakley, Craig (NIH/NLM/NCBI) [C]" <cr...@nih.gov> on 2016/01/13 22:25:22 UTC

RE: Solr Heap memory vs. OS memory

Followup question:

If one has multiple instances on the same host (a host running basically nothing except multiple instances of Solr), then the values specified as -Xmx in the various instances should add up to 25% of the RAM of the host...

Is that correct?

-----Original Message-----
From: Markus Jelsma [mailto:markus.jelsma@openindex.io] 
Sent: Wednesday, December 09, 2015 10:28 AM
To: solr-user@lucene.apache.org
Subject: RE: Solr Heap memory vs. OS memory

Yes. This is still accurate, Lucene still relies on memory mapped files. And Solr usually doesn't require that much RAM, except if you have lots of massive cache entries.
Markus
 
-----Original message-----
> From:Kelly, Frank <fr...@here.com>
> Sent: Wednesday 9th December 2015 16:19
> To: solr-user@lucene.apache.org
> Subject: Solr Heap memory vs. OS memory
> 
> Hi Folks,
> 
>  I was wondering if this link I found recommended by Erick is still accurate (for Solr 5.3.1)
> 
> "For configuring your Java VM, you should rethink your memory requirements: Give only the really needed amount of heap space and leave as much as possible to the O/S. As a rule of thumb: Don't use more than 1Z4 of your physical memory as heap space for Java running Lucene/Solr, keep the remaining memory free for the operating system cache."
> 
> http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html
> 
> So I am using several CentOS Vms (on AWS) with 8GB RAM I so should plan for < 2GB for -Xms and -Xmx?
> Our scaling plan - being on AWS - is to scale out (adding more Vms - not adding more memory).
> 
> Thanks!
> 
> -Frank
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

Re: Solr Heap memory vs. OS memory

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/13/2016 2:25 PM, Oakley, Craig (NIH/NLM/NCBI) [C] wrote:
> Followup question:
>
> If one has multiple instances on the same host (a host running basically nothing except multiple instances of Solr), then the values specified as -Xmx in the various instances should add up to 25% of the RAM of the host...
>
> Is that correct?

Here comes the standard answer of anyone who works in technology:  It
depends.

When setting the max heap, you should set it as large as it needs to be,
and no larger.  Many factors will affect how much heap is required.

It is advisable to have much more memory installed in your server than
you need for your Java heap.  If you don't, Solr performance might be
unacceptable ... but this will depend on several factors, including the
size of your indexes.

This might be useful information:

https://wiki.apache.org/solr/SolrPerformanceProblems

Thanks,
Shawn