Re: Use of NRTCachingDirectoryFactory

2020-08-18 Thread Erick Erickson
In a word, “yes”. NRTCachingDirectory almost
always “does the right thing” without any
modifications based on your environment.

Second, since Lucene uses MMapDirectory,
the relevant portions of your index will 
already be in the OS’s RAM, which 
is why it’s a mistake to try to force it. All
you’ll really do is chew up Java’s RAM
to no good purpose, adding to GC etc.

See: https://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html

In your case, with such a small index,
it’s probably already entirely in memory.

Best,
Erick

> On Aug 18, 2020, at 4:40 AM, Tushar Arora  wrote:
> 
> Hi,
> 
> One of our indexes has a size of around 1GB. And the production server has
> RAM of 16GB. And this is a slave server. Data replicates from the master
> server to it every 5 minutes.
> 
> Is it a good practice to keep this index in RAM?
> I checked the solr.RAMDirectoryFactory. But, it does not work with
> replication. So, using solr.NRTCachingDirectoryFactory is a good choice?
> 
> Regards,
> Tushar



Use of NRTCachingDirectoryFactory

2020-08-18 Thread Tushar Arora
Hi,

One of our indexes has a size of around 1GB. And the production server has
RAM of 16GB. And this is a slave server. Data replicates from the master
server to it every 5 minutes.

Is it a good practice to keep this index in RAM?
I checked the solr.RAMDirectoryFactory. But, it does not work with
replication. So, using solr.NRTCachingDirectoryFactory is a good choice?

Regards,
Tushar