[ 
https://issues.apache.org/jira/browse/LUCENE-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979718#action_12979718
 ] 

Michael McCandless commented on LUCENE-2500:
--------------------------------------------

Nice!

Actually I'd like to generalize this Dir impl to be a UnixFSDirectory (adding 
ifdefs to handle the flags for the various flavors), and, fix it, once we have 
IOContext, to properly decide when to use direct IO and when not to.  This way 
it's safe to just use on any Unix platform... (see LUCENE-2795).


> A Linux-specific Directory impl that bypasses the buffer cache
> --------------------------------------------------------------
>
>                 Key: LUCENE-2500
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2500
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/*
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2500.patch
>
>
> I've been testing how we could prevent Lucene's merges from evicting
> pages from the OS's buffer cache.  I tried fadvise/madvise (via JNI)
> but (frustratingly), I could not get them to work (details at
> http://chbits.blogspot.com/2010/06/lucene-and-fadvisemadvise.html).
> The only thing that worked was to use Linux's O_DIRECT flag, which
> forces all IO to bypass the buffer cache entirely... so I created a
> Linux-specific Directory impl to do this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to