I have 4 solr server, each allocated 6GB。My dataset on HDFS is 787GB, 2 billion
documents totally,each document is 300 Bytes。 Follow is my cache related
configuration。
<filterCache class="solr.FastLRUCache"
size="512"
initialSize="512"
autowarmCount="0"/>
<queryResultCache class="solr.LRUCache"
size="512"
initialSize="512"
autowarmCount="0"/>
<documentCache class="solr.LRUCache"
size="512"
initialSize="512"
autowarmCount="0"/>
<cache name="perSegFilter"
class="solr.search.LRUCache"
size="10"
initialSize="0"
autowarmCount="10"
regenerator="solr.NoOpRegenerator" />
<queryResultWindowSize>20</queryResultWindowSize>
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
zhenyuan wei <[email protected]> 于2018年8月23日周四 下午5:41写道:
> Thank you very much to answer. @Jan Høydahl
> My query is simple, just wildcard last 2 char in this query(have more
> other query to optimize)
>
> curl "
> http://emr-worker-1:8983/solr/collection005/query?q=v10_s:OOOOOOOOVVVVVVVVYY*&rows=10&&fl=id&echoParams=all
> "
> {
> "responseHeader":{
> "zkConnected":true,
> "status":0,
> "*QTime":125,*
> "params":{
> "q":"v10_s:OOOOOOOOVVVVVVVVYY*",
> "df":"_text_",
> "echoParams":"all",
> "indent":"true",
> "fl":"id",
> "rows":"10",
> "wt":"json"}},
> "response":{"numFound":118181,"start":0,"maxScore":1.0,"docs":[
> .......
> }}
>
> The first time query , it return slow, second time it returns very fast。It
> maybe cached already。
> With "debugQuery=true&shards.info=true", I can see all shards toke 40
> or more millisecond 。
> The second time the query executes , all shards query spend only 1~5
> millisecond。
> But I dont know how to optimize the first time the query
> execute,filterCache?QueryResultCache?
> or hdfs blockCache? and how much RAM I should allocate to them?
>
> I want to turn down QTime to 50ms or less in the first time query executes。
>
>
>
>
> Jan Høydahl <[email protected]> 于2018年8月23日周四 下午5:19写道:
>
>> Hi,
>>
>> With debugQuery you see the timings. What component spends the most time?
>> With shards.info=true you see what shard is the slowest, if your index
>> is sharded.
>> With echoParams=all you get the full list of query parameters in use,
>> perhaps you spot something?
>> If you start Solr with -v option then you get more verbose logging in
>> solr.log which may help
>>
>> Can you share with us how your query looks like, including all parameters
>> from the <params> section with echoParams=all enabled?
>>
>> --
>> Jan Høydahl, search solution architect
>> Cominvent AS - www.cominvent.com
>>
>> > 23. aug. 2018 kl. 11:09 skrev zhenyuan wei <[email protected]>:
>> >
>> > Hi all,
>> > I do care query performance, but do not know how to find out the
>> reason
>> > why a query so slow.
>> > *How to trace one query?*the debug/debugQuery info are not enough to
>> find
>> > out why a query is slow。
>> >
>> >
>> > Thanks a lot~
>>
>>