You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Roman Khachatryan (Jira)" <ji...@apache.org> on 2020/08/18 17:06:00 UTC
[jira] [Updated] (FLINK-18991) Optimize reading InputChannel state
[ https://issues.apache.org/jira/browse/FLINK-18991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Khachatryan updated FLINK-18991:
--------------------------------------
Description:
Curently, channel state is read not sequentially.
Inverting control would make it more efficient.
Current call chain:
{code:java}
StreamTask.readRecoveredChannelState -> strictly after reading output; when state is *consumed*, requests partitions
SingleInputGate.readRecoveredState -> submits a task to an executor from main task thread; loop through special channels
RecoveredInputChannel.readRecoveredState -> loop while has data; buffer = bufferManager.requestBufferBlocking();
where bufferManager = new BufferManager(inputGate.getMemorySegmentProvider(), this, 0);
ChannelStateReader.readInputData
{code}
Proposed call chain:
{code:java}
StreamTask.readRecoveredChannelState -> strictly after reading output; when state is *consumed*, requests partitions
ChannelStateReader.readInputData (another thread, maybe same executor, maybe change injection)
loop through state handles ordererd by handle, offset
request buffer from channel
pass buffer to RecoveredInputChannel.onRecoveredStateBuffer
{code}
Depends on FLINK-18989
was:
Curently, channel state is read not sequentially.
Inverting control would make it more efficient.
Current call chain:
{code:java}
StreamTask.readRecoveredChannelState -> strictly after reading output; when state is *consumed*, requests partitions
SingleInputGate.readRecoveredState -> submits a task to an executor from main task thread; loop through special channels
RecoveredInputChannel.readRecoveredState -> loop while has data; buffer = bufferManager.requestBufferBlocking();
where bufferManager = new BufferManager(inputGate.getMemorySegmentProvider(), this, 0);
ChannelStateReader.readInputData
{code}
Proposed call chain:
{code:java}
StreamTask.readRecoveredChannelState -> strictly after reading output; when state is *consumed*, requests partitionsStreamTask.readRecoveredChannelState -> strictly after reading output; when state is *consumed*, requests partitions ChannelStateReader.readInputData (another thread, maybe same executor, maybe change injection) loop through state handles ordererd by handle, offset request buffer from channel pass buffer to RecoveredInputChannel.onRecoveredStateBuffer
{code}
Depends on FLINK-18989
> Optimize reading InputChannel state
> -----------------------------------
>
> Key: FLINK-18991
> URL: https://issues.apache.org/jira/browse/FLINK-18991
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Task
> Reporter: Roman Khachatryan
> Assignee: Roman Khachatryan
> Priority: Major
> Fix For: 1.12.0
>
>
> Curently, channel state is read not sequentially.
> Inverting control would make it more efficient.
> Current call chain:
> {code:java}
> StreamTask.readRecoveredChannelState -> strictly after reading output; when state is *consumed*, requests partitions
> SingleInputGate.readRecoveredState -> submits a task to an executor from main task thread; loop through special channels
> RecoveredInputChannel.readRecoveredState -> loop while has data; buffer = bufferManager.requestBufferBlocking();
> where bufferManager = new BufferManager(inputGate.getMemorySegmentProvider(), this, 0);
> ChannelStateReader.readInputData
> {code}
> Proposed call chain:
> {code:java}
> StreamTask.readRecoveredChannelState -> strictly after reading output; when state is *consumed*, requests partitions
> ChannelStateReader.readInputData (another thread, maybe same executor, maybe change injection)
> loop through state handles ordererd by handle, offset
> request buffer from channel
> pass buffer to RecoveredInputChannel.onRecoveredStateBuffer
> {code}
> Depends on FLINK-18989
--
This message was sent by Atlassian Jira
(v8.3.4#803005)