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

Speed up edit log tests by avoiding fsync()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.2-alpha, 3.0.0-alpha1
    • 2.0.2-alpha
    • test
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: