Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 86915 invoked from network); 14 Jul 2009 20:25:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Jul 2009 20:25:29 -0000 Received: (qmail 39002 invoked by uid 500); 14 Jul 2009 20:25:37 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 38927 invoked by uid 500); 14 Jul 2009 20:25:37 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 38775 invoked by uid 99); 14 Jul 2009 20:25:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jul 2009 20:25:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jul 2009 20:25:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E8158234C04C for ; Tue, 14 Jul 2009 13:25:14 -0700 (PDT) Message-ID: <1665109041.1247603114949.JavaMail.jira@brutus> Date: Tue, 14 Jul 2009 13:25:14 -0700 (PDT) From: "Eks Dev (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1743) MMapDirectory should only mmap large files, small files should be opened using SimpleFS/NIOFS In-Reply-To: <1857108067.1247564355510.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731104#action_12731104 ] Eks Dev commented on LUCENE-1743: --------------------------------- right, it is not everything about reading index, you have to write it as well... why not making it an abstract class with abstract Directory getDirectory(String file, int minSize, int maxSize, String [read/write/append], String context); String getName(); // for logging What do you understand under "context"? Something along the lines /Give me directory for "segment merges", "read only" for search./ ...Maybe one day we will have possibility not to kill OS cache by merging, > MMapDirectory should only mmap large files, small files should be opened using SimpleFS/NIOFS > --------------------------------------------------------------------------------------------- > > Key: LUCENE-1743 > URL: https://issues.apache.org/jira/browse/LUCENE-1743 > Project: Lucene - Java > Issue Type: Improvement > Components: Store > Affects Versions: 2.9 > Reporter: Uwe Schindler > Assignee: Uwe Schindler > Fix For: 3.1 > > > This is a followup to LUCENE-1741: > Javadocs state (in FileChannel#map): "For most operating systems, mapping a file into memory is more expensive than reading or writing a few tens of kilobytes of data via the usual read and write methods. From the standpoint of performance it is generally only worth mapping relatively large files into memory." > MMapDirectory should get a user-configureable size parameter that is a lower limit for mmapping files. All files with a size