Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4213

Ineffective transaction log padding on current OSes/JDKs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The padding of transaction log files does not seem to result in the intended effect, at least on Linux (JDKs 8 & 14) and macOS Catalina (JDK 8).

      The files have an apparent size of ~64 MiB, as instructed, but only two blocks are allocated:

      $ ls -lh log.*
      -rw-r--r-- 1 dash users 65M Feb 17 19:39 log.1
      $ du -h --apparent-size log.*
      65M    log.1
      $ du -h log.*
      8.0K   log.1
      

      If the goal of log padding is to avoid filesystem allocations under load (as it was when the ZooKeeper book was written), then sparse files are not desirable.

      (This may be "minor" as it seems that nobody noticed—presumably because nobody is running their log on spinning rust.)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ztzg Damien Diederen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: