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 Amany Moussa <am...@yahoo.com> on 2006/02/20 15:50:57 UTC

Lucene CPU Utilization

Hello,

I am building a Lucene index with over a million   
documents retrieved from database. I am running the
application on Unix, I am getting a 100% CPU
utilization the moment the application start.
The application creates a list of small indices in a
temp directory then merge them all in the main index
file.                                                 
Is there any way I can tune the indexing process and
reduce the CPU utilization.                         
Thanks much.                              

Amany M.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Lucene in multithreaded enviroment

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi Klaus,
If you use a single instance of IndexWriter, you can call addDocument(...) on it without synchronizing (things are thread safe inside the call).  If you are opening/closing IndexWriters yourself, then you have to make sure you have only 1 IndexWriter open at a time.
If you have Lucene in Action, check out section 2.9.1 - http://www.lucenebook.com/search?query=concurrency+rules

Otis

----- Original Message ----
From: Klaus <kl...@vommond.de>
To: java-user@lucene.apache.org
Sent: Mon 20 Feb 2006 06:44:23 PM EST
Subject: Lucene in multithreaded enviroment


Hi 
I'm using Lucene in a web application. Every time a new object is added to
the system the index will be updated. May there be any problems, if two
objects were created at the same moment? I know Lucene has some locking
mechanism. 

Thx

klaus

-----Ursprüngliche Nachricht-----
Von: Amany Moussa [mailto:amany_moussa@yahoo.com] 
Gesendet: Montag, 20. Februar 2006 21:22
An: java-user@lucene.apache.org
Betreff: Re: Lucene CPU Utilization

Thank you so much for your reply.

I know that you answered this question before. I just
wanted to post the question to receive more feedbacks
and share the information.

Thanks again.

Amany M.

--- Otis Gospodnetic <ot...@yahoo.com>
wrote:

> I think I answered that question just the other
> day.... privately...
> No, there is nothing in Lucene to help you with CPU
> utilization.
> However, if you are running this on a UNIX box of
> some kind, you can (re)nice the process and thus
> lower its priority, giving other processes more time
> with the CPU.  Windows may have something similar.
> 
> Otis
> 
> ----- Original Message ----
> From: Amany Moussa <am...@yahoo.com>
> To: java-user@lucene.apache.org
> Sent: Monday, February 20, 2006 9:50:57 AM
> Subject: Lucene CPU Utilization
> 
> 
> Hello,
> 
> I am building a Lucene index with over a million   
> documents retrieved from database. I am running the
> application on Unix, I am getting a 100% CPU
> utilization the moment the application start.
> The application creates a list of small indices in a
> temp directory then merge them all in the main index
> file.                                               
>  
> Is there any way I can tune the indexing process and
> reduce the CPU utilization.                         
> Thanks much.                              
> 
> Amany M.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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





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


Lucene in multithreaded enviroment

Posted by Klaus <kl...@vommond.de>.
Hi 
I'm using Lucene in a web application. Every time a new object is added to
the system the index will be updated. May there be any problems, if two
objects were created at the same moment? I know Lucene has some locking
mechanism. 

Thx

klaus

-----Ursprüngliche Nachricht-----
Von: Amany Moussa [mailto:amany_moussa@yahoo.com] 
Gesendet: Montag, 20. Februar 2006 21:22
An: java-user@lucene.apache.org
Betreff: Re: Lucene CPU Utilization

Thank you so much for your reply.

I know that you answered this question before. I just
wanted to post the question to receive more feedbacks
and share the information.

Thanks again.

Amany M.

--- Otis Gospodnetic <ot...@yahoo.com>
wrote:

> I think I answered that question just the other
> day.... privately...
> No, there is nothing in Lucene to help you with CPU
> utilization.
> However, if you are running this on a UNIX box of
> some kind, you can (re)nice the process and thus
> lower its priority, giving other processes more time
> with the CPU.  Windows may have something similar.
> 
> Otis
> 
> ----- Original Message ----
> From: Amany Moussa <am...@yahoo.com>
> To: java-user@lucene.apache.org
> Sent: Monday, February 20, 2006 9:50:57 AM
> Subject: Lucene CPU Utilization
> 
> 
> Hello,
> 
> I am building a Lucene index with over a million   
> documents retrieved from database. I am running the
> application on Unix, I am getting a 100% CPU
> utilization the moment the application start.
> The application creates a list of small indices in a
> temp directory then merge them all in the main index
> file.                                               
>  
> Is there any way I can tune the indexing process and
> reduce the CPU utilization.                         
> Thanks much.                              
> 
> Amany M.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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: Lucene CPU Utilization

Posted by Amany Moussa <am...@yahoo.com>.
Thank you so much for your reply.

I know that you answered this question before. I just
wanted to post the question to receive more feedbacks
and share the information.

Thanks again.

Amany M.

--- Otis Gospodnetic <ot...@yahoo.com>
wrote:

> I think I answered that question just the other
> day.... privately...
> No, there is nothing in Lucene to help you with CPU
> utilization.
> However, if you are running this on a UNIX box of
> some kind, you can (re)nice the process and thus
> lower its priority, giving other processes more time
> with the CPU.  Windows may have something similar.
> 
> Otis
> 
> ----- Original Message ----
> From: Amany Moussa <am...@yahoo.com>
> To: java-user@lucene.apache.org
> Sent: Monday, February 20, 2006 9:50:57 AM
> Subject: Lucene CPU Utilization
> 
> 
> Hello,
> 
> I am building a Lucene index with over a million   
> documents retrieved from database. I am running the
> application on Unix, I am getting a 100% CPU
> utilization the moment the application start.
> The application creates a list of small indices in a
> temp directory then merge them all in the main index
> file.                                               
>  
> Is there any way I can tune the indexing process and
> reduce the CPU utilization.                         
> Thanks much.                              
> 
> Amany M.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Lucene CPU Utilization

Posted by Otis Gospodnetic <ot...@yahoo.com>.
I think I answered that question just the other day.... privately...
No, there is nothing in Lucene to help you with CPU utilization.
However, if you are running this on a UNIX box of some kind, you can (re)nice the process and thus lower its priority, giving other processes more time with the CPU.  Windows may have something similar.

Otis

----- Original Message ----
From: Amany Moussa <am...@yahoo.com>
To: java-user@lucene.apache.org
Sent: Monday, February 20, 2006 9:50:57 AM
Subject: Lucene CPU Utilization


Hello,

I am building a Lucene index with over a million   
documents retrieved from database. I am running the
application on Unix, I am getting a 100% CPU
utilization the moment the application start.
The application creates a list of small indices in a
temp directory then merge them all in the main index
file.                                                 
Is there any way I can tune the indexing process and
reduce the CPU utilization.                         
Thanks much.                              

Amany M.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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