flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-10142) Reduce synchronization overhead for credit notifications
Date Tue, 14 Aug 2018 13:50:00 GMT

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

ASF GitHub Bot commented on FLINK-10142:
----------------------------------------

NicoK opened a new pull request #6555: [FLINK-10142][network] reduce locking around credit
notification
URL: https://github.com/apache/flink/pull/6555
 
 
   ## What is the purpose of the change
   
   When credit-based flow control was introduced, we also added some checks and optimisations
for uncommon code paths that make common code paths unnecessarily more expensive, e.g. checking
whether a channel was released before forwarding a credit notification to Netty. Such checks
would have to be confirmed by the Netty thread anyway and thus only add additional load for
something that happens only once (per channel). This PR removes these additional checks.
   
   Please note that this PR builds upon #6553.
   
   ## Brief change log
   
   - from `PartitionRequestClient`: remove checking whether we have already been disposed
   - from `RemoteInputChannel#notifyCreditAvailable()`: remove check for `isReleased` (checked
when the notification arrives at Netty's thread)
   - from `RemoteInputChannel#notifyBufferAvailable()`: we must check inside `synchronized
(bufferQueue)` anyway and there is no race condition with `releaseAllResources()` as previously
mentioned there (the previous check also did not really prevent any race if it existed!)
   
   ## Verifying this change
   
   - covered by existing tests, such as `RemoteInputChannelTest` and in general everything
using the network stack
   - added `RemoteInputChannelTest#testConcurrentNotifyBufferAvailableAndRelease`
   - check for reduced CPU load (together with #6553)
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): **no**
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no**
     - The serializers: **no**
     - The runtime per-record code paths (performance sensitive): **no** (per buffer)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing,
Yarn/Mesos, ZooKeeper: **no**
     - The S3 file system connector: **no**
   
   ## Documentation
   
     - Does this pull request introduce a new feature? **no**
     - If yes, how is the feature documented? **not applicable**
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Reduce synchronization overhead for credit notifications
> --------------------------------------------------------
>
>                 Key: FLINK-10142
>                 URL: https://issues.apache.org/jira/browse/FLINK-10142
>             Project: Flink
>          Issue Type: Bug
>          Components: Network
>    Affects Versions: 1.5.2, 1.6.0, 1.7.0
>            Reporter: Nico Kruber
>            Assignee: Nico Kruber
>            Priority: Major
>              Labels: pull-request-available
>
> When credit-based flow control was introduced, we also added some checks and optimisations
for uncommon code paths that make common code paths unnecessarily more expensive, e.g. checking
whether a channel was released before forwarding a credit notification to Netty. Such checks
would have to be confirmed by the Netty thread anyway and thus only add additional load for
something that happens only once (per channel).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message