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 Cheolgoo Kang <ap...@gmail.com> on 2005/12/11 06:10:36 UTC

Can I warm-up my search for it's performance?

Hi,

I'm running an index on FSDirectory with 0.4M documents with each of 7 fields.

When I open an IndexReader and an IndexSearcher, the average search
time with hits of 0.2M items (yeah, very common word) takes about
150~250 msec and it's pretty good. But the first time just after
opening IndexReader or IndexSearcher, search with the same keyword
takes about 3~4 secs (10 times more than the average) and this makes
our search system looks slow.

I think it could be the caching issue with OS and file system.

Any way, can I warm our IndexSearcher or IndexReader up to reduce this problem?

--
Cheolgoo

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


Re: Can I warm-up my search for it's performance?

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Any term will do, although I'd personally choose a very common one.

Otis

--- Cheolgoo Kang <ap...@gmail.com> wrote:

> Thanks Otis,
> 
> I'm doing exactly what you've said, except the sorting. I'll try it
> out immediately.
> 
> Anyway, will the warming up search with ANY term do the same job? Or
> should I have to search with the worst term that has the longest
> hits?
> 
> On 12/11/05, Otis Gospodnetic <ot...@yahoo.com> wrote:
> > Yes you can.  Just open an IndexReader/Searcher, say in a separate
> > thread, run a search on it, and then swap your previous
> > IndexReader/Searcher with the warm one.  If you use sorting, make
> your
> > "background query" with the sort option, so the FieldCaches get
> > populated and warmed up.
> >
> > Otis
> >
> > --- Cheolgoo Kang <ap...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I'm running an index on FSDirectory with 0.4M documents with each
> of
> > > 7 fields.
> > >
> > > When I open an IndexReader and an IndexSearcher, the average
> search
> > > time with hits of 0.2M items (yeah, very common word) takes about
> > > 150~250 msec and it's pretty good. But the first time just after
> > > opening IndexReader or IndexSearcher, search with the same
> keyword
> > > takes about 3~4 secs (10 times more than the average) and this
> makes
> > > our search system looks slow.
> > >
> > > I think it could be the caching issue with OS and file system.
> > >
> > > Any way, can I warm our IndexSearcher or IndexReader up to reduce
> > > this problem?
> > >
> > > --
> > > Cheolgoo
> > >
> > >
> ---------------------------------------------------------------------
> > > 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
> >
> >
> 
> 
> --
> Cheolgoo
> 
> ---------------------------------------------------------------------
> 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: Can I warm-up my search for it's performance?

Posted by Cheolgoo Kang <ap...@gmail.com>.
Thanks Otis,

I'm doing exactly what you've said, except the sorting. I'll try it
out immediately.

Anyway, will the warming up search with ANY term do the same job? Or
should I have to search with the worst term that has the longest hits?

On 12/11/05, Otis Gospodnetic <ot...@yahoo.com> wrote:
> Yes you can.  Just open an IndexReader/Searcher, say in a separate
> thread, run a search on it, and then swap your previous
> IndexReader/Searcher with the warm one.  If you use sorting, make your
> "background query" with the sort option, so the FieldCaches get
> populated and warmed up.
>
> Otis
>
> --- Cheolgoo Kang <ap...@gmail.com> wrote:
>
> > Hi,
> >
> > I'm running an index on FSDirectory with 0.4M documents with each of
> > 7 fields.
> >
> > When I open an IndexReader and an IndexSearcher, the average search
> > time with hits of 0.2M items (yeah, very common word) takes about
> > 150~250 msec and it's pretty good. But the first time just after
> > opening IndexReader or IndexSearcher, search with the same keyword
> > takes about 3~4 secs (10 times more than the average) and this makes
> > our search system looks slow.
> >
> > I think it could be the caching issue with OS and file system.
> >
> > Any way, can I warm our IndexSearcher or IndexReader up to reduce
> > this problem?
> >
> > --
> > Cheolgoo
> >
> > ---------------------------------------------------------------------
> > 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
>
>


--
Cheolgoo

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


Re: Can I warm-up my search for it's performance?

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Yes you can.  Just open an IndexReader/Searcher, say in a separate
thread, run a search on it, and then swap your previous
IndexReader/Searcher with the warm one.  If you use sorting, make your
"background query" with the sort option, so the FieldCaches get
populated and warmed up.

Otis

--- Cheolgoo Kang <ap...@gmail.com> wrote:

> Hi,
> 
> I'm running an index on FSDirectory with 0.4M documents with each of
> 7 fields.
> 
> When I open an IndexReader and an IndexSearcher, the average search
> time with hits of 0.2M items (yeah, very common word) takes about
> 150~250 msec and it's pretty good. But the first time just after
> opening IndexReader or IndexSearcher, search with the same keyword
> takes about 3~4 secs (10 times more than the average) and this makes
> our search system looks slow.
> 
> I think it could be the caching issue with OS and file system.
> 
> Any way, can I warm our IndexSearcher or IndexReader up to reduce
> this problem?
> 
> --
> Cheolgoo
> 
> ---------------------------------------------------------------------
> 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