lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eks dev <eks...@yahoo.co.uk>
Subject Re: Loading an index into memory
Date Thu, 23 Jul 2009 17:27:39 GMT

I do not know much about RAM FS, but I know for sure if you have enough memory for RAMDirectory,
you should go for it. That gives you the fastest and the most stable performance, no OS swaps,
no sudden performance drops... Uwe's tip is very good, if you/OS occasionally need RAM for
other things, so that OS can borrow some from your index. This swapping comes with price,
which can or cannot be ok for you. 

  

----- Original Message ----
> From: Otis Gospodnetic <otis_gospodnetic@yahoo.com>
> To: java-user@lucene.apache.org
> Sent: Thursday, 23 July, 2009 18:55:57
> Subject: Re: Loading an index into memory
> 
> I haven't verified this myself, but I remember talking to somebody who tried 
> MMapDirectory and compared it to simply using tmpfs (RAM FS).  The result was 
> that MMapDirectory had some memory overhead, so putting the index on tmpfs was 
> more memory-efficient.  I guess this person had read-only indices, so tmpfs was 
> an option.
> 
> Otis
> --
> Sematext is hiring -- http://sematext.com/about/jobs.html?mls
> Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR
> 
> 
> 
> ----- Original Message ----
> > From: Uwe Schindler 
> > To: java-user@lucene.apache.org
> > Sent: Thursday, July 23, 2009 9:47:24 AM
> > Subject: RE: Loading an index into memory
> > 
> > The size is in bytes and the RAMDirectory stores the bytes in bytes, so size
> > is equal. I would suggest to not copy the dir into a RAMdirectory. It is
> > better to use MMapDirectory in this case, as it "swaps" the files into
> > address space like a normal OS swap file. The OS kernel will automatically
> > swap needed parts into physical RAM. In this case the Java Heap is not
> > wasted and only needed parts are swapped into RAM.
> > 
> > -----
> > UWE SCHINDLER
> > Webserver/Middleware Development
> > PANGAEA - Publishing Network for Geoscientific and Environmental Data
> > MARUM - University of Bremen
> > Room 2500, Leobener Str., D-28359 Bremen
> > Tel.: +49 421 218 65595
> > Fax:  +49 421 218 65505
> > http://www.pangaea.de/
> > E-mail: uschindler@pangaea.de
> > 
> > > -----Original Message-----
> > > From: Dragon Fly [mailto:dragon-fly999@hotmail.com]
> > > Sent: Thursday, July 23, 2009 3:38 PM
> > > To: java-user@lucene.apache.org
> > > Subject: Loading an index into memory
> > > 
> > > 
> > > Hi,
> > > 
> > > I have a question regarding RAMDirectory.  I have a 5 GB index on disk and
> > > it is opened like the following:
> > > 
> > >   searcher = new IndexSearcher (new RAMDirectory (indexDirectory));
> > > 
> > > Approximately how much memory is needed to load the index? 5GB of memory
> > > or 10GB because of Unicode? Does the entire index get loaded into memory
> > > or only parts of it? Thank you.
> > > 
> > > 
> > > _________________________________________________________________
> > > Windows LiveT HotmailR: Celebrate the moment with your favorite sports
> > > pics. Check it out.
> > > http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM
> > > _WL_QA_HM_sports_photos_072009&cat=sports
> > 
> > 
> > ---------------------------------------------------------------------
> > 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


Mime
View raw message