Solr 3.6 optimize and field cache question

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr 3.6 optimize and field cache question

Joshi, Shital
Hi,

We have Solr 3.6 set up with master and two slaves, each one with 70GB JVM. We run into java.lang.OutOfMemoryError when we cross 250 million documents. Every time this happens we purge documents, bring it below 200 million and bounce both slaves. We have facets  on 14 fields. We usually don't run optimize after the purge. Will the deleted documents be part of field cache if we don't run optimize after purge? Will I see difference in java heap memory utilization before and after running optimize? I thought optimize only affects the disk space.

Thanks!

Reply | Threaded
Open this post in threaded view
|

RE: Solr 3.6 optimize and field cache question

Michael Ryan
I'm 99% sure that the deleted docs will indeed use up space in the field cache, at least until the segments that those documents are in are merged - that is what an optimize will do. Of course, these segments will automatically be merged eventually, but it might take days for this to happen, depending on how often your index is updated.

-Michael

-----Original Message-----
From: Joshi, Shital [mailto:[hidden email]]
Sent: Monday, July 08, 2013 6:12 PM
To: '[hidden email]'
Subject: Solr 3.6 optimize and field cache question

Hi,

We have Solr 3.6 set up with master and two slaves, each one with 70GB JVM. We run into java.lang.OutOfMemoryError when we cross 250 million documents. Every time this happens we purge documents, bring it below 200 million and bounce both slaves. We have facets  on 14 fields. We usually don't run optimize after the purge. Will the deleted documents be part of field cache if we don't run optimize after purge? Will I see difference in java heap memory utilization before and after running optimize? I thought optimize only affects the disk space.

Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Solr 3.6 optimize and field cache question

Otis Gospodnetić
In reply to this post by Joshi, Shital
Hi,

70 GB heap and still OOMing?  Hmmmm.... sure, 14 fields for faceting,
but still - 70 GB heap!

Don't have source handy, but I quickly looked at FC src here -
http://search-lucene.com/c/Lucene:core/src/java/org/apache/lucene/search/FieldCache.java
- I see mentions of "delete" there, so I would guess FC is
delete-aware.

Have you tried just committing after your purge? (purge == delete (by
query), I assume)
Try that and lets see your heap before/after.

Otis
--
Solr & ElasticSearch Support -- http://sematext.com/
Performance Monitoring -- http://sematext.com/spm



On Mon, Jul 8, 2013 at 6:11 PM, Joshi, Shital <[hidden email]> wrote:
> Hi,
>
> We have Solr 3.6 set up with master and two slaves, each one with 70GB JVM. We run into java.lang.OutOfMemoryError when we cross 250 million documents. Every time this happens we purge documents, bring it below 200 million and bounce both slaves. We have facets  on 14 fields. We usually don't run optimize after the purge. Will the deleted documents be part of field cache if we don't run optimize after purge? Will I see difference in java heap memory utilization before and after running optimize? I thought optimize only affects the disk space.
>
> Thanks!
>
Reply | Threaded
Open this post in threaded view
|

Re: Solr 3.6 optimize and field cache question

Marc Sturlese
In reply to this post by Joshi, Shital
Not a solution for the short term but sounds like a good use case to migrate to Solr 4.X and use DocValues instead of FieldCache for faceting.