On 10/18/21 10:03 AM, Andy Lester wrote:
I’m trying to figure out why my warming is taking so long. It’s taking about 20-40 seconds on average. Can I measure where it’s spending its time?
I do not know of any way to figure out which little parts of a massive query are the most time consuming. You could try doing the query manually with debug turned on and see whether the reported timings are useful. It might be that they are generally useful, but not for specifics.
What I would recommend is that (at a time when query traffic is lowest) you turn off all warming, restart, and then do some manual queries where you check each fq and facet individually. Rebooting or clearing the OS disk cache before each query test would give you worst-case information.
Initially you could just try removing all the facets or removing all the fqs to see where you need to spend your testing time.
I would personally remove all the fqs from the newSearcher config and let the filterCache autowarming take care of warming the most commonly used fq values. Leave them in the firstSearcher and configure solr to use a cold searcher. I am not sure whether autowarming can handle facets ... it seems unlikely to me.
You'll want to be sure that any field you're using for facets is configured with docValues, and reindex from scratch if you need to add that config. If you are using any TextField based fields for faceting, you won't be able to configure those with docValues. I should say that a field using TextField is probably a poor candidate for facets anyway, because the cardinality on such fields is usually very high. High cardinality makes for extremely slow facets.
And it will be exceedingly important that you have enough spare memory so the OS can cache the index data effectively, especially for facets.
I would bet on facets being the big trouble here. If you find that a few of the facets are major problems, you could remove those from your warming and advise your users that to improve general performance for the majority of users, changes were required that make those specific queries slow.
Thanks, Shawn