-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[grid] Enhance max-sessions in case specify driver configuration in Node #16341
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
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍(Review updated until commit 3a921ac)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
…driver configurations Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
816fbde
to
d8cce8d
Compare
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
854782b
to
f1a8d31
Compare
f1a8d31
to
3a921ac
Compare
/review |
Persistent review updated to latest commit 3a921ac |
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
80526af
to
d2b9c73
Compare
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
791b5f4
to
deb0fe0
Compare
User description
🔗 Related Issues
💥 What does this PR do?
Selenium Grid Node Max-Sessions Configuration
The scenarios below explain how Node max-sessions are calculated based on different configuration scenarios.
Scenarios
Scenario 1: Detect Drivers (Default) - No Max-Sessions
Configuration:
detect-drivers = true
(default), nomax-sessions
specifiedBehavior: Each driver gets full CPU cores, Safari limited to 1
Result on 10-core system:
Scenario 2: Detect Drivers with Max-Sessions Within CPU Cores
Configuration:
detect-drivers = true
,max-sessions
≤ CPU coresBehavior: Each driver gets the configured max-sessions value
Result on 10-core system:
Scenario 3: Detect Drivers with Max-Sessions Above CPU Cores
Configuration:
detect-drivers = true
,max-sessions
> CPU coresBehavior: Each driver gets full CPU cores, total capped at CPU cores
Result on 10-core system:
Scenario 4: Override Max-Sessions Enabled
Configuration:
override-max-sessions = true
Behavior: Each driver gets node max-sessions value
Result on 10-core system:
Scenario 5: Custom Driver Configuration
Configuration: Explicit driver configurations
Behavior: Uses configured values per driver
Result:
Scenario 6: Mixed Configuration
Configuration: Custom drivers with detect-drivers fallback
Result on 10-core system:
Key Rules
override-max-sessions = true
max-sessions
≤ CPU cores, Node respects the explicit valuedetect-drivers = true
and no explicitmax-sessions
, each flexible driver gets full CPU cores🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Enhance smart max-sessions handling for Selenium Grid nodes
Calculate total sessions from driver configurations instead of fixed values
Distribute CPU cores optimally among detected and configured drivers
Add comprehensive test coverage for various session allocation scenarios
Diagram Walkthrough
File Walkthrough
NodeOptions.java
Smart session allocation and CPU distribution logic
java/src/org/openqa/selenium/grid/node/config/NodeOptions.java
drivers
NodeOptionsTest.java
Comprehensive test coverage for session allocation
java/test/org/openqa/selenium/grid/node/config/NodeOptionsTest.java