Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8635

Lazy loading Lucene FST offheap using mmap

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 8.0, 8.x, 9.0
    • core/FSTs
    • None
    • I used below setup for es_rally tests:

      single node i3.xlarge running ES 6.5

      es_rally was running on another i3.xlarge instance

    • New, Patch Available
    • Yes

    Description

      Currently, FST loads all the terms into heap memory during index open. This causes frequent JVM OOM issues if the term size gets big. A better way of doing this will be to lazily load FST using mmap. That ensures only the required terms get loaded into memory.

       
      Lucene can expose API for providing list of fields to load terms offheap. I'm planning to take following approach for this:

      1. Add a boolean property fstOffHeap in FieldInfo
      2. Pass list of offheap fields to lucene during index open (ALL can be special keyword for loading ALL fields offheap)
      3. Initialize the fstOffHeap property during lucene index open
      4. FieldReader invokes default FST constructor or OffHeap constructor based on fstOffHeap field

       
      I created a patch (that loads all fields offheap), did some benchmarks using es_rally and results look good.

      Attachments

        1. fst-offheap-ra-rev.patch
          34 kB
          Michael Sokolov
        2. fst-offheap-rev.patch
          35 kB
          Michael Sokolov
        3. offheap.patch
          17 kB
          Ankit Jain
        4. optional_offheap_ra.patch
          18 kB
          Ankit Jain
        5. ra.patch
          17 kB
          Michael Sokolov
        6. rally_benchmark.xlsx
          44 kB
          Ankit Jain

        Issue Links

          Activity

            People

              Unassigned Unassigned
              akjain Ankit Jain
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: