You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ted Stockwell <em...@yahoo.com> on 2009/08/31 17:25:08 UTC

Why perform optimization in 'off hours'?

Hi All,

I am new to Lucene and I was reading 'Lucene in Action' this weekend.
The book recommends that optimization be performed when the index is not in use.
The book makes it clear that optimization *may* be performed while indexing but it says that optimizing while indexing makes indexing slower.
However, the book does not explain *why* indexing would be slower while optimizing.
Since I know that optimization will create new segments and not mess with the old ones, I'm confused as to how optimizing may cause indexing to slow down.

Any ideas?


Thanks,
ted stockwell



      

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


Re: Why perform optimization in 'off hours'?

Posted by Ted Stockwell <em...@yahoo.com>.
Thanks for the reply.
I suspected that was the case, I was just wondering if there was something more to it.



----- Original Message ----
> From: Shai Erera <se...@gmail.com>
> To: java-user@lucene.apache.org
> Sent: Monday, August 31, 2009 10:28:41 AM
> Subject: Re: Why perform optimization in 'off hours'?
> 
> When you run optimize(), you consume CPU and do lots of IO operations which
> can really mess up the OS IO cache. Optimize is a very heavy process and
> therefore is recommended to run at off hours. Sometimes, when your index is
> large enough, it's recommended to run it during weekends, since the
> optimize() process itself may take several hours, so that a nightly job
> won't be enough.
> 
> Shai
> 
> On Mon, Aug 31, 2009 at 6:25 PM, Ted Stockwell wrote:
> 
> > Hi All,
> >
> > I am new to Lucene and I was reading 'Lucene in Action' this weekend.
> > The book recommends that optimization be performed when the index is not in
> > use.
> > The book makes it clear that optimization *may* be performed while indexing
> > but it says that optimizing while indexing makes indexing slower.
> > However, the book does not explain *why* indexing would be slower while
> > optimizing.
> > Since I know that optimization will create new segments and not mess with
> > the old ones, I'm confused as to how optimizing may cause indexing to slow
> > down.
> >
> > Any ideas?
> >
> >
> > Thanks,
> > ted stockwell
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >



      

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


Re: Why perform optimization in 'off hours'?

Posted by Shai Erera <se...@gmail.com>.
When you run optimize(), you consume CPU and do lots of IO operations which
can really mess up the OS IO cache. Optimize is a very heavy process and
therefore is recommended to run at off hours. Sometimes, when your index is
large enough, it's recommended to run it during weekends, since the
optimize() process itself may take several hours, so that a nightly job
won't be enough.

Shai

On Mon, Aug 31, 2009 at 6:25 PM, Ted Stockwell <em...@yahoo.com> wrote:

> Hi All,
>
> I am new to Lucene and I was reading 'Lucene in Action' this weekend.
> The book recommends that optimization be performed when the index is not in
> use.
> The book makes it clear that optimization *may* be performed while indexing
> but it says that optimizing while indexing makes indexing slower.
> However, the book does not explain *why* indexing would be slower while
> optimizing.
> Since I know that optimization will create new segments and not mess with
> the old ones, I'm confused as to how optimizing may cause indexing to slow
> down.
>
> Any ideas?
>
>
> Thanks,
> ted stockwell
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Why perform optimization in 'off hours'?

Posted by Chris Hostetter <ho...@fucit.org>.
: Subject: Why perform optimization in 'off hours'?
: In-Reply-To:
:     <5B...@sc1exc2.corp.emainc.com>

http://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to 
an existing message, instead start a fresh email.  Even if you change the 
subject line of your email, other mail headers still track which thread 
you replied to and your question is "hidden" in that thread and gets less 
attention.   It makes following discussions in the mailing list archives 
particularly difficult.
See Also:  http://en.wikipedia.org/wiki/Thread_hijacking



-Hoss


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