Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3796

Speed up edit log tests by avoiding fsync()

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.0.2-alpha
    • 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.

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

        Activity

        Allen Wittenauer made changes -
        Fix Version/s 3.0.0 [ 12320356 ]
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Todd Lipcon made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 3.0.0 [ 12320356 ]
        Fix Version/s 2.2.0-alpha [ 12322472 ]
        Resolution Fixed [ 1 ]
        Todd Lipcon made changes -
        Attachment hdfs-3796.txt [ 12540938 ]
        Todd Lipcon made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Todd Lipcon made changes -
        Field Original Value New Value
        Attachment hdfs-3796.txt [ 12540787 ]
        Todd Lipcon created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development