On 4/9/2013 7:03 PM, Furkan KAMACI wrote:
> These are really good metrics for me:
> 
> You say that RAM size should be at least index size, and it is better to
> have a RAM size twice the index size (because of worst case scenario).
> 
> On the other hand let's assume that I have a RAM size that is bigger than
> twice of indexes at machine. Can Solr use that extra RAM or is it a
> approximately maximum limit (to have twice size of indexes at machine)?

What we have been discussing is the OS cache, which is memory that is
not used by programs.  The OS uses that memory to make everything run
faster.  The OS will instantly give that memory up if a program requests it.

Solr is a java program, and java uses memory a little differently, so
Solr most likely will NOT use more memory when it is available.

In a "normal" directly executable program, memory can be allocated at
any time, and given back to the system at any time.

With Java, you tell it the maximum amount of memory the program is ever
allowed to use.  Because of how memory is used inside Java, most
long-running Java programs (like Solr) will allocate up to the
configured maximum even if they don't really need that much memory.
Most Java virtual machines will never give the memory back to the system
even if it is not required.

Thanks,
Shawn

Reply via email to