Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-1545

Raft log to can't be committed in log flush intervals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0
    • server
    • None

    Description

      We previously tried to reduce disk IO by introducing a minimum interval between flushes, the relevant pr is here: https://github.com/apache/ratis/pull/611

      However, after subsequent tests, we found that the raft performance has degraded,  because flushIfNecessary() function does more operations than just flushing the stream:

      Since we enforced the minimum time for each flush, the raft log to can't be committed in flush intervals, which reduces the performance of raft.

      So we want to separate out.flush()  from flushIfNecessary() and execute it asynchronously, so that the process of writing to disk will not block the operation of other threads.

      Attachments

        1. image-2022-03-03-16-58-01-825.png
          175 kB
          Junhua Zhang
        2. 616_unsafeFlush.patch
          5 kB
          Tsz-wo Sze
        3. 616_FlushWorker.patch
          9 kB
          Tsz-wo Sze
        4. 616_asyncFlush.patch
          3 kB
          Tsz-wo Sze
        5. 616_asyncFileChannelForce.patch
          8 kB
          Tsz-wo Sze

        Issue Links

          Activity

            People

              sincerexia Junhua Zhang
              sincerexia Junhua Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h 50m
                  6h 50m