MMapDirectory should only mmap large files, small files should be opened using SimpleFS/NIOFS [LUCENE-1743]
Open
affects-version:2.9
legacy-jira-fix-version:4.9
legacy-jira-fix-version:6.0
legacy-jira-label:dead
legacy-jira-priority:Major
module:core/store
type:enhancement
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
This is a followup to #2815:
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
Contributor guide
Assessment
This issue has not been assessed yet.