Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-148

Unnecessary use of FileChannel.force() in Indexed and Block Disk Caches

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • jcs-2.0-beta-1
    • jcs-2.0-beta-2
    • Indexed Disk Cache
    • None

    Description

      In: IndexedDisk.write() and BlokDisk.write() at the end FileChannel.force() is called.

      It introduces a lot of I/O and affects performance.

      After removal of these two lines, mvn test raises no issues.

      The test case org.apache.commons.jcs.auxiliary.disk.indexed.HugeQuantityIndDiskCacheLoadTest goes from 450 seconds needed for completion to 30 seconds on my system.

      As the data file is useless without proper keyfile, which is stored only on shutdown, then I guess we can resign from fc.force() on data writes.

      Attachments

        Activity

          People

            tv Thomas Vandahl
            wiktorn Wiktor N
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: