Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-3149

reduce cpu cost for file source transfer while still maintaining reliability

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • File Channel
    • None

    Description

      File channel tracks transferred events and use transnational mechanism to make transfer recoverable. However, it increases CPU cost due to frequent system calls like write, read, etc. The Cpu cost could be very high if the transfer rate is high. In contrast, Memory channel has no such issue which requires only about 10% of CPU cost in the same environment but it's not recovered if the system is down accidentally.
      For sources like taildir/spooldir, I propose we could track offsets of file and store them locally to achieve reliability while still using memory channel to reduce CPU cost. Actually, I have already implemented this feature by storing the offsets in event headers and passing it to my own "offsetMemoryChannel" and store theses offsets in local disk in our production which reduces CPU cost by about 90 percent.
      Please let me know if it's worthwhile to have this feature in community version. Thank you.

      Attachments

        Activity

          People

            zyfo2 Will Zhang
            zyfo2 Will Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: