Solr CPU usage

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr CPU usage

Александр Шестак

Hi, I have a question about unpredictable CPU usage by solr.

We have recently migrated our application from Solr 4.6.1 to Solr 7.1.0. We use master/slave approach. And now we have noticed that CPU usage of master/slave in passive state (no request to Solr are performed) is none zero. When we use Solr 4.6.1 and use tomcat for Solr deploying then CPU usage is almost 0. With Solr 7.1.0 cpu usage is varying from 0% to 40% (it jumps every time).


Is it normal behavior for Solr and jetty?

I have tried to analyze this situation by Java VisualVM.

Solr Master CPU usage looks in next way


Master spend most of time in some jetty method


Solr Slave CPU usage looks in next way






All this screenshots were made when there is no any activity with solr performed (solr just was started and no requests to it were performed)

Reply | Threaded
Open this post in threaded view
|

Re: Solr CPU usage

Shawn Heisey-2
On 5/16/2018 7:11 AM, Александр Шестак wrote:

>
> Hi, I have a question about unpredictable CPU usage by solr.
>
> We have recently migrated our application from Solr 4.6.1 to Solr
> 7.1.0. We use master/slave approach. And now we have noticed that CPU
> usage of master/slave in passive state (no request to Solr are
> performed) is none zero. When we use Solr 4.6.1 and use tomcat for
> Solr deploying then CPU usage is almost 0. With Solr 7.1.0 cpu usage
> is varying from 0% to 40% (it jumps every time).
>

The information you've obtained about where the CPU time is spent shows
that your master server is spending its CPU time in Jetty code, not Solr
code.  I do not know why.  Because it's code not written by this
project, there may not be much we can do about it, other than encourage
you to upgrade Solr so that you have a newer version of Jetty.  Version
7.1.0 has Jetty 9.3.20, but 7.3.0 and 7.3.1 have Jetty 9.4.8.

The slave appears to be spending time in Lucene's merge code.  Which is
very odd ... merging should normally happen on the master, usually not
on slaves.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: Solr CPU usage

Deepak Goel
In reply to this post by Александр Шестак
How many CPU's do you have in master/slave?

The graphs shown by you are for 'a single CPU' or 'All the CPU'?



Deepak
"The greatness of a nation can be judged by the way its animals are treated. Please stop cruelty to Animals, become a Vegan"


"Plant a Tree, Go Green"


On Wed, May 16, 2018 at 6:41 PM, Александр Шестак <[hidden email]> wrote:

Hi, I have a question about unpredictable CPU usage by solr.

We have recently migrated our application from Solr 4.6.1 to Solr 7.1.0. We use master/slave approach. And now we have noticed that CPU usage of master/slave in passive state (no request to Solr are performed) is none zero. When we use Solr 4.6.1 and use tomcat for Solr deploying then CPU usage is almost 0. With Solr 7.1.0 cpu usage is varying from 0% to 40% (it jumps every time).


Is it normal behavior for Solr and jetty?

I have tried to analyze this situation by Java VisualVM.

Solr Master CPU usage looks in next way


Master spend most of time in some jetty method


Solr Slave CPU usage looks in next way






All this screenshots were made when there is no any activity with solr performed (solr just was started and no requests to it were performed)


Reply | Threaded
Open this post in threaded view
|

Re[2]: Solr CPU usage

Александр Шестак

Master/slave are working on single computer with Intel Core i5 3.2GHz (it is 4 cores).

It is standard visualVm ui with CPU usage. I think that it show overall CPU usage (for all cores).

>Среда, 16 мая 2018, 17:42 +03:00 от Deepak Goel <[hidden email]>:
>
>How many CPU's do you have in master/slave?
>
>The graphs shown by you are for 'a single CPU' or 'All the CPU'?
>
>
>
>Deepak
>" The greatness of a nation can be judged by the way its animals are treated.  Please stop cruelty to Animals, become a Vegan"
>
>+91 73500 12833
>[hidden email]
>
>Facebook:  https://www.facebook.com/deicool
>LinkedIn:  www.linkedin.com/in/deicool
>
>"Plant a Tree, Go Green"
>
>Make In India :  http://www.makeinindia.com/home
>
>On Wed, May 16, 2018 at 6:41 PM, Александр Шестак  < [hidden email] > wrote:
>>Hi, I have a question about unpredictable CPU usage by solr.
>>We have recently migrated our application from Solr 4.6.1 to Solr 7.1.0. We use master/slave approach. And now we have noticed that CPU usage of master/slave in passive state (no request to Solr are performed) is none zero. When we use Solr 4.6.1 and use tomcat for Solr deploying then CPU usage is almost 0. With Solr 7.1.0 cpu usage is varying from 0% to 40% (it jumps every time).
>>
>>Is it normal behavior for Solr and jetty?
>>I have tried to analyze this situation by Java VisualVM.
>>Solr Master CPU usage looks in next way
>>
>>Master spend most of time in some jetty method
>>
>>Solr Slave CPU usage looks in next way
>>
>>
>>
>>
>>
>>All this screenshots were made when there is no any activity with solr performed (solr just was started and no requests to it were performed)
>



Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: Solr CPU usage

Deepak Goel
1. Are you using two VM's on the same machine?

2. Why are the CPU usage graphs different (during the same time interval
15.40-16.00)? The master and slave are on the same computer, right?

3. The cpu utilised in the method graph is very less as compared to the
time interval shown in the cpu usage graph. Are there any other processes
running on the computer?


I have not used visualvm so its a bit confusing for me (I will have to
download and try it out)



Deepak
"The greatness of a nation can be judged by the way its animals are
treated. Please stop cruelty to Animals, become a Vegan"

+91 73500 12833
[hidden email]

Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool

"Plant a Tree, Go Green"

Make In India : http://www.makeinindia.com/home

On Wed, May 16, 2018 at 8:28 PM, Александр Шестак <
[hidden email]> wrote:

>
> Master/slave are working on single computer with Intel Core i5 3.2GHz (it
> is 4 cores).
>
> It is standard visualVm ui with CPU usage. I think that it show overall
> CPU usage (for all cores).
> >Среда, 16 мая 2018, 17:42 +03:00 от Deepak Goel <[hidden email]>:
> >
> >How many CPU's do you have in master/slave?
> >
> >The graphs shown by you are for 'a single CPU' or 'All the CPU'?
> >
> >
> >
> >Deepak
> >" The greatness of a nation can be judged by the way its animals are
> treated.  Please stop cruelty to Animals, become a Vegan"
> >
> >+91 73500 12833
> >[hidden email]
> >
> >Facebook:  https://www.facebook.com/deicool
> >LinkedIn:  www.linkedin.com/in/deicool
> >
> >"Plant a Tree, Go Green"
> >
> >Make In India :  http://www.makeinindia.com/home
> >
> >On Wed, May 16, 2018 at 6:41 PM, Александр Шестак  <
> [hidden email] > wrote:
> >>Hi, I have a question about unpredictable CPU usage by solr.
> >>We have recently migrated our application from Solr 4.6.1 to Solr 7.1.0.
> We use master/slave approach. And now we have noticed that CPU usage of
> master/slave in passive state (no request to Solr are performed) is none
> zero. When we use Solr 4.6.1 and use tomcat for Solr deploying then CPU
> usage is almost 0. With Solr 7.1.0 cpu usage is varying from 0% to 40% (it
> jumps every time).
> >>
> >>Is it normal behavior for Solr and jetty?
> >>I have tried to analyze this situation by Java VisualVM.
> >>Solr Master CPU usage looks in next way
> >>
> >>Master spend most of time in some jetty method
> >>
> >>Solr Slave CPU usage looks in next way
> >>
> >>
> >>
> >>
> >>
> >>All this screenshots were made when there is no any activity with solr
> performed (solr just was started and no requests to it were performed)
> >
>
>
>
>