lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: RAMDirectory doesn't win over FSDirectory all the time, why?
Date Mon, 06 Jun 2011 15:58:21 GMT
This test is very old (from the 1st edition of the book but removed
from the 2nd).

Modern OS's cache newly written files in RAM, and this test doesn't
write very large files (I think?), so the test is really testing an
OS's IO cache vs Lucene's RAM Dir.

That said, I'm not sure why RAMDir would be slower... FSDir still must
go through the OS APIs even if the OS then caches in RAM.

Mike McCandless

http://blog.mikemccandless.com

2011/6/6 zhoucheng2008 <zhoucheng2008@gmail.com>:
> I read the lucene in action book and just tested the
> FSversusRAMDirectoryTest.java with the following uncommented:
>
>
>
>    //    /**
>
>    //    // change to adjust performance of indexing with FSDirectory
>
>        writer.mergeFactor = 100;
>
>        writer.maxMergeDocs = 999999;
>
>        writer.minMergeDocs = 1000;
>
> //    */
>
>
>
> Here is the output:
>
> RAMDirectory Time: 805 ms
>
> FSDirectory Time : 728 ms
>
>

---------------------------------------------------------------------
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