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 Andrii Berezhynskyi <an...@home24.de> on 2015/10/28 17:27:17 UTC

solr 5.3.0 master-slave: TWO segments after optimize

Hi all!

We have master-slave configuration. Slaves are replicated on optimize.
Sometimes (not always) it happens that slave has two segments after
replication. I always thought that optimize is all about having only one
segment in your read replica. During this time when slave has two segments
we are experiencing higher response time and higher CPU usage. Is it
somehow possible to prevent slave from having two segments in
slave-replicated-on-optimize configuration?

Segments info shows the following for these two segments:

Segment *_1kxw*:
#docs:
167 841
#dels:
161
size:
96 985 075 bytes
age:
2015-10-28T16:10:01.894Z
source:
merge

Segment *_1kxv*:
#docs:
160
#dels:
0
size:
270 075 bytes
age:
2015-10-28T16:10:07.897Z
source:
flush

Best regards,
Andrii

Re: solr 5.3.0 master-slave: TWO segments after optimize

Posted by Emir Arnautovic <em...@sematext.com>.
Hi Andrii,
Observed high CPU is on master or slave? If on slave, is it on all 
slaves? Can you do thread dump and see if what is running.

Based on numbers this seems like small index and one segment is flush 
with only 160 doc. Anyway, this is small and something is really wrong 
if you notice issues on this scale.

Thanks,
Emir

On 28.10.2015 17:27, Andrii Berezhynskyi wrote:
> Hi all!
>
> We have master-slave configuration. Slaves are replicated on optimize.
> Sometimes (not always) it happens that slave has two segments after
> replication. I always thought that optimize is all about having only one
> segment in your read replica. During this time when slave has two segments
> we are experiencing higher response time and higher CPU usage. Is it
> somehow possible to prevent slave from having two segments in
> slave-replicated-on-optimize configuration?
>
> Segments info shows the following for these two segments:
>
> Segment *_1kxw*:
> #docs:
> 167 841
> #dels:
> 161
> size:
> 96 985 075 bytes
> age:
> 2015-10-28T16:10:01.894Z
> source:
> merge
>
> Segment *_1kxv*:
> #docs:
> 160
> #dels:
> 0
> size:
> 270 075 bytes
> age:
> 2015-10-28T16:10:07.897Z
> source:
> flush
>
> Best regards,
> Andrii
>

-- 
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/


Re: solr 5.3.0 master-slave: TWO segments after optimize

Posted by Erick Erickson <er...@gmail.com>.
Hmmm, do the segments go away when you reload the slave? Or do they
hang around over even Solr restarts? If they're temporary then you may
be seeing them held by one searcher while another one warms up.

Best,
Erick

On Wed, Oct 28, 2015 at 9:27 AM, Andrii Berezhynskyi
<an...@home24.de> wrote:
> Hi all!
>
> We have master-slave configuration. Slaves are replicated on optimize.
> Sometimes (not always) it happens that slave has two segments after
> replication. I always thought that optimize is all about having only one
> segment in your read replica. During this time when slave has two segments
> we are experiencing higher response time and higher CPU usage. Is it
> somehow possible to prevent slave from having two segments in
> slave-replicated-on-optimize configuration?
>
> Segments info shows the following for these two segments:
>
> Segment *_1kxw*:
> #docs:
> 167 841
> #dels:
> 161
> size:
> 96 985 075 bytes
> age:
> 2015-10-28T16:10:01.894Z
> source:
> merge
>
> Segment *_1kxv*:
> #docs:
> 160
> #dels:
> 0
> size:
> 270 075 bytes
> age:
> 2015-10-28T16:10:07.897Z
> source:
> flush
>
> Best regards,
> Andrii

Re: solr 5.3.0 master-slave: TWO segments after optimize

Posted by Andrii Berezhynskyi <an...@home24.de>.
Erick, they are not going away after reload.

Emir, increased cpu and response time are on slaves. On all slaves. Here is
a thread dump
https://gist.github.com/andriiberezhynskyi/739d59cf78b043d653da (though not
sure that I did it right, I used jstack -F PID).

Thanks for your help!