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 Blargy <zm...@hotmail.com> on 2010/06/18 03:37:52 UTC

Peformance tuning

After indexing our item descriptions our index grew from around 3gigs to now
17.5 and I can see our search has deteriorated from sub 50ms searches to
over 500ms now. The sick thing is I'm not even searching across that field
at the moment but I plan to in the near future as well as include
highlighting.

What size is considered to be "too big" for one index? When should one
looking into sharding/federation etc?

What are some generic performance tuning options that could possible help?
We are currently hosting 4 slaves. Would increasing the number of slaves
help?
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904540.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Peformance tuning

Posted by Blargy <zm...@hotmail.com>.

Otis Gospodnetic-2 wrote:
> 
> You may want to try the RPM tool, it will show you what inside of that
> QueryComponent is really slow.
> 

We are already using it :)

Where should I be concentrating on? Transaction trace?

-- 
View this message in context: http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p905730.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Peformance tuning

Posted by Otis Gospodnetic <ot...@yahoo.com>.
You may want to try the RPM tool, it will show you what inside of that QueryComponent is really slow.

http://blog.sematext.com/2010/05/11/solr-performance-monitoring-announcement/


Or you can run Solr under your own profiler.
Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



----- Original Message ----
> From: Blargy <zm...@hotmail.com>
> To: solr-user@lucene.apache.org
> Sent: Fri, June 18, 2010 1:22:57 AM
> Subject: Re: Peformance tuning
> 
> 


> first step is to do an &debugQuery=true and see where the 
> time is  
> going on the server-side.  If you're doing 
> highlighting of a stored  
> field, that can be a biggie.   The 
> timings will be in the debug output  
> - be sure to look at both 
> sections of the timings. 
> 

Looks like the majority of the time is 
> spend on the QueryComponent in the
Process section. Any suggestions on how I 
> can improve this? Thanks!

-- 
View this message in context: 
> href="http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904861.html" 
> target=_blank 
> >http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904861.html
Sent 
> from the Solr - User mailing list archive at Nabble.com.

Re: Peformance tuning

Posted by Blargy <zm...@hotmail.com>.


> first step is to do an &debugQuery=true and see where the time is  
> going on the server-side.  If you're doing highlighting of a stored  
> field, that can be a biggie.   The timings will be in the debug output  
> - be sure to look at both sections of the timings. 
> 

Looks like the majority of the time is spend on the QueryComponent in the
Process section. Any suggestions on how I can improve this? Thanks!

-- 
View this message in context: http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904861.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Peformance tuning

Posted by Blargy <zm...@hotmail.com>.

Otis Gospodnetic-2 wrote:
> 
> Smaller merge factor will make things worse - 
> 

- Whoops... Ill guess Ill change it from 5 to the default 10
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p905726.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Peformance tuning

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi,

Smaller merge factor will make things worse - it will cause Lucene to merge index segments more often (than the default merge factor of 10), thus resulting in more new files being created on the master, thus resulting in more network IO, more disk IO on the slaves, more OS cache evicted on the slaves, longer warmup times on slaves, higher CPU usage and higher query latency on slaves during warmup.  The sequence to remember.
 Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



----- Original Message ----
> From: Blargy <zm...@hotmail.com>
> To: solr-user@lucene.apache.org
> Sent: Fri, June 18, 2010 12:41:32 AM
> Subject: Re: Peformance tuning
> 
> 

Blargy - Please try to quote the mail you're responding to, at 
> least  
> the relevant piece.  It's nice to see some context to 
> the discussion.

No problem ;)


Depends - if you optimize the 
> index on the master, then the entire index is
replicated.  If you simply 
> commit and let Lucene take care of  adding
segments you'll generally 
> reduce what is replicated. 

As a side question... would reducing the 
> mergeFactor help at all? This is
currently what I am 
> using...

<mainIndex>
    
> <useCompoundFile>false</useCompoundFile>
    
> <ramBufferSizeMB>64</ramBufferSizeMB>
    
> <mergeFactor>5</mergeFactor>
    
> <unlockOnStartup>false</unlockOnStartup>
    
> <reopenReaders>true</reopenReaders>

    
> <deletionPolicy class="solr.SolrDeletionPolicy">
      
> <str name="maxCommitsToKeep">1</str>
      <str 
> name="maxOptimizedCommitsToKeep">0</str>
    
> </deletionPolicy>

    <infoStream 
> file="INFOSTREAM.txt">false</infoStream>
  
> </mainIndex>
-- 
View this message in context: 
> href="http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904810.html" 
> target=_blank 
> >http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904810.html
Sent 
> from the Solr - User mailing list archive at Nabble.com.

Re: Peformance tuning

Posted by Blargy <zm...@hotmail.com>.

Blargy - Please try to quote the mail you're responding to, at least  
> the relevant piece.  It's nice to see some context to the discussion.

No problem ;)


Depends - if you optimize the index on the master, then the entire index is
replicated.  If you simply commit and let Lucene take care of  adding
segments you'll generally reduce what is replicated. 

As a side question... would reducing the mergeFactor help at all? This is
currently what I am using...

<mainIndex>
    <useCompoundFile>false</useCompoundFile>
    <ramBufferSizeMB>64</ramBufferSizeMB>
    <mergeFactor>5</mergeFactor>
    <unlockOnStartup>false</unlockOnStartup>
    <reopenReaders>true</reopenReaders>

    <deletionPolicy class="solr.SolrDeletionPolicy">
      <str name="maxCommitsToKeep">1</str>
      <str name="maxOptimizedCommitsToKeep">0</str>
    </deletionPolicy>

    <infoStream file="INFOSTREAM.txt">false</infoStream>
  </mainIndex>
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904810.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Peformance tuning

Posted by Erik Hatcher <er...@gmail.com>.
Blargy - Please try to quote the mail you're responding to, at least  
the relevant piece.  It's nice to see some context to the discussion.

On Jun 17, 2010, at 10:23 PM, Blargy wrote:
> Is there an alternative for highlighting on a large stored field?

Not currently.

> I thought
> for highlighting you needed the field stored?

You do.

> Not sure if this is because of the index size (17.5G) or because of
> highlighting but our slave servers are experiencing high loads...  
> possibly
> due to replication???? That actually leads me to my next question, I  
> thought
> replication would only download new segments without the need to  
> always
> re-download the whole index. This doesn't appear to be the case from  
> what
> I'm seeing. Am I wrong?

Depends - if you optimize the index on the master, then the entire  
index is replicated.  If you simply commit and let Lucene take care of  
adding segments you'll generally reduce what is replicated.

	Erik


Re: Peformance tuning

Posted by Blargy <zm...@hotmail.com>.
Is there an alternative for highlighting on a large stored field? I thought
for highlighting you needed the field stored? I really just need the
excerpting feature for highlighting relevant portions of our item
descriptions.

Not sure if this is because of the index size (17.5G) or because of
highlighting but our slave servers are experiencing high loads... possibly
due to replication???? That actually leads me to my next question, I thought
replication would only download new segments without the need to always
re-download the whole index. This doesn't appear to be the case from what
I'm seeing. Am I wrong?

Thanks again

-- 
View this message in context: http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904610.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Peformance tuning

Posted by Erik Hatcher <er...@gmail.com>.
first step is to do an &debugQuery=true and see where the time is  
going on the server-side.  If you're doing highlighting of a stored  
field, that can be a biggie.   The timings will be in the debug output  
- be sure to look at both sections of the timings.

	Erik

On Jun 17, 2010, at 9:37 PM, Blargy wrote:

>
> After indexing our item descriptions our index grew from around  
> 3gigs to now
> 17.5 and I can see our search has deteriorated from sub 50ms  
> searches to
> over 500ms now. The sick thing is I'm not even searching across that  
> field
> at the moment but I plan to in the near future as well as include
> highlighting.
>
> What size is considered to be "too big" for one index? When should one
> looking into sharding/federation etc?
>
> What are some generic performance tuning options that could possible  
> help?
> We are currently hosting 4 slaves. Would increasing the number of  
> slaves
> help?
> -- 
> View this message in context: http://lucene.472066.n3.nabble.com/Peformance-tuning-tp904540p904540.html
> Sent from the Solr - User mailing list archive at Nabble.com.