On May 7, 2014, at 6:46 AM, Cheng <zhoucheng2...@gmail.com> wrote: > > I have an index of multiple gigabytes which serves 5-10 threads and needs > refreshing very often. I wonder if RAMDirectory is the good candidate for > this purpose. If not, what kind of directory is better?
We found that loading and unloading RAMDirectory from the Java heap causes crushing heap pressure. When you switch over, we regularly had GC pauses in the tens of seconds. We switched back to using mmap-ed files (which IIRC is the default for 64-bit Linux). As long as you have enough memory for buffer cache, it ends up in RAM and is quite fast. We never looked back. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org