[ 
https://issues.apache.org/jira/browse/FLUME-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16142772#comment-16142772
 ] 

Ferenc Szabo commented on FLUME-3149:
-------------------------------------

[~zyfo2] I have looked at your PR and I saw that you changed the memory channel 
in order to make the taildir source use less CPU. The thing is, that none of 
the channel or transaction implementations should have any information about 
any source or sink detail. These are interfaces that are working together while 
the implementations are independent and must not share anything. If you would 
like to optimize the tailDirSource, the only implementation that can be changed 
is the tailDirSource itself and not any of the channels. 

Have you tried to experiment with for example larger batch size in your config? 

You wrote, you have a kafka sink. Why don't you just use a kafka channel 
instead? That way you could skip the whole channel CPU usage issue.


> reduce cpu cost for file source transfer while still maintaining reliability
> ----------------------------------------------------------------------------
>
>                 Key: FLUME-3149
>                 URL: https://issues.apache.org/jira/browse/FLUME-3149
>             Project: Flume
>          Issue Type: Improvement
>          Components: File Channel
>            Reporter: will zhang
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to