You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/03/07 17:51:44 UTC

[GitHub] [incubator-yunikorn-core] craigcondit opened a new pull request #381: [YUNIKORN-1106] Reduce idle CPU usage

craigcondit opened a new pull request #381:
URL: https://github.com/apache/incubator-yunikorn-core/pull/381


   ### What is this PR for?
   Adds a 10ms sleep when the scheduler loop makes no progress. This reduces CPU usage considerable, with negligible impact on performance.
   
   The sleep is conditional on no activity happening within the main scheduler loop. Any pod being scheduled, or any event received from the shim will set a flag indicating that the next sleep should be skipped. This minimizes the impact overall, but keeps the scheduler from consuming a core (or more) when not needed.
   
   ### What type of PR is it?
   * [ ] - Bug Fix
   * [x] - Improvement
   * [ ] - Feature
   * [ ] - Documentation
   * [ ] - Hot Fix
   * [ ] - Refactoring
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/YUNIKORN-1106
   
   ### How should this be tested?
   No behavioral changes here, just performance.
   
   Ran scenario locally with batch job of 100 completions, 20 parallelism, each container runs 'sleep 5'. 
   - Existing code: 2m24s job duration, baseline CPU usage varied between 114-139%.
   - 100ms sleep: 2m26s duration, baseline CPU usage ~ 0.4%
   - 10ms sleep: 2m19s duration (improvement!), baseline CPU usage ~ 2.3%
   
   Given that 10ms sleep reduced CPU usage by over 25x and actually increased performance, this seems like a good compromise. 
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * [ ] - The licenses files need update.
   * [ ] - There is breaking changes for older versions.
   * [ ] - It needs documentation.
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] craigcondit closed pull request #381: [YUNIKORN-1106] Reduce idle CPU usage

Posted by GitBox <gi...@apache.org>.
craigcondit closed pull request #381:
URL: https://github.com/apache/incubator-yunikorn-core/pull/381


   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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