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 "Anria B." <an...@yahoo.com> on 2016/01/13 23:01:48 UTC
&fq degrades qtime in a 20million doc collection
hi all,
I have a Really fun question to ask. I'm sitting here looking at what is by
far the beefiest box I've ever seen in my life. 256GB of RAM, extreme
TerraBytes of disc space, the works. Linux server properly partitioned
Yet, what we are seeing goes against all intuition I've built up in the Solr
world
1. Collection has 20-30 million docs.
2. q=*&fq=someField:SomeVal ---> takes 2.5 seconds
3. q=someField:SomeVal --> 300ms
4. as numFound -> infinity, qtime -> infinity.
have any of you encountered such a thing?
that FQ degrades query time by so much?
it's pure Solr 5.3.1. ZK + Tomcat 8 + 1shard in solr. JDK_8u60 All
running on this same box.
We have already tested different autoCommit strategies, and different values
for heap size, starting at 16GB, 32GB, 64GB, 128GB ... The only place we
saw a 100ms improvement was between 32 - -Xmx=64GB.
Thanks
Anria
--
View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by Toke Eskildsen <te...@statsbiblioteket.dk>.
Anria B. <an...@yahoo.com> wrote:
> Schema investigations : the &fq are frequently on Multivalued string
f> ields, and we believe that it may also be slowing down the &Fq even more,
> but we were wondering why. When we run &fq on single valued fields its
> faster than the multi-valued fields, even when the multi-valued fields
> frequently have only a single value in it.
To my knowledge there should not be a difference per se. In both cases the underlying lookup structure is term->docIDs. Could it be that there are just more terms in your multi-valued fields or that they match more documents?
- Toke Eskildsen
Re: &fq degrades qtime in a 20million doc collection
Posted by "Anria B." <an...@yahoo.com>.
hi Yonik
We definitely didn't overlook that q=* being a wildcard scan, we just had so
many systemic problems to focus on I neglected to thank Shawn for that
particular piece of useful information.
I must admit, I seriously never knew this. Ever since q=* was allowed I was
so happy that it never occurred to me to investigate its details. Now I
know :)
Combining all the information from everybody here really brought home where
our shortcomings were
1. yes, the q=* was quickly replaced by q=*:* everywhere - quick win
2. caching strategies are being reformed
3. We're looking into making smaller shards / cores since we do require
super frequent commits, so on smaller bitsets the commit times should be way
less, and we can use the smaller heap sizes to stay optimized in that realm
One last question though please :
Schema investigations : the &fq are frequently on Multivalued string
fields, and we believe that it may also be slowing down the &Fq even more,
but we were wondering why. When we run &fq on single valued fields its
faster than the multi-valued fields, even when the multi-valued fields
frequently have only a single value in it.
Thanks again for everybody's help and pointers and hints, you kept us busy
with changing our mindset on a lot of things here.
Regards
Anria
--
View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4251212.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by Yonik Seeley <ys...@gmail.com>.
On Wed, Jan 13, 2016 at 7:01 PM, Shawn Heisey <ap...@elyograg.org> wrote:
[...]
>> 2. q=*&fq=someField:SomeVal ---> takes 2.5 seconds
>> 3. q=someField:SomeVal --> 300ms
[...]
>>
>> have any of you encountered such a thing?
>> that FQ degrades query time by so much?
> A value of * for your query will be slow. This is a wildcard query.
Some of the responses in this thread led me to believe that the
important part of Shawn's original answer was overlooked.
Most likely "fq" was not slowing down the request, the additional
wildcard query "q=*" was.
-Yonik
Re: &fq degrades qtime in a 20million doc collection
Posted by Jack Krupansky <ja...@gmail.com>.
I recall a couple of previous discussions regarding some sort of
filter/field cache change in Lucene where they removed what had been an
optimization for Solr.
-- Jack Krupansky
On Wed, Jan 13, 2016 at 8:10 PM, Erick Erickson <er...@gmail.com>
wrote:
> It's quite surprising that you're getting this kind of query
> degradation by adding an "fq" clause
> unless something's really out of whack on the setup. How much memory
> are you giving
> the JVM? Are you autowarming? Are you indexing while this is going on,
> and if what are
> your commit parameters? If you add &debug=true to your query, one of
> the returned sections
> will be "timings" for the various components of a query measured in
> milliseconds. Occasionally
> there will be surprises in there.
>
> What are you measuring when you say it takes seconds? The time to
> render the result page or
> are you looking at the QTime parameter of the return packet?
>
> Best,
> Erick
>
> On Wed, Jan 13, 2016 at 4:27 PM, Anria B. <an...@yahoo.com> wrote:
> > hi Shawn
> >
> > Thanks for the quick answer. As for the q=*, we also saw similar
> results
> > in our testing when doing things like
> >
> > q=somefield:qval
> > &fq=otherfield:fqval
> >
> > Which makes a pure Lucene query. I simplified things somewhat since our
> > results were always that as numFound got large, the query time degraded
> as
> > soon as we added any &fq in the mix.
> >
> > We also saw similar results for queries like
> >
> > q=query stuff
> > &defType=edismax
> > &df=afield
> > &qf=afield bfield cfield
> >
> >
> > So the query structure was not what created the 3-7 second query time, it
> > was always a correlation between is &fq in the query, and what is the
> > numFound. We've run numerous load tests for bringing in good query with
> fq
> > values in the "newSearcher", caches on, caches off ... this same
> > phenomenon persisted.
> >
> > As for Tomcat, it's an easy enough test to run it in Jetty. We will sure
> > try that! GC we've had default and G1 setups.
> >
> > Thanks for giving us something to think about
> >
> > Anria
> >
> >
> >
> > --
> > View this message in context:
> http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4250600.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: &fq degrades qtime in a 20million doc collection
Posted by Erick Erickson <er...@gmail.com>.
It's quite surprising that you're getting this kind of query
degradation by adding an "fq" clause
unless something's really out of whack on the setup. How much memory
are you giving
the JVM? Are you autowarming? Are you indexing while this is going on,
and if what are
your commit parameters? If you add &debug=true to your query, one of
the returned sections
will be "timings" for the various components of a query measured in
milliseconds. Occasionally
there will be surprises in there.
What are you measuring when you say it takes seconds? The time to
render the result page or
are you looking at the QTime parameter of the return packet?
Best,
Erick
On Wed, Jan 13, 2016 at 4:27 PM, Anria B. <an...@yahoo.com> wrote:
> hi Shawn
>
> Thanks for the quick answer. As for the q=*, we also saw similar results
> in our testing when doing things like
>
> q=somefield:qval
> &fq=otherfield:fqval
>
> Which makes a pure Lucene query. I simplified things somewhat since our
> results were always that as numFound got large, the query time degraded as
> soon as we added any &fq in the mix.
>
> We also saw similar results for queries like
>
> q=query stuff
> &defType=edismax
> &df=afield
> &qf=afield bfield cfield
>
>
> So the query structure was not what created the 3-7 second query time, it
> was always a correlation between is &fq in the query, and what is the
> numFound. We've run numerous load tests for bringing in good query with fq
> values in the "newSearcher", caches on, caches off ... this same
> phenomenon persisted.
>
> As for Tomcat, it's an easy enough test to run it in Jetty. We will sure
> try that! GC we've had default and G1 setups.
>
> Thanks for giving us something to think about
>
> Anria
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4250600.html
> Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by "Anria B." <an...@yahoo.com>.
hi Shawn
Thanks for the quick answer. As for the q=*, we also saw similar results
in our testing when doing things like
q=somefield:qval
&fq=otherfield:fqval
Which makes a pure Lucene query. I simplified things somewhat since our
results were always that as numFound got large, the query time degraded as
soon as we added any &fq in the mix.
We also saw similar results for queries like
q=query stuff
&defType=edismax
&df=afield
&qf=afield bfield cfield
So the query structure was not what created the 3-7 second query time, it
was always a correlation between is &fq in the query, and what is the
numFound. We've run numerous load tests for bringing in good query with fq
values in the "newSearcher", caches on, caches off ... this same
phenomenon persisted.
As for Tomcat, it's an easy enough test to run it in Jetty. We will sure
try that! GC we've had default and G1 setups.
Thanks for giving us something to think about
Anria
--
View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4250600.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/13/2016 3:01 PM, Anria B. wrote:
> I have a Really fun question to ask. I'm sitting here looking at what is by
> far the beefiest box I've ever seen in my life. 256GB of RAM, extreme
> TerraBytes of disc space, the works. Linux server properly partitioned
>
> Yet, what we are seeing goes against all intuition I've built up in the Solr
> world
>
> 1. Collection has 20-30 million docs.
> 2. q=*&fq=someField:SomeVal ---> takes 2.5 seconds
> 3. q=someField:SomeVal --> 300ms
> 4. as numFound -> infinity, qtime -> infinity.
>
> have any of you encountered such a thing?
>
> that FQ degrades query time by so much?
>
> it's pure Solr 5.3.1. ZK + Tomcat 8 + 1shard in solr. JDK_8u60 All
> running on this same box.
A value of * for your query will be slow. This is a wildcard query.
Under the covers, what happens is that Lucene looks up every possible
value in your default field and then does a query for every single one
of those terms. In an index with 20-30 million documents, this could be
billions of terms. If you want to query for all documents, do a query
for *:* (star colon star) -- this is a special query string that
literally means "all documents." It *looks* like it might mean "all
values in all fields" but it's far more specific than that.
Are you saying that you are running Solr 5.3.1 under Tomcat 8? If so,
this is likely going to be an issue. The Jetty that's included with
this version is properly tuned for Solr, and the bin/solr start script
will set up good garbage collection tuning. Running in another
container is almost always a mistake.
Thanks,
Shawn
Re: &fq degrades qtime in a 20million doc collection
Posted by Toke Eskildsen <te...@statsbiblioteket.dk>.
Anria B. <an...@yahoo.com> wrote:
> Thanks Toke for this. It gave us a ton to think about, and it really helps
> supporting the notion of several smaller indexes over one very large one,>
> where we can rather distribute a few JVM processes with less size each, than
> have one massive one that is according to this, less efficient.
There are not many clear-cut answers in Solr land...
There is a fixed overhead to running a Solr instance and you need to have some wriggle room in the heap for temporary peaks, such as index updates. This calls for a few or only a single Solr instance handling multiple collections.
On the other hand, large Java heaps are prone to long stop-the-World garbage collections and there is the memory overhead when exceeding 32GB.
Locally we run 50 Solr instances with 8GB heap each, each holding a single shard. At some point I would like to try changing this to 25 instances with 15GB and 2 shards or maybe 12 instances with 28GB and 4 shards. I will not exceed 31GB in a single JVM unless forced to.
- Toke Eskildsen
Re: &fq degrades qtime in a 20million doc collection
Posted by "Anria B." <an...@yahoo.com>.
Thanks Toke for this. It gave us a ton to think about, and it really helps
supporting the notion of several smaller indexes over one very large one,
where we can rather distribute a few JVM processes with less size each, than
have one massive one that is according to this, less efficient.
Toke Eskildsen wrote
> I would guess the 100 ms improvement was due to a factor not related to
> heap size. With the exception of a situation where the heap is nearly
> full, increasing Xmx will not improve Solr performance significantly.
>
> Quick note: Never set Xmx in the range 32GB-40GB (40GB is approximate):
> At the 32GB point, the JVM switches to larger pointers, which means that
> effective heap space is _smaller_ for Xmx=33GB than it is for Xmx=31GB:
> https://blog.codecentric.de/en/2014/02/35gb-heap-less-32gb-java-jvm-memory-oddities/
>
> - Toke Eskildsen, State and University Library, Denmark
--
View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4251176.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/14/2016 1:01 PM, Anria B. wrote:
> Here is a stacktrace of when we put a &fq in the autowarming, or in the
> "newSearcher" to warm up the collection after a commit.
<snip>
> org.apache.solr.core.SolrCore - org.apache.solr.common.SolrException: Error
> opening new searcher. exceeded limit of maxWarmingSearchers=10, try again
This message means that you are doing repeated commits faster than the
amount of time that it takes for the previous commit to finish. It
looks like you've increased the maxWarmingSearchers value ... which will
usually make any performance problem even worse.
Warming the caches takes time, and must be done on every commit.
Your commit frequency should allow one commit to completely finish
before doing another one.
Thanks,
Shawn
Re: &fq degrades qtime in a 20million doc collection
Posted by "Anria B." <an...@yahoo.com>.
Here is a stacktrace of when we put a &fq in the autowarming, or in the
"newSearcher" to warm up the collection after a commit.
2016-01-12 19:00:13,216 [http-nio-19082-exec-25
vaultThreadId:http-STAGE-30518-14 vaultSessionId:1E53A095AD22704
vaultNodeId:nodeId:node-2 vaultInstanceId:2228 vaultUserId:9802] INFO
org.apache.solr.update.UpdateHandler - start
commit{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=true,prepareCommit=false}
2016-01-12 19:00:13,217 [http-nio-19082-exec-25
vaultThreadId:http-STAGE-30518-14 vaultSessionId:1E53A095AD22704
vaultNodeId:nodeId:node-2 vaultInstanceId:2228 vaultUserId:9802] WARN
org.apache.solr.core.SolrCore - [instance_2228] Error opening new searcher.
exceeded limit of maxWarmingSearchers=10, try again later.
2016-01-12 19:00:13,217 [http-nio-19082-exec-25
vaultThreadId:http-STAGE-30518-14 vaultSessionId:1E53A095AD22704
vaultNodeId:nodeId:node-2 vaultInstanceId:2228 vaultUserId:9802] INFO
org.apache.solr.update.processor.LogUpdateProcessor - [instance_2228]
webapp=/solr path=/update
params={waitSearcher=true&commit=true&softCommit=true&wt=javabin&version=2}
{} 0 0
2016-01-12 19:00:13,217 [http-nio-19082-exec-25
vaultThreadId:http-STAGE-30518-14 vaultSessionId:1E53A095AD22704
vaultNodeId:nodeId:node-2 vaultInstanceId:2228 vaultUserId:9802] ERROR
org.apache.solr.core.SolrCore - org.apache.solr.common.SolrException: Error
opening new searcher. exceeded limit of maxWarmingSearchers=10, try again
later.
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1759)
at
org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:609)
at
org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:95)
at
org.apache.solr.update.processor.UpdateRequestProcessor.processCommit(UpdateRequestProcessor.java:64)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalCommit(DistributedUpdateProcessor.java:1635)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(DistributedUpdateProcessor.java:1612)
at
org.apache.solr.update.processor.LogUpdateProcessor.processCommit(LogUpdateProcessorFactory.java:161)
at
org.apache.solr.handler.RequestHandlerUtils.handleCommit(RequestHandlerUtils.java:69)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2068)
at
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:669)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:462)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:214)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
at
veeva.ecm.common.interfaces.web.SolrDispatchOverride.doFilter(SolrDispatchOverride.java:44)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
--
View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4250836.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by "Anria B." <an...@yahoo.com>.
hi Shawn
Thanks for your comprehensive answers. I really appreciate it. Just for
clarity, the numbers I posted here were from tests that we isolated only one
single fq and a q. These do have good times, even though its almost 600ms.
Once we are in application mode, and other fq's and facets etc are added,
query times go as bad as 7 seconds (which I personally observed).
But you did give us a lot to work with, especially I think in the arena of
commit strategies and cache usage. We'll do some more tests with different
strategies in this area.
Thanks
Anria
--
View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4250855.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/14/2016 12:07 PM, Anria B. wrote:
> Here are some Actual examples, if it helps
>
> wt=json&q=*:*&indent=on&fq=SolrDocumentType:"invalidValue"&fl=timestamp&rows=0&start=0&debug=timing
<snip>
> "QTime": 590,
<snip>
> Now we wipe out all caches, and put the filter in q.
>
> wt=json&q=SolrDocumentType:"invalidValue"&indent=on&fl=timestamp&rows=0&start=0&debug=timing
<snip>
> "QTime": 266,
For uncached queries on an index with 20+ million documents that takes
up 121GB of disk space, these are pretty good times.
When the query is not cached, a filter query will *always* be slower
than the same thing in the q parameter. The reason for this is very
simple -- the *result* of a filter query is a bitset where every
document in the index is represented, with a zero for no match and a one
for a match. Solr must touch every single document in the index
(including deleted documents) to build this bitset. The bitset for a 20
million document index is 2.5 million bytes long. This bitset is what
gets put into the filterCache.
When a query is in the q parameter, there are shortcuts in Lucene that
Solr uses to find *only* the number of results requested in the rows
parameter, so it takes less time.
Filter queries are *lightning* fast when they are cached, because Solr
does not need to do the work of checking every document in the index to
see if it's in the result list. That is the reason that you will
commonly see advice to move things from q to fq ... but that advice
should only be followed if you expect filters to be re-used often enough
to result in cache hits.
Thanks,
Shawn
Re: &fq degrades qtime in a 20million doc collection
Posted by "Anria B." <an...@yahoo.com>.
Here are some Actual examples, if it helps
wt=json&q=*:*&indent=on&fq=SolrDocumentType:"invalidValue"&fl=timestamp&rows=0&start=0&debug=timing
{
"responseHeader": {
"status": 0,
"QTime": 590,
"params": {
"q": "*:*",
"debug": "timing",
"indent": "on",
"fl": "timestamp",
"start": "0",
"fq": "SolrDocumentType:\"invalidValue\"",
"rows": "0",
"wt": "json"
}
},
"response": {
"numFound": 22916435,
"start": 0,
"docs": []
},
"debug": {
"timing": {
"time": 590,
"prepare": {
"time": 0,
"query": {
"time": 0
},
"facet": {
"time": 0
},
"mlt": {
"time": 0
},
"highlight": {
"time": 0
},
"stats": {
"time": 0
},
"debug": {
"time": 0
}
},
"process": {
"time": 590,
"query": {
"time": 590
},
"facet": {
"time": 0
},
"mlt": {
"time": 0
},
"highlight": {
"time": 0
},
"stats": {
"time": 0
},
"debug": {
"time": 0
}
}
}
}
}
Now we wipe out all caches, and put the filter in q.
wt=json&q=SolrDocumentType:"invalidValue"&indent=on&fl=timestamp&rows=0&start=0&debug=timing
{
"responseHeader": {
"status": 0,
"QTime": 266,
"params": {
"q": "SolrDocumentType:\"invalidValue\"",
"debug": "timing",
"indent": "on",
"fl": "timestamp",
"start": "0",
"rows": "0",
"wt": "json"
}
},
"response": {
"numFound": 22916435,
"start": 0,
"docs": []
},
"debug": {
"timing": {
"time": 266,
"prepare": {
"time": 0,
"query": {
"time": 0
},
"facet": {
"time": 0
},
"mlt": {
"time": 0
},
"highlight": {
"time": 0
},
"stats": {
"time": 0
},
"debug": {
"time": 0
}
},
"process": {
"time": 266,
"query": {
"time": 266
},
"facet": {
"time": 0
},
"mlt": {
"time": 0
},
"highlight": {
"time": 0
},
"stats": {
"time": 0
},
"debug": {
"time": 0
}
}
}
}
}
--
View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4250823.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by "Anria B." <an...@yahoo.com>.
hi all,
We did try the q=queryA AND queryB, vs q=queryA&fq=queryB. For all tests,
we commented out caching, and reload core between queries to be ultra sure
that we are getting good comps on time.
we have so many unique Fq and such frequent commits that caches are always
invalidated, so our tests for the most part were with caches all commented
out. Further, we have seen some gains in using an autoCommit strategy of
10 or 15 seconds, but still the first queries are horrible.
Also, we tried to set some of these &fq in the "newSearcher" so that it
warms at least an OS caches once before registering the Searcher as
available.
The index size is around 121GB. So it's just outside of Modest size, but
not yet unacceptable range. THe docs are all modest in content. Small
pieces of content, mostly strings, think Metadata of PDF files for the most
part. not even the OCR content of them, just great well defined metadata.
[quote]
How much memory are you giving the JVM? Are you autowarming? Are you
indexing while this is going on, and if what are your commit parameters? If
you add &debug=true to your query, one of
the returned sections
[/quote]
We tried with several sizes of heap, the gains were minimal. Above that no
gain.
If we use autowarming in either filterCache or NewSearcher query, the query
takes too long, then several newsearcher classes get created and we start
seeing maximum newSearcher exceeded errors
It's by using &debug=true and &debug=timing that we isolated this. the
Query time took the longest. Sometimes Prepare takes a little time too.
Forget it if we add a facet that adds another 500+ ms at the low end ...
Very perplexing and fun challenge. Thank Toke for that info on the heap
size pointers, we will dial it down on the Heap size
Anria
--
View this message in context: http://lucene.472066.n3.nabble.com/fq-degrades-qtime-in-a-20million-doc-collection-tp4250567p4250798.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: &fq degrades qtime in a 20million doc collection
Posted by Jack Krupansky <ja...@gmail.com>.
That sounds like it. Sorry my memory is so hazy.
Maybe Yonik can either confirm that that Jira is still outstanding or close
it, and confirm if these symptoms are related.
-- Jack Krupansky
On Thu, Jan 14, 2016 at 10:54 AM, Erick Erickson <er...@gmail.com>
wrote:
> Jack:
>
> I think that was for faceting? SOLR-8096 maybe?
>
>
> On Thu, Jan 14, 2016 at 12:25 AM, Toke Eskildsen <te...@statsbiblioteket.dk>
> wrote:
> > On Wed, 2016-01-13 at 15:01 -0700, Anria B. wrote:
> >
> > [256GB RAM]
> >
> >> 1. Collection has 20-30 million docs.
> >
> > Just for completeness: How large is the collection in bytes?
> >
> >> 2. q=*&fq=someField:SomeVal ---> takes 2.5 seconds
> >> 3. q=someField:SomeVal --> 300ms
> >> 4. as numFound -> infinity, qtime -> infinity.
> >
> > What are you doing besides the q + fq above? Assuming a modest size
> > index (let's say < 100GB), even 300ms for a simple key:value query is a
> > long time. Usual culprits for performance problems when result set size
> > grows are high values for rows, grouping and faceting.
> >
> > Could you experiment with
> > q=queryA&fq=queryB
> > vs
> > q=queryA AND queryB
> > to make sure that is is not the underlying queries themselves that
> > causes the slowdown?
> >
> > Also, could you check the speed of the first request for
> > q=queryA&fq=queryB
> > vs subsequent requests (you might need to set the queryResultCache to
> > zero to force a re-calculation of the result set), to see whether is is
> > the creation of the fq result set or the intersection calculation that
> > is slow?
> >
> >> We have already tested different autoCommit strategies, and different
> values
> >> for heap size, starting at 16GB, 32GB, 64GB, 128GB ... The only
> place we
> >> saw a 100ms improvement was between 32 - -Xmx=64GB.
> >
> > I would guess the 100 ms improvement was due to a factor not related to
> > heap size. With the exception of a situation where the heap is nearly
> > full, increasing Xmx will not improve Solr performance significantly.
> >
> > Quick note: Never set Xmx in the range 32GB-40GB (40GB is approximate):
> > At the 32GB point, the JVM switches to larger pointers, which means that
> > effective heap space is _smaller_ for Xmx=33GB than it is for Xmx=31GB:
> >
> https://blog.codecentric.de/en/2014/02/35gb-heap-less-32gb-java-jvm-memory-oddities/
> >
> > - Toke Eskildsen, State and University Library, Denmark
> >
> >
>
Re: &fq degrades qtime in a 20million doc collection
Posted by Erick Erickson <er...@gmail.com>.
Jack:
I think that was for faceting? SOLR-8096 maybe?
On Thu, Jan 14, 2016 at 12:25 AM, Toke Eskildsen <te...@statsbiblioteket.dk> wrote:
> On Wed, 2016-01-13 at 15:01 -0700, Anria B. wrote:
>
> [256GB RAM]
>
>> 1. Collection has 20-30 million docs.
>
> Just for completeness: How large is the collection in bytes?
>
>> 2. q=*&fq=someField:SomeVal ---> takes 2.5 seconds
>> 3. q=someField:SomeVal --> 300ms
>> 4. as numFound -> infinity, qtime -> infinity.
>
> What are you doing besides the q + fq above? Assuming a modest size
> index (let's say < 100GB), even 300ms for a simple key:value query is a
> long time. Usual culprits for performance problems when result set size
> grows are high values for rows, grouping and faceting.
>
> Could you experiment with
> q=queryA&fq=queryB
> vs
> q=queryA AND queryB
> to make sure that is is not the underlying queries themselves that
> causes the slowdown?
>
> Also, could you check the speed of the first request for
> q=queryA&fq=queryB
> vs subsequent requests (you might need to set the queryResultCache to
> zero to force a re-calculation of the result set), to see whether is is
> the creation of the fq result set or the intersection calculation that
> is slow?
>
>> We have already tested different autoCommit strategies, and different values
>> for heap size, starting at 16GB, 32GB, 64GB, 128GB ... The only place we
>> saw a 100ms improvement was between 32 - -Xmx=64GB.
>
> I would guess the 100 ms improvement was due to a factor not related to
> heap size. With the exception of a situation where the heap is nearly
> full, increasing Xmx will not improve Solr performance significantly.
>
> Quick note: Never set Xmx in the range 32GB-40GB (40GB is approximate):
> At the 32GB point, the JVM switches to larger pointers, which means that
> effective heap space is _smaller_ for Xmx=33GB than it is for Xmx=31GB:
> https://blog.codecentric.de/en/2014/02/35gb-heap-less-32gb-java-jvm-memory-oddities/
>
> - Toke Eskildsen, State and University Library, Denmark
>
>
Re: &fq degrades qtime in a 20million doc collection
Posted by Toke Eskildsen <te...@statsbiblioteket.dk>.
On Wed, 2016-01-13 at 15:01 -0700, Anria B. wrote:
[256GB RAM]
> 1. Collection has 20-30 million docs.
Just for completeness: How large is the collection in bytes?
> 2. q=*&fq=someField:SomeVal ---> takes 2.5 seconds
> 3. q=someField:SomeVal --> 300ms
> 4. as numFound -> infinity, qtime -> infinity.
What are you doing besides the q + fq above? Assuming a modest size
index (let's say < 100GB), even 300ms for a simple key:value query is a
long time. Usual culprits for performance problems when result set size
grows are high values for rows, grouping and faceting.
Could you experiment with
q=queryA&fq=queryB
vs
q=queryA AND queryB
to make sure that is is not the underlying queries themselves that
causes the slowdown?
Also, could you check the speed of the first request for
q=queryA&fq=queryB
vs subsequent requests (you might need to set the queryResultCache to
zero to force a re-calculation of the result set), to see whether is is
the creation of the fq result set or the intersection calculation that
is slow?
> We have already tested different autoCommit strategies, and different values
> for heap size, starting at 16GB, 32GB, 64GB, 128GB ... The only place we
> saw a 100ms improvement was between 32 - -Xmx=64GB.
I would guess the 100 ms improvement was due to a factor not related to
heap size. With the exception of a situation where the heap is nearly
full, increasing Xmx will not improve Solr performance significantly.
Quick note: Never set Xmx in the range 32GB-40GB (40GB is approximate):
At the 32GB point, the JVM switches to larger pointers, which means that
effective heap space is _smaller_ for Xmx=33GB than it is for Xmx=31GB:
https://blog.codecentric.de/en/2014/02/35gb-heap-less-32gb-java-jvm-memory-oddities/
- Toke Eskildsen, State and University Library, Denmark