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 Otis Gospodnetic <ot...@gmail.com> on 2013/11/16 09:28:21 UTC

Parallelizing warmup queries

Hi,

It looks like warmup queries execute sequentially.

Considering servers have N CPU cores these days, would it make sense
to make them (optionally) run in parallel?  This should help with
cases where warmup queries are CPU bound by letting Solr use more than
1 thread and thus more than 1 CPU core.  Should I add to JIRA?

Thanks,
Otis
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/

Re: Parallelizing warmup queries

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

You'd use something like SPM for Solr
(http://sematext.com/spm/solr-performance-monitoring/) and correlate
(long) warmup times with CPU usage on an N-core system and when you
see the CPU go up during warmup, but not quite "all the way" then, I
believe, you should be able to say "Hm, the CPUs are not maxed out
because they are not all being used during warmup and my warmup is
taking M minutes.  If only I could make use of all my N CPUs in
parallel and cut down M (maybe by M/N, but not necessarily - depends
on how expensive is each warmup query)."

You should be able to see this well with `top' as well.

Otis
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/


On Sat, Nov 16, 2013 at 4:15 AM, Saar Carmi <sa...@gmail.com> wrote:
> Otis,
> This raises a newbie question -
> How would one know what query is 1-CPU bounded and what is multi-threaded?
>
> Saar
>
>
>
> On Sat, Nov 16, 2013 at 10:28 AM, Otis Gospodnetic <
> otis.gospodnetic@gmail.com> wrote:
>
>> Hi,
>>
>> It looks like warmup queries execute sequentially.
>>
>> Considering servers have N CPU cores these days, would it make sense
>> to make them (optionally) run in parallel?  This should help with
>> cases where warmup queries are CPU bound by letting Solr use more than
>> 1 thread and thus more than 1 CPU core.  Should I add to JIRA?
>>
>> Thanks,
>> Otis
>> --
>> Performance Monitoring * Log Analytics * Search Analytics
>> Solr & Elasticsearch Support * http://sematext.com/
>>
>
>
>
> --
> Saar Carmi
>
> Mobile: 054-7782417
> Email: saarcarmi@gmail.com

Re: Parallelizing warmup queries

Posted by Saar Carmi <sa...@gmail.com>.
Otis,
This raises a newbie question -
How would one know what query is 1-CPU bounded and what is multi-threaded?

Saar



On Sat, Nov 16, 2013 at 10:28 AM, Otis Gospodnetic <
otis.gospodnetic@gmail.com> wrote:

> Hi,
>
> It looks like warmup queries execute sequentially.
>
> Considering servers have N CPU cores these days, would it make sense
> to make them (optionally) run in parallel?  This should help with
> cases where warmup queries are CPU bound by letting Solr use more than
> 1 thread and thus more than 1 CPU core.  Should I add to JIRA?
>
> Thanks,
> Otis
> --
> Performance Monitoring * Log Analytics * Search Analytics
> Solr & Elasticsearch Support * http://sematext.com/
>



-- 
Saar Carmi

Mobile: 054-7782417
Email: saarcarmi@gmail.com

Re: Parallelizing warmup queries

Posted by Chris Hostetter <ho...@fucit.org>.
: It looks like warmup queries execute sequentially.
: 
: Considering servers have N CPU cores these days, would it make sense
: to make them (optionally) run in parallel?  This should help with
: cases where warmup queries are CPU bound by letting Solr use more than
: 1 thread and thus more than 1 CPU core.  Should I add to JIRA?

It's something we've talked about before, so there may already be one.

One reason it's never been super high on my priority list: in the 
newSearcher case, where you are actively serving "live" searches against 
the old searcher, you probably don't want to risk CPU contention by 
spinning up a bunch of new threads to hammer the newSearcher with warming 
queries.

the main place parallelized warming queries would be handy is on 
firstSearcher -- but since server startup / core reload should be a 
fairly low occurance situation in a production deployment , there 
were always bigger fish to fry in terms of improving solr.


-Hoss