lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Solr Memory Usage - How to reduce memory footprint for solr
Date Wed, 07 Jan 2015 16:43:53 GMT
And keep in mind that starving the OS of memory to
give it to the JVM is an anti-pattern, see Uwe's
excellent blog on MMapDirectory here:

http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html

Best,
Erick

On Wed, Jan 7, 2015 at 5:55 AM, Shawn Heisey <apache@elyograg.org> wrote:
> On 1/6/2015 1:10 PM, Abhishek Sharma wrote:
>> *Q* - I am forced to set Java Xmx as high as 3.5g for my solr app.. If i
>> keep this low, my CPU hits 100% and response time for indexing increases a
>> lot.. And i have hit OOM Error as well when this value is low..
>>
>> Is this too high? If so, how can I reduce this?
>>
>> *Machine Details* 4 G RAM, SSD
>>
>> *Solr App Details* (Standalone solr app, no shards)
>>
>>    1. num. of Solr Cores = 5
>>    2. Index Size - 2 g
>>    3. num. of Search Hits per sec - 10 [*IMP* - All search queries have
>>    faceting..]
>>    4. num. of times Re-Indexing per hour per core - 10 (it may happen at
>>    the same time at a moment for all the 5 cores)
>>    5. Query Result Cache, Document cache and Filter Cache are all default
>>    size - 4 kb.
>>
>> *top* stats -
>>
>>   VIRT    RES    SHR S %CPU %MEM
>> 6446600 3.478g  18308 S 11.3 94.6
>>
>> *iotop* stats
>>
>>  DISK READ  DISK WRITE  SWAPIN     IO>
>> 0-1200 K/s    0-100 K/s  0          0-5%
>
> Your questions cannot be easily answered.  We can make guesses, but in
> the end, figuring out how much hardware and exactly what configs to use
> is something that only you can determine, by actually trying it:
>
> https://lucidworks.com/blog/sizing-hardware-in-the-abstract-why-we-dont-have-a-definitive-answer/
>
> The following URL is the only general guideline I know of, and because
> of the problems mentioned on the blog post above, it's not all that
> helpful for specifics.  Full disclosure of my bias ... I wrote most of
> this wiki page:
>
> http://wiki.apache.org/solr/SolrPerformanceProblems
>
> Any recommendation we make will err on the side of caution, and may
> involve spending more money for your hardware than you intended.  I
> personally would not try to get a Solr install going on machines with
> only 4GB of RAM unless it was a VERY small index.  Your mentioned heap
> size of 3.5GB is quite small compared to what we normally see here.  My
> own production heaps for Solr are 6GB.
>
> Thanks,
> Shawn
>

Mime
View raw message