Thanks Shawn,

Can you please re-direct me to any wiki which describes (in detail) the
differences between MMapDirectoryFactory and NRTCachingDirectoryFactory? I
found this blog
<http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html> very
helpful which describes about MMapDirectory. I want to know in detail about
NRTCachingFactory as well.

Also, when I ran this rest request solr/admin/cores?action=STATUS, I got
the below result (pasted partial result only). I have set the
DirectoryFactory as NRTCachingDirectory in solrconfig.xml. But, it also
shows MMapDirectory in the below element. Does this means
NRTCachingDirectory is using MMapDirectory internally??

<str name="directory">
org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/instance/solr/collection1_shard2_replica1/data/index
lockFactory=NativeFSLockFactory@/instance/solr/collection1_shard2_replica1/data/index;
maxCacheMB=48.0 maxMergeSizeMB=4.0)</str>

What does maxCacheMB and maxMergeSizeMB indicate? How to control it?


Thanks,
Manohar

On Fri, Dec 5, 2014 at 11:04 AM, Shawn Heisey <apa...@elyograg.org> wrote:

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

Reply via email to