lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Underwood <wun...@wunderwood.org>
Subject Re: Number of shards - Best practice
Date Wed, 05 Apr 2017 04:22:38 GMT
> On Apr 4, 2017, at 7:38 PM, Muhammad Imad Qureshi <imadgreat@yahoo.com.INVALID>
wrote:
> 
> Hi
> I was recently told that ideally the number of shards in a SOLR cluster should be equal
to a power of 2. If this is indeed a best practice, then what is the rationale behind this
recommendation? ThanksImad

I don’t know of any such recommendation. Assuming you are not RAM or disk limited, going
to two or three shards won’t help a lot. If those get you out of a bottleneck, you’ll
see a difference.

I believe that some of the performance of Solr is proportional to the number of distinct terms
in the index (the vocabulary). A rule of thumb is the vocabulary is proportional to the square
root of the number of terms in the index. Which is often related to the number of documents.
With this assumption, four shards gives a 2X speedup. Which has worked for me. 

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message