lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Can ByteBufferIndexInput use buffering?
Date Thu, 20 Oct 2016 15:52:00 GMT
The fact that MMapIndexInput does no buffering is an important
performance gain vs NIOFSDirectory which e.g. on seeking to a term
loads way too many bytes.

Why do you want to add buffering to it?

The OS should already do a good job keeping recently accessed pages
hot, doing the buffering for you.

Mike McCandless

On Thu, Oct 20, 2016 at 3:25 AM, Ravikumar Govindarajan
<> wrote:
> When we use NIOFSDirectory, lucene internally uses buffering via
> BufferedIndexInput (1KB etc...) while reading from the file..
> However, for MmapDirectory (ByteBufferIndexInput) there is no such
> buffering & data is read from the mapped bytes directly...
> Will it be too much of a performance drag if I wrap ByteBufferIndexInput
> with a BufferedIndex? I mean like, is it an anti-pattern of zero-copy reads
> etc...
> Any help is much appreciated
> --
> Ravi

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message