You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Bram Van Dam <br...@intix.eu> on 2016/05/01 20:04:05 UTC

Schedule merges during off-peak hours?

Hey folks,

Disclaimer: I haven't given this too much thought, so feel free to shoot
me down if this is a stupid idea.

We have a lot of Solr instances with a lot of different customers, and
most of them fit into a patterb of 9-5 searching and slow but steady
addition of documents 24/7, at a rate of about 10docs/second.

This means there's hardly any searching going on at night. This also
means that merges during the day can be a problem when indexes grow
large, especially with commit intervals of around one minute. This seems
wasteful, because the index doesn't grow *that* much larger during a
single working day.

I was wondering if it would be a good idea to create a MergePolicy that
only merges segments during off-peak hours (or maybe according to a
cron-style pattern or something).

Any thoughts?

Thanks,

 - Bram

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Schedule merges during off-peak hours?

Posted by Bram Van Dam <br...@intix.eu>.
On 02/05/16 16:04, Ryan Josal wrote:
> I don't have a comment on whether or not it makes sense to have schedule
> based merges, but I will say that search speed is impacted by segment
> count, and if you're indexing constantly all day long, it's possible
> that saving a merge until off peak hours may put more stress on your
> servers than doing the merge.  Also, are you merging down to one
> segment?  I found it to be a happy medium to merge down to 2 or 3 segments.

You're probably right about the stress. Might be worth merging down to 3
segments during peak hours and then down to 1 during off peak hours or
something like that.

Thanks for the feedback!


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Schedule merges during off-peak hours?

Posted by Ryan Josal <rj...@gmail.com>.
I don't have a comment on whether or not it makes sense to have schedule
based merges, but I will say that search speed is impacted by segment
count, and if you're indexing constantly all day long, it's possible that
saving a merge until off peak hours may put more stress on your servers
than doing the merge.  Also, are you merging down to one segment?  I found
it to be a happy medium to merge down to 2 or 3 segments.

Ryan

On Monday, May 2, 2016, Bram Van Dam <br...@intix.eu> wrote:

> On 02/05/16 06:45, Erick Erickson wrote:
> > If "commit intervals of around one minute" mean that you're taking 60
> > seconds for the commit to finish, then perhaps it's the opposite and
> > you're autowarming too much. I usually start my autowarm counts
> > around 16 or so for filterCache and queryResultCache...
>
> Hey Erick,
>
> I meant that a commit occurs every minute. Autowarming is disabled
> entirely, because with very frequent commits, searchers sometimes aren't
> used at all before another commit happens.
>
>  - Bram
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org <javascript:;>
> For additional commands, e-mail: dev-help@lucene.apache.org <javascript:;>
>
>

Re: Schedule merges during off-peak hours?

Posted by Bram Van Dam <br...@intix.eu>.
On 02/05/16 06:45, Erick Erickson wrote:
> If "commit intervals of around one minute" mean that you're taking 60
> seconds for the commit to finish, then perhaps it's the opposite and
> you're autowarming too much. I usually start my autowarm counts
> around 16 or so for filterCache and queryResultCache...

Hey Erick,

I meant that a commit occurs every minute. Autowarming is disabled
entirely, because with very frequent commits, searchers sometimes aren't
used at all before another commit happens.

 - Bram


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Schedule merges during off-peak hours?

Posted by Erick Erickson <er...@gmail.com>.
Bram:

I'd look at other reasons that merging impacts performance. The first
place I'd look would be frequency of commits and autowarming. My
suspicion is that what you're noticing.

If "commit intervals of around one minute" mean that you're taking 60
seconds for the commit to finish, then perhaps it's the opposite and
you're autowarming too much. I usually start my autowarm counts
around 16 or so for filterCache and queryResultCache...

FWIW,
Erick

On Sun, May 1, 2016 at 11:04 AM, Bram Van Dam <br...@intix.eu> wrote:
> Hey folks,
>
> Disclaimer: I haven't given this too much thought, so feel free to shoot
> me down if this is a stupid idea.
>
> We have a lot of Solr instances with a lot of different customers, and
> most of them fit into a patterb of 9-5 searching and slow but steady
> addition of documents 24/7, at a rate of about 10docs/second.
>
> This means there's hardly any searching going on at night. This also
> means that merges during the day can be a problem when indexes grow
> large, especially with commit intervals of around one minute. This seems
> wasteful, because the index doesn't grow *that* much larger during a
> single working day.
>
> I was wondering if it would be a good idea to create a MergePolicy that
> only merges segments during off-peak hours (or maybe according to a
> cron-style pattern or something).
>
> Any thoughts?
>
> Thanks,
>
>  - Bram
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org