Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-3132

Reduce memory usage of OakIndexFile

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Do
    • None
    • None
    • lucene
    • None

    Description

      OakIndexFile splits an index file into Blob chunks and keeps one of the chunks in memory at a time. The chunk size is 32k by default but can be controlled with a property on the index definition.

      In a test repository I observed OakIndexFile instances consuming more than 600MB of heap, with a chunk size of 1MB. This seems quite high for a system where no query was active at that time.

      I think we should look into alternative ways to read from the Blob than just plain old InputStream. E.g. with a ByteChannel we could push the caching aspect to the Blob implementation, which could leverage an OS buffer cache.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mreutegg Marcel Reutegger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: