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

Remove synchronized from high-contention methods on RAMFile

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/store
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      When benchmarking RAMDirectory access via multiple threads the methods RAMFile::numBuffers and RAMFile::getBuffer show up blocking threads fairly frequently

      By removing the synchronized keyword from these methods our internal benchmarks show a 2x performance increase under concurrent load.

      I don't think removing synchronized from these methods is a problem as they are read-only and write access to these fields is not synchronized. LUCENE-2779 also implies that some ofthe locking on RAMDirectory is not necessary

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                spmason Steve Mason
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: