lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Question on Solr Caching
Date Fri, 05 Dec 2014 05:34:40 GMT
On 12/4/2014 10:06 PM, Manohar Sripada wrote:
> If you use MMapDirectory, Lucene will map the files into memory off heap
> and the OS's disk cache will cache the files in memory for you. Don't use
> RAMDirectory, it's not better than MMapDirectory for any use I'm aware of.
> 
>> Will that mean it will cache the Inverted index as well to OS disk's
> cache? The reason I am asking is, Solr searches this Inverted Index first
> to get the data. How about if we can keep this in memory?

If you have enough memory, the operating system will cache *everything*.
 It does so by simply loading the data that's on the disk into RAM ...
it is not aware that certain parts are the inverted index, it simply
caches whatever data gets read.  A subsequent read will come out of
memory, the disk heads will never even move.  If certain data in the
index is never accessed, then it will not get cached.

http://en.wikipedia.org/wiki/Page_cache

Thanks,
Shawn


Mime
View raw message