Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3796

Speed up edit log tests by avoiding fsync()

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-alpha, 3.0.0-alpha1
    • Fix Version/s: 2.0.2-alpha
    • Component/s: test
    • Labels:
      None

      Description

      Our edit log tests are very slow because they incur a lot of fsyncs as they write out transactions. Since fsync() has no effect except in the case of power outages or system crashes, and we don't care about power outages in the context of tests, we can safely skip the fsync without any loss in coverage.

      In my tests, this sped up TestEditLog by about 5x. The testFuzzSequences test case improved from ~83 seconds with fsync to about 5 seconds without. These results are from my SSD laptop - they are probably even more drastic on spinning media.

        Attachments

        1. hdfs-3796.txt
          7 kB
          Todd Lipcon
        2. hdfs-3796.txt
          3 kB
          Todd Lipcon

          Activity

            People

            • Assignee:
              tlipcon Todd Lipcon
              Reporter:
              tlipcon Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: