Hello Ashwini, MMapDirectory will often perform a bit faster. While NIOFSDirectory needs to first copy data from the buffer cache to heap arrays, MMapDirectory can read directly into the buffer cache.
Lucene's benchmark suite allows comparing these two directories. I haven't done so recently, but in my experience MMapDirectory was always faster. I recommend reading this blog to learn more: https://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html Le jeu. 22 mai 2025, 07:47, ashwini singh <ashwini.mn...@gmail.com> a écrit : > As per Lucene documentation there is not much difference between these 2 > implementations and users should use the Open() method and Lucene choses > the best implementation based on the system. > > > https://lucene.apache.org/core/9_7_0/core/org/apache/lucene/store/FSDirectory.html > > > Is there any perf impact on choosing one of the options on a 64 bit linux > system ? Do we have any comparison numbers? What is the advantage of using > MMapDirectory when we already have a system buffer cache (on linux) for > file access ? > > > Thanks > Ashwini >