guozhangwang commented on pull request #11278:
URL: https://github.com/apache/kafka/pull/11278#issuecomment-919601918


   > @guozhangwang I think there are defiantly questions to be answered about 
this and really what we want to the user to achieve. I think the 
maxbufferedbytes is really being used for two purposes and perhaps we can split 
it out into 2 different things that will give a better result. I think it 
bounds the heap space and it reserves an amount of space for each thread.
   > It might make sense to have the users set a bound of the heap on the 
cluster. Then for each topology reserve some fraction of that space for that 
topology (either in percentages or num of bytes), then any unclaimed space can 
be split among the tasks (or just the tasks who have not reserved space). I 
think this would clear up some confusion about what this config is for. WDYT? 
cc/ @ableegoldman
   
   Hey @wcarlson5 sorry I'm late replying here. I think on the high level what 
you proposed as two purposes make sense to me, it's just that in practice it 
may be hard to implement it in a simple and elegant way. Just throw some 
scenarios to deep dive here, say the instance's total cache size configured as 
100, with no topology added yet.
   
   1. If a topology A is added with that config overridden as 150, should we 
just silently accepts it but only give it 100 or should we reject that topology?
   2. Assume we accept A as in 1) above, if a topology B without config 
overridden is added, how should we distribute the cache between the two 
topology? If we just consider B as 100 (the instance's config value), should we 
distribute the cache as 60:40 among A and B? And if another C with config 
overridden as 250 is added, should we redistribute the total cache size as 
30:20:50 among A / B / C?
   3. Assume we reject A as in 1) above, and suppose now B without config 
overridden is added first, which would get all of 100, and then later D with 
config overridden as 40 is added, would we distribute 100 as 30:70 (i.e. D 
first get 40, and then B/D split the remaining 60)?
   4. Assume that we have multiple threads, do we dynamically change the cache 
size allocation to each thread upon rebalance based on which tasks of A / B /C 
each thread hosts?
   
   Thinking about all that, I'm a bit concerned that this config would be very 
hard for users to understand: it seems in either way "you do not get what you 
specified", and the overridden value would just be used as a relative ratio. 
Plus if we distribute the cache among threads according to the topologies 
specified distribution, that would get even more cumbersome to understand.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to