You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by zyfo2 <gi...@git.apache.org> on 2017/08/26 08:47:37 UTC

[GitHub] flume pull request #159: FLUME-3149 reduce cpu cost for taildir file source ...

GitHub user zyfo2 opened a pull request:

    https://github.com/apache/flume/pull/159

    FLUME-3149 reduce cpu cost for taildir file source while still maintaining reliability by using posFile in memory channel

    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, I propose we could write position file in memory channel to achieve reliability and reduce CPU cost.
    After testing on my own production environment, CPU usage dropped from 13% to 3% and still maintain reliability.  (Transfer rate: 1Mb/s ,  kafka sink, file channel -> memory channel with pos file)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zyfo2/flume FLUME-3149

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flume/pull/159.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #159
    
----
commit cbdc0ac1f4ad6708e1b17fb6d392910a508e895d
Author: zhangyifeng01 <zh...@baidu.com>
Date:   2017-08-26T08:28:52Z

    FLUME-3149 reduce cpu cost for taildir file source while still maintaining
    reliability by using posFile in memory channel

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---