RE: Solr and Garbage Collection

2009-10-06 Thread Fuad Efendi
Master-Slave replica: new caches will be warmed&prepopulated _before_ making new IndexReader available for _new_ requests and _before_ discarding old one - it means that theoretical sizing for FieldCache (which is defined by number of docs in an index and cardinality of a field) should be doubled..

RE: Solr and Garbage Collection

2009-10-06 Thread Fuad Efendi
> I read pretty much all posts on this thread (before and after this one). Looks > like the main suggestion from you and others is to keep max heap size (-Xmx) > as small as possible (as long as you don't see OOM exception). I suggested absolute opposite; please note also that "as small as possi

Re: Solr and Garbage Collection

2009-10-03 Thread Mark Miller
;>> MaxGCPauseMillis doesnt work with UseConcMarkSweepGC - its for use with >>>>>>> the Parallel collector. That also doesnt look like a good >>>>>>> >>>>>>> >>>>>>> >>>> survivorratio. >>>> >>>> >>>> >>>>>>&g

Re: Solr and Garbage Collection

2009-10-03 Thread Mark Miller
't your >>>>> suggestion (of lowering heap limit) going against that? >>>>> >>>>> >>>>> >>>>>> Leaving RAM for the FileSystem cache is also very important. But you >>>>>> should

Re: Solr and Garbage Collection

2009-10-03 Thread Mark Miller
>>>> * Looks like Solr caching made its way into tenure-generation on heap, >>>>>> >>>>>> >>>> that's good. But why they get GC'ed eventually?? I did a quick check of >>>> >> Solr >> >>

Re: Solr and Garbage Collection

2009-10-03 Thread Bill Au
mory management strategy (or just my ignorance about Solr?). I > >> mean, wouldn't this be the "right" way of doing it -- you allow user to > >> specify the cache size in solrconfig.xml, then user can set up heap > limit in > >> JAVA_OPTS accordingly, and no need to use WeakRef

Re: Solr and Garbage Collection

2009-10-03 Thread Mark Miller
you see concurrent mode failure when looking at your gc logs? ie: >>> >>> 174.445: [GC 174.446: [ParNew: 66408K->66408K(66416K), 0.618 >>> secs]174.446: [CMS (concurrent mode failure): 161928K->162118K(175104K), >>> 4.0975124 secs] 228336K->162118K(24152

Re: Solr and Garbage Collection

2009-10-03 Thread Bill Au
still getting major collections with CMS, and you > > don't want that. You might try kicking GC off earlier with something > > like: -XX:CMSInitiatingOccupancyFraction=50 > > > >> * Right now I have a single Tomcat hosting Solr and other applications. > I gues

Re: Solr and Garbage Collection

2009-10-03 Thread Mark Miller
8K(175104K), > 4.0975124 secs] 228336K->162118K(241520K) > > That means you have still getting major collections with CMS, and you > don't want that. You might try kicking GC off earlier with something > like: -XX:CMSInitiatingOccupancyFraction=50 > >> * Right now I

Re: Solr and Garbage Collection

2009-10-02 Thread Mark Miller
with CMS, and you don't want that. You might try kicking GC off earlier with something like: -XX:CMSInitiatingOccupancyFraction=50 > * Right now I have a single Tomcat hosting Solr and other applications. I > guess now it's better to have Solr on its own Tomcat, given that i

RE: Solr and Garbage Collection

2009-10-02 Thread siping liu
> From: wun...@wunderwood.org > To: solr-user@lucene.apache.org > Subject: RE: Solr and Garbage Collection > Date: Fri, 25 Sep 2009 09:51:29 -0700 > > 30ms is not better or worse than 1s until you look at the service > requirements. For many applications, it is worth dedicatin

RE: Solr and Garbage Collection

2009-09-29 Thread Fuad Efendi
> Actually the CPU usage of the solr servers is almost insignificant (it was > like that before). >>The time spent on collecting memory dropped from 11% to 3.81% I even think that 3.81% from 5% is nothing (suspecting that SOLR uses 5% CPU, mostly loading large field values in memory) :))) (woul

Re: Solr and Garbage Collection

2009-09-28 Thread Bill Au
One way to track expensive is to look at the query time, QTime, in the solr log. There are a couple of tools for analyzing gc logs: http://www.tagtraum.com/gcviewer.html https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPJMETER They will give you frequency and duratio

Re: Solr and Garbage Collection

2009-09-28 Thread Mark Miller
apache.org >> Sent: Monday, September 28, 2009 4:49:03 PM >> Subject: Re: Solr and Garbage Collection >> >> How do you track major collections? Even better, how do you log your GC >> behavior with details? Right now I just log total time spent on collections, >

Re: Solr and Garbage Collection

2009-09-28 Thread Mark Miller
|-verbose:gc | |[GC 325407K->83000K(776768K), 0.2300771 secs] [GC 325816K->83372K(776768K), 0.2454258 secs] [Full GC 267628K->83769K(776768K), 1.8479984 secs]| Additional details with: |-XX:+PrintGCDetails| |[GC [DefNew: 64575K->959K(64576K), 0.0457646 secs] 196016K->133633K(261184K), 0.045906

Re: Solr and Garbage Collection

2009-09-28 Thread Otis Gospodnetic
rom: Jonathan Ariel > To: solr-user@lucene.apache.org > Sent: Monday, September 28, 2009 4:49:03 PM > Subject: Re: Solr and Garbage Collection > > How do you track major collections? Even better, how do you log your GC > behavior with details? Right now I just log total time spent on

Re: Solr and Garbage Collection

2009-09-28 Thread Jonathan Ariel
How do you track major collections? Even better, how do you log your GC behavior with details? Right now I just log total time spent on collections, but I don't really know on which collections.Regard application performance with the ConcMarkSweepGC, I think I didn't experience any impact for now.

Re: Solr and Garbage Collection

2009-09-28 Thread Mark Miller
Do you have your GC logs? Are you still seeing major collections? Where is the time spent? Hard to say without some of that info. The goal of the low pause collector is to finish collecting before the tenured space is filled - if it doesn't, a standard major collection occurs. The collector wil

Re: Solr and Garbage Collection

2009-09-28 Thread Jonathan Ariel
Ok... good news! Upgrading to the newest version of JVM 6 (update 6) seems to solve this ugly bug. With the upgraded JVM I could run the solr servers for more than 12 hours on the production environment with the GC mentioned in the previous e-mails. The results are really amazing. The time spent on

Re: Solr and Garbage Collection

2009-09-27 Thread Bill Au
You are running a very old version of Java 6 (update 6). The latest is update 16. You should definitely upgrade. There is a bug in Java 6 starting with update 4 that may result in a corrupted Lucene/Solr index: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6707044 https://issues.apache.org/

Re: Solr and Garbage Collection

2009-09-27 Thread Jonathan Ariel
0s large > >> documents (in parallel! 1000s concurrent users), can you predict memory > >> requirements and GC options without application-specific knowledge? What > >> about new SOLR-Caches warming up? > >> > >> > >> -Fuad > >> > >>

Re: Solr and Garbage Collection

2009-09-27 Thread Mark Miller
need to load 1000s large >> documents (in parallel! 1000s concurrent users), can you predict memory >> requirements and GC options without application-specific knowledge? What >> about new SOLR-Caches warming up? >> >> >> -Fuad >> >> >>

Re: Solr and Garbage Collection

2009-09-27 Thread Mark Miller
bout new SOLR-Caches warming up? > > > -Fuad > > > >> -Original Message- >> From: Mark Miller [mailto:markrmil...@gmail.com] >> Sent: September-27-09 2:46 PM >> To: solr-user@lucene.apache.org >> Subject: Re: Solr and Garbage Collection &

Re: Solr and Garbage Collection

2009-09-27 Thread Jonathan Ariel
n you predict memory > requirements and GC options without application-specific knowledge? What > about new SOLR-Caches warming up? > > > -Fuad > > > > -----Original Message----- > > From: Mark Miller [mailto:markrmil...@gmail.com] > > Sent: September-27-09 2

RE: Solr and Garbage Collection

2009-09-27 Thread Fuad Efendi
46 PM > To: solr-user@lucene.apache.org > Subject: Re: Solr and Garbage Collection > > If he needed double the RAM, he'd likely know by now :) The JVM likes to > throw OOM exceptions when you need more RAM. Until it does - thats an > odd path to focus on. There has been no

Re: Solr and Garbage Collection

2009-09-27 Thread Mark Miller
If he needed double the RAM, he'd likely know by now :) The JVM likes to throw OOM exceptions when you need more RAM. Until it does - thats an odd path to focus on. There has been no indication he has ever seen an OOM with his over 10 GB heap. It sounds like he has run Solr in his environment for

RE: Solr and Garbage Collection

2009-09-27 Thread Fuad Efendi
>> Ok. After the server ran for more than 12 hours, the time spent on GC >> decreased from 11% to 3,4%, but 5 hours later it crashed. All this 'black-hat' GC tuning and 'fast' object moving (especially objects accessing by some thread during GC-defragmentation) - try to use multithreaded load-str

Re: Solr and Garbage Collection

2009-09-26 Thread Jonathan Ariel
Yes, it seems like a bug. I will update my JVM, try again and let you know the results :) On 9/26/09, Mark Miller wrote: > Jonathan Ariel wrote: >> Ok. After the server ran for more than 12 hours, the time spent on GC >> decreased from 11% to 3,4%, but 5 hours later it crashed. This is the >> thr

Re: Solr and Garbage Collection

2009-09-26 Thread Mark Miller
w very little about the IBM JVM, so I wasn't really > commenting. But from the info I gleaned here and on a couple quick web > searches, I'm not too impressed by it's GC. > >> wunder >> >> -Original Message- >> From: Mark Miller [mailto:mar

Re: Solr and Garbage Collection

2009-09-26 Thread Mark Miller
Also, in case the info might help track something down: Its pretty darn odd that both your survivor spaces are full. I've never seen that ever in one of these dumps. Always one is empty. When one is filled, its moved to the other. Then back. And forth. For a certain number of times until its moved

Re: Solr and Garbage Collection

2009-09-26 Thread Mark Miller
Jonathan Ariel wrote: > Ok. After the server ran for more than 12 hours, the time spent on GC > decreased from 11% to 3,4%, but 5 hours later it crashed. This is the thread > dump, maybe you can help identify what happened? > Well thats a tough ;) My guess is its a bug :) Your two survivor spac

Re: Solr and Garbage Collection

2009-09-26 Thread Jonathan Ariel
Ok. After the server ran for more than 12 hours, the time spent on GC decreased from 11% to 3,4%, but 5 hours later it crashed. This is the thread dump, maybe you can help identify what happened? # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x2

Re: Solr and Garbage Collection

2009-09-26 Thread Mark Miller
Jonathan Ariel wrote: > I have around 8M documents. > Thats actually not so bad - I take it you are faceting/sorting on quite a few unique fields? > I set up my server to use a different collector and it seems like it > decreased from 11% to 4%, of course I need to wait a bit more because it is

RE: Solr and Garbage Collection

2009-09-25 Thread Fuad Efendi
Sorry for OFF-topic: Create dummy "Hello, World!" JSP, use Tomcat, execute load-stress simulator(s) from separate machine(s), and measure... don't forget to allocate necessary thread pools in Tomcat (if you have to)... Although such JSP doesn't use any memory, you will see how easy one can go with

Re: Solr and Garbage Collection

2009-09-25 Thread Jonathan Ariel
I have around 8M documents. I set up my server to use a different collector and it seems like it decreased from 11% to 4%, of course I need to wait a bit more because it is just a 1 hour old log. But it seems like it is much better now. I will tell you on Monday the results :) On Fri, Sep 25, 2009

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
One more point and I'll stop - I've hit my email quota for the day ;) While its a pain to have to juggle GC params and tune - when you require a heap thats more than a gig or two, I personally believe its essential to do so for good performance. The (default settings / ergonomics with throughput)

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
Thats a good point too - if you can reduce your need for such a large heap, by all means, do so. However, considering you already need at least 10GB or you get OOM, you have a long way to go with that approach. Good luck :) How many docs do you have ? I'm guessing its mostly FieldCache type stuff

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
Mark Miller wrote: > Jonathan Ariel wrote: > >> How can I check which is the GC that it is being used? If I'm right JVM >> Ergonomics should use the Throughput GC, but I'm not 100% sure. Do you have >> any recommendation on this? >> >> >> > Just to straighten out this one too - Ergonomic

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
Jonathan Ariel wrote: > How can I check which is the GC that it is being used? If I'm right JVM > Ergonomics should use the Throughput GC, but I'm not 100% sure. Do you have > any recommendation on this? > > Just to straighten out this one too - Ergonomics doesn't use throughput - throughput is

Re: Solr and Garbage Collection

2009-09-25 Thread Grant Ingersoll
On Sep 25, 2009, at 9:30 AM, Jonathan Ariel wrote: Hi to all! Lately my solr servers seem to stop responding once in a while. I'm using solr 1.3. Of course I'm having more traffic on the servers. So I logged the Garbage Collection activity to check if it's because of that. It seems like 11

Re: Solr and Garbage Collection

2009-09-25 Thread Jonathan Ariel
Ok. I'll first change the GC and see if the time spent decreased. Than I'll try increasing the heap as Fuad recommends. On 9/25/09, Mark Miller wrote: > When we talk about Collectors, we are not just talking about > "collecting" - whatever that means. There isn't really a "collecting" > phase - t

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
t; > Yeah, I actually know very little about the IBM JVM, so I wasn't really > commenting. But from the info I gleaned here and on a couple quick web > searches, I'm not too impressed by it's GC. > >> wunder >> >> -Original Message- >> From:

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
ow very little about the IBM JVM, so I wasn't really commenting. But from the info I gleaned here and on a couple quick web searches, I'm not too impressed by it's GC. > wunder > > -Original Message- > From: Mark Miller [mailto:markrmil...@gmail.com] > Sent

RE: Solr and Garbage Collection

2009-09-25 Thread Walter Underwood
] Sent: Friday, September 25, 2009 10:31 AM To: solr-user@lucene.apache.org Subject: Re: Solr and Garbage Collection My bad - later, it looks as if your giving general advice, and thats what I took issue with. Any Collector that is not doing generational collection is essentially from the dark ages a

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
arge > _h.html > > wunder > > -Original Message- > From: Mark Miller [mailto:markrmil...@gmail.com] > Sent: Friday, September 25, 2009 10:03 AM > To: solr-user@lucene.apache.org > Subject: Re: Solr and Garbage Collection > > Walter Underwood wrote: > &g

Re: Solr and Garbage Collection

2009-09-25 Thread Jonathan Ariel
er [mailto:markrmil...@gmail.com] > Sent: Friday, September 25, 2009 10:03 AM > To: solr-user@lucene.apache.org > Subject: Re: Solr and Garbage Collection > > Walter Underwood wrote: > > 30ms is not better or worse than 1s until you look at the service > > requirements. Fo

RE: Solr and Garbage Collection

2009-09-25 Thread Walter Underwood
on_mccurry/tuning_the_ibm_jvm_for_large _h.html wunder -Original Message- From: Mark Miller [mailto:markrmil...@gmail.com] Sent: Friday, September 25, 2009 10:03 AM To: solr-user@lucene.apache.org Subject: Re: Solr and Garbage Collection Walter Underwood wrote: > 30ms is not better or worse than 1s unti

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
ou have two > live Searcher objects with all their caches. Make sure you have headroom for > a commit. > > If you want to test the tenured space usage, you must test with real world > queries. Those are the only way to get accurate cache eviction rates. > > wunder >

RE: Solr and Garbage Collection

2009-09-25 Thread Walter Underwood
queries. Those are the only way to get accurate cache eviction rates. wunder -Original Message- From: Jonathan Ariel [mailto:ionat...@gmail.com] Sent: Friday, September 25, 2009 9:34 AM To: solr-user@lucene.apache.org Subject: Re: Solr and Garbage Collection BTW why making them equal

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
>-server option of JVM is 'native CPU code', I remember WebLogic 7 console >with SUN JVM 1.3 not showing any GC (just horizontal line). Not sure what that is all about either. -server and -client are just two different versions of hotspot. The -server version is optimized for long running applicat

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
It won't really - it will just keep the JVM from wasting time resizing the heap on you. Since you know you need so much RAM anyway, no reason not to just pin it at what you need. Not going to help you much with GC though. Jonathan Ariel wrote: > BTW why making them equal will lower the frequency o

Re: Solr and Garbage Collection

2009-09-25 Thread Jonathan Ariel
BTW why making them equal will lower the frequency of GC? On 9/25/09, Fuad Efendi wrote: >> Bigger heaps lead to bigger GC pauses in general. > > Opposite viewpoint: > 1sec GC happening once an hour is MUCH BETTER than 30ms GC once-per-second. > > To lower frequency of GC: -Xms4096m -Xmx4096m (ma

Re: Solr and Garbage Collection

2009-09-25 Thread Jonathan Ariel
I can't really understand how increasing the heap will decrease the 11% dedicated to GC On 9/25/09, Fuad Efendi wrote: >> You are saying that I should give more memory than 12GB? > > > Yes. Look at this: > >> > SEVERE: java.lang.OutOfMemoryError: Java heap space >> > org.apache.lucene.search.Fiel

RE: Solr and Garbage Collection

2009-09-25 Thread cbennett
I would look at the JVM. Have you tried switching to the concurrent low pause collector ? Colin. -Original Message- From: Jonathan Ariel [mailto:ionat...@gmail.com] Sent: Friday, September 25, 2009 12:07 PM To: solr-user@lucene.apache.org Subject: Re: Solr and Garbage Collection You

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
for just this instance of FieldCache. >> >> GC does not play any role. FieldCache won't be GC-collected. >> >> >> -Fuad >> http://www.linkedin.com/in/liferay >> >> >> >> >>> -----Original Message- >>> From: Jonath

RE: Solr and Garbage Collection

2009-09-25 Thread Fuad Efendi
> You are saying that I should give more memory than 12GB? Yes. Look at this: > > SEVERE: java.lang.OutOfMemoryError: Java heap space > org.apache.lucene.search.FieldCacheImpl$10.createValue(FieldCacheImpl.java:3 > 61 > > ) It can't find few (!!!) contiguous bytes for .createValue(...) It ca

Re: Solr and Garbage Collection

2009-09-25 Thread Jonathan Ariel
> > > > -Original Message- > > From: Jonathan Ariel [mailto:ionat...@gmail.com] > > Sent: September-25-09 11:37 AM > > To: solr-user@lucene.apache.org; yo...@lucidimagination.com > > Subject: Re: Solr and Garbage Collection > > > > Right, now I'

RE: Solr and Garbage Collection

2009-09-25 Thread Fuad Efendi
il.com] > Sent: September-25-09 11:37 AM > To: solr-user@lucene.apache.org; yo...@lucidimagination.com > Subject: Re: Solr and Garbage Collection > > Right, now I'm giving it 12GB of heap memory. > If I give it less (10GB) it throws the following e

RE: Solr and Garbage Collection

2009-09-25 Thread Fuad Efendi
> Bigger heaps lead to bigger GC pauses in general. Opposite viewpoint: 1sec GC happening once an hour is MUCH BETTER than 30ms GC once-per-second. To lower frequency of GC: -Xms4096m -Xmx4096m (make it equal!) Use -server option. -server option of JVM is 'native CPU code', I remember WebLogic

Re: Solr and Garbage Collection

2009-09-25 Thread Mark Miller
I've got the start of a Garbage Collection article here: http://www.lucidimagination.com/blog/2009/09/19/java-garbage-collection-boot-camp-draft/ I plan to tie it more into Lucene/Solr and add some more about the theory/methods in the final version. With so much RAM, I take it you prob have a han

RE: Solr and Garbage Collection

2009-09-25 Thread cbennett
should help with the long pauses. Colin. -Original Message- From: Jonathan Ariel [mailto:ionat...@gmail.com] Sent: Friday, September 25, 2009 11:37 AM To: solr-user@lucene.apache.org; yo...@lucidimagination.com Subject: Re: Solr and Garbage Collection Right, now I'm giving it 12GB of

Re: Solr and Garbage Collection

2009-09-25 Thread Jonathan Ariel
Right, now I'm giving it 12GB of heap memory. If I give it less (10GB) it throws the following exception: Sep 5, 2009 7:18:32 PM org.apache.solr.common.SolrException log SEVERE: java.lang.OutOfMemoryError: Java heap space at org.apache.lucene.search.FieldCacheImpl$10.createValue(FieldCache

Re: Solr and Garbage Collection

2009-09-25 Thread Yonik Seeley
On Fri, Sep 25, 2009 at 9:30 AM, Jonathan Ariel wrote: > Hi to all! > Lately my solr servers seem to stop responding once in a while. I'm using > solr 1.3. > Of course I'm having more traffic on the servers. > So I logged the Garbage Collection activity to check if it's because of > that. It seems