~/talk

The future of Lucene's MMapDirectory

Talkat ApacheCon@Home 2021 · 2021-09-21..09-23· [web-performance]
links:none on file
slides:none on file

Lucene uses memory‑mapped files to avoid syscall and copy overhead but currently splits maps into 1 GB chunk workaround because Java ByteBuffer uses signed 32‑bit offsets, forcing many mappings and manual unmap hacks. Project Panama’s Foreign Memory Access API introduces shared memory segments and varhandles so Lucene prototypes map up to 16 GB default chunk (cutting mappings ~16x), support safe auto‑unmap via resource scopes, and run correctly on JDK 16–17+ prototypes. Windows stays unreliable; production use awaits JDK 18/19+ preview/stable releases.

AI-written summary · about

  1. 0:00Intro
  2. 1:56T08 The "70s style" of file reads
  3. 2:52Problems
  4. 4:30With Java it gets worse!!!
  5. 5:31and why it's bad for Lucene: Multithreading
  6. 6:28The "90s style" of file reads
  7. 9:08Questions
  8. 9:57Memory Mapping: The "millenium style" of file reads
  9. 16:19Advantages
  10. 20:37Try-catch program logic
  11. 26:14The 19 year old feature request
  12. 32:08Key concepts
  13. 33:19Project Panama Incubation: JDK 15 (JEP 383)
  14. 36:04Thread confinement solution
  15. 38:51Why chunking?
  16. 42:10How about Lucene?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.