-
Notifications
You must be signed in to change notification settings - Fork 955
Release semaphore immediately after startup process exit #6463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The idea makes sense, and a similar mechanism was applied to batch submission too #6028 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6463 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 675 675
Lines 41641 41643 +2
Branches 5685 5685
======================================
- Misses 41641 41643 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala
Outdated
Show resolved
Hide resolved
# 🔍 Description ## Issue References 🔗 The concurrency limit for the engine startup process is mainly used to avoid overload on the machine(or container) of the Kyuubi server, the current implementation holds startupProcessSemaphore until the session is established successfully. While for Spark on YARN cluster mode, some YARN queue resource insufficiency may block the subsequent Spark application submissions to other queues, significantly affecting the Kyuubi server's resource utilization. ## Describe Your Solution 🔧 We should immediately release the `startupProcessSemaphore` after the engine startup process exits (i.e., after the `spark-submit` process exits) as the load has already disappeared. ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 I tested it on a cluster of 50 kyuubi Servers, and kyuubi server resource utilization increased by 70% --- # Checklist 📝 - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6463 from ic4y/master-p003. Closes #6463 f7de68c [ic4y] Improve code quality d8b0248 [ic4y] [Improve][EngineRef] Optimize Engine Startup Concurrency Limit Authored-by: ic4y <ic4y@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org> (cherry picked from commit 95ed748) Signed-off-by: Cheng Pan <chengpan@apache.org>
The concurrency limit for the engine startup process is mainly used to avoid overload on the machine(or container) of the Kyuubi server, the current implementation holds startupProcessSemaphore until the session is established successfully. While for Spark on YARN cluster mode, some YARN queue resource insufficiency may block the subsequent Spark application submissions to other queues, significantly affecting the Kyuubi server's resource utilization. We should immediately release the `startupProcessSemaphore` after the engine startup process exits (i.e., after the `spark-submit` process exits) as the load has already disappeared. - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) I tested it on a cluster of 50 kyuubi Servers, and kyuubi server resource utilization increased by 70% --- - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6463 from ic4y/master-p003. Closes #6463 f7de68c [ic4y] Improve code quality d8b0248 [ic4y] [Improve][EngineRef] Optimize Engine Startup Concurrency Limit Authored-by: ic4y <ic4y@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org> (cherry picked from commit 95ed748) Signed-off-by: Cheng Pan <chengpan@apache.org>
Thanks, merged to master/1.9.2/1.8.3 |
🔍 Description
Issue References 🔗
The concurrency limit for the engine startup process is mainly used to avoid overload on the machine(or container) of the Kyuubi server, the current implementation holds startupProcessSemaphore until the session is established successfully. While for Spark on YARN cluster mode, some YARN queue resource insufficiency may block the subsequent Spark application submissions to other queues, significantly affecting the Kyuubi server's resource utilization.
Describe Your Solution 🔧
We should immediately release the
startupProcessSemaphore
after the engine startup process exits (i.e., after thespark-submit
process exits) as the load has already disappeared.Types of changes 🔖
Test Plan 🧪
I tested it on a cluster of 50 kyuubi Servers, and kyuubi server resource utilization increased by 70%
Checklist 📝
Be nice. Be informative.