lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: What is MMapDirectory?
Date Tue, 11 Oct 2005 07:16:03 GMT
Koji,

On Sunday 09 October 2005 14:12, Koji Sekiguchi wrote:
> Hello,
> 
> What is MMapDirectory?
> 
> I've searched mailing list archive, but cannot find it.
> I could find the following explanation at Lucene 1.9 CHANGES.txt:
> 
>  8. Add MMapDirectory, which uses nio to mmap input files.  This is
>     still somewhat slower than FSDirectory.  However it uses less
>     memory per query term, since a new buffer is not allocated per
>     term, which may help applications which use, e.g., wildcard
>     queries.  It may also someday be faster. (cutting & Paul Elschot)
> 
> And I saw bug 31508:
> 
> [PATCH] MMapDirectory for huge index files
> http://issues.apache.org/bugzilla/show_bug.cgi?id=31508

Bugzilla has been replaced by JIRA recently, this is now here:
http://issues.apache.org/jira/browse/LUCENE-283

> 
> But I'm curious to know about MMapDirecotry in more detail about
> the following point:
> 
> 1. Were there any troubles in FSDirectory with huge index files?

There were some troubles with huge index files, but not in FSDirectory.
FSDirectory is still faster than MMapDirectory, but that might change
in the future.

> 2. Is MMapDirectory used for only searching? (not indexing?)

Indeed so.

> 3. Why is MMapDirectory somewhat slower than FSDirectory?
> 4. Why does MMapDirectory use less memory while using mapped file (mmap)?

Both depend on the underlying implementation of buffering in the JVM
and in the operating system. In my (few) attempts so far,  memory
mapped I/O does not currently help to improve performance of Lucene.
However, in case you have different experience, we'd like to know.

Regards,
Paul Elschot


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message