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

Piotr Nowojski commented on FLINK-24690:
----------------------------------------

I would be in favour of simplifying this so that documentation is not needed, 
so always calculating threshold based on the current value - if current buffer 
size is 16KB with 50% threshold, a dead zone should be {{{}(8KB, 24KB){}}}. 

> Clarification of buffer size threshold calculation in BufferDebloater 
> ----------------------------------------------------------------------
>
>                 Key: FLINK-24690
>                 URL: https://issues.apache.org/jira/browse/FLINK-24690
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Network
>    Affects Versions: 1.14.0
>            Reporter: Anton Kalashnikov
>            Priority: Major
>
> It looks like that the variable `skipUpdate` in 
> BufferDebloater#recalculateBufferSize is calculated in a not obvious way.
> For example if 
> `taskmanager.network.memory.buffer-debloat.threshold-percentages` is set to 
> 50(means 50%) then it will be something like:
>  * 32000 -> 16000(possible)
>  * 32000 -> 17000(not possible)
>  * 16000 -> 24000(not possible) - but 16000 + 50%  = 24000
>  * 16000 -> 32000(only this possible)
> This happens because the algorithm takes into account only the largest value. 
> So in example of `16000 -> 24000` it would calculate 50% of 24000 so only 
> transit from 12000 -> 24000 possible. 
> In general, this approach is not so bad especially on small values (instead 
> of 256  ->374, the minimum possible transit is 256 -> 512). But we should 
> clarify it somewhere with test or javadoc or both. Also, we can discuss 
> changing this algorithm to a more natural implementation.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to