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

Guozhang Wang commented on KAFKA-13152:
---------------------------------------

Yeah that's a good point. I think we should not pause partitions that have no 
data yet. Maybe we can modify 1) above as to "pause all partitions that have 
some data already".

As for "fairness", I think this is either achieved or we've lost it at the 
consumer level, as we do round-robin fetching across all assigned partitions. 
And let's say if some partition A's message size is larger than partition B's 
message size, and assume their income record rate are the same, then partition 
B would have more records fetched than partition A on average.

> Replace "buffered.records.per.partition" with "input.buffer.max.bytes" 
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-13152
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13152
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: Guozhang Wang
>            Assignee: Sagar Rao
>            Priority: Major
>              Labels: needs-kip
>
> The current config "buffered.records.per.partition" controls how many records 
> in maximum to bookkeep, and hence it is exceed we would pause fetching from 
> this partition. However this config has two issues:
> * It's a per-partition config, so the total memory consumed is dependent on 
> the dynamic number of partitions assigned.
> * Record size could vary from case to case.
> And hence it's hard to bound the memory usage for this buffering. We should 
> consider deprecating that config with a global, e.g. "input.buffer.max.bytes" 
> which controls how much bytes in total is allowed to be buffered. This is 
> doable since we buffer the raw records in <byte[], byte[]>.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to