You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/09/18 10:57:06 UTC

[GitHub] [flink] wsry opened a new pull request #9706: [FLINK-14118][runtime]Reduce the unnecessary flushing when there is no data available for flush.

wsry opened a new pull request #9706: [FLINK-14118][runtime]Reduce the unnecessary flushing when there is no data available for flush.
URL: https://github.com/apache/flink/pull/9706
 
 
   ## What is the purpose of the change
   The purpose of this pr is to reduce unnecessary flushing when there is no data available for flush.
   More specifically, when there is exactly one BufferConsumer in the buffer queue of subpartition and no new data will be added for a while in the future (may because of just no input or the logic of the operator is to collect some data for processing and will not emit records immediately), the current implementation will continuously notify data available (may wake up the netty thread), which is unnecessary, and eliminating these unnecessary flush can reduce CPU usage by 20% - 40% for some jobs.
   
   ## Brief change log
     - *Add new methods to BufferConsumer and CachedPositionMarker to judge if there is new data available for reading.*
     - *PipelinedSubpartition does not notify data available if there is no available data to send.*
   
   
   ## Verifying this change
   This change is already covered by existing tests, such as *PipelinedSubpartitionTest*.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services