On Mon, Dec 17, 2012 at 2:50 PM, Nick Wellnhofer <[email protected]> wrote:
> Another question regarding LightMergeManager: The cookbook entry recommends
> to use a ceiling of 10 documents per segment. That seems a bit low to me.
> Shouldn't something like 50, 100 or even more docs be OK on typical
> hardware?

Hmm, could be.  It's tricky to get this right.  That algo doesn't absolutely
guarantee great worst-case performance regardless of the max seg size
accepted -- you get pathological behavior for an index with many segments at
the threshold size.  However, that would only happen once...

It's probably time we encapsulated this behavior into a MergePolicy class and
started collecting this wisdom into MergePolicy subclasses.

> And regarding the BackgroundMerger: Can the background merging simply be run
> periodically as a cron job?

Under many circumstances, yes -- it depends on your usage pattern.

If updates arrive at a reasonably steady pace, a cron will work fine.

On the other hand, if updates are bursty and you get a lot of them in a short
interval before the cron has a chance to run, the index may get awfully
fragmented for a little while -- in which case you might have been better off
running the BackgroundMerger after N inserts instead of on a cron timer.

Marvin Humphrey

Reply via email to