-
Notifications
You must be signed in to change notification settings - Fork 1.2k
console: optimise buffer sizes for faster console performance #11221
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
console: optimise buffer sizes for faster console performance #11221
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11221 +/- ##
============================================
+ Coverage 16.14% 16.16% +0.01%
- Complexity 13256 13277 +21
============================================
Files 5656 5656
Lines 497893 497818 -75
Branches 60374 60375 +1
============================================
+ Hits 80394 80457 +63
+ Misses 408539 408407 -132
+ Partials 8960 8954 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
.../console-proxy/server/src/main/java/com/cloud/consoleproxy/vnc/network/NioSocketHandler.java
Outdated
Show resolved
Hide resolved
looks good, @rohityadavcloud . jus one question (i might misunderstand the architectural aspect though) |
This bumps the input and output stream buffers to 64KiB and uses them consistent across TLS and non-TLS based VNC connections. This fixes apache#10650 Co-authored-by: Vishesh Jindal <[email protected]> Signed-off-by: Rohit Yadav <[email protected]>
f1abf96
to
bde67a1
Compare
.../console-proxy/server/src/main/java/com/cloud/consoleproxy/vnc/network/NioSocketHandler.java
Outdated
Show resolved
Hide resolved
@blueorangutan package |
@rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
amazing findings ! @vishesh92 @rohityadavcloud |
@vishesh92 can you set the PR to 'ready for review' once you're done with your experimentations if any |
Is there value in making this setting tunable via a system configuration setting? |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14210 |
@blueorangutan test |
@rohityadavcloud a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
@adietrich-ussignal currently that’s not possible, these are internal byte buffers which weren’t consistently coded in the first place and without this code-based fix it won’t possible to fix existing ACS environments. |
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
Outdated
Show resolved
Hide resolved
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.
Pull Request Overview
This PR optimizes buffer sizes for console proxy connections to improve performance and responsiveness for desktop users accessing VNC consoles through NoVNC. The changes address issue #10650 by implementing configurable buffer sizes, adaptive batching strategies, and socket optimizations.
Key changes include:
- Introduction of configurable default buffer size (65536 bytes) replacing hardcoded values
- Implementation of adaptive batching for TLS connections with immediate flushing for non-TLS
- Socket-level optimizations including TCP_NODELAY and keep-alive settings
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
consoleproxy.properties | Adds configurable defaultBufferSize property (65536 bytes) |
ConsoleProxy.java | Implements buffer size configuration parsing and static field |
NioSocketTLSOutputStream.java | Replaces SSL session buffer size with configurable size, adds batching logic |
NioSocketTLSInputStream.java | Updates to use configurable buffer size instead of SSL session size |
NioSocketSSLEngineManager.java | Implements adaptive batching with explicit flush control |
NioSocketInputStream.java | Refactors byte reading methods for better performance |
NioSocketHandlerImpl.java | Updates to use configurable buffer size and new API methods |
NioSocketHandler.java | Simplifies interface by replacing two methods with single buffer-based method |
NioSocket.java | Enables TCP optimizations (keep-alive, TCP_NODELAY) |
NoVncClient.java | Updates to use new buffer-based reading API |
ConsoleProxyNoVncClient.java | Implements adaptive sleep timing and TLS-aware batching strategy |
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
Outdated
Show resolved
Hide resolved
...proxy/server/src/main/java/com/cloud/consoleproxy/vnc/network/NioSocketSSLEngineManager.java
Show resolved
Hide resolved
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
Show resolved
Hide resolved
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
@blueorangutan package |
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 14237 |
@blueorangutan package |
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14241 |
@blueorangutan package |
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14280 |
@blueorangutan test |
@rohityadavcloud a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
@blueorangutan test |
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13842)
|
[SF] Trillian test result (tid-13844)
|
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.
clgtm
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, checked the consoles for some instances in vmware/kvm/xenserver.
…#11221) * console-proxy: fix stream buffer sizes to improve console performance This bumps the input and output stream buffers to 64KiB and uses them consistent across TLS and non-TLS based VNC connections. This fixes apache#10650 Co-authored-by: Vishesh Jindal <[email protected]> Signed-off-by: Rohit Yadav <[email protected]> * Make buffer size configurable & other improvements for CPU & memory utilisation * Setup batching of data for TLS connections to the VNC server * Apply suggestions from code review * Fix buffer size for xenserver --------- Signed-off-by: Rohit Yadav <[email protected]> Co-authored-by: Vishesh Jindal <[email protected]> Co-authored-by: vishesh92 <[email protected]>
…#11221) * console-proxy: fix stream buffer sizes to improve console performance This bumps the input and output stream buffers to 64KiB and uses them consistent across TLS and non-TLS based VNC connections. This fixes apache#10650 Co-authored-by: Vishesh Jindal <[email protected]> Signed-off-by: Rohit Yadav <[email protected]> * Make buffer size configurable & other improvements for CPU & memory utilisation * Setup batching of data for TLS connections to the VNC server * Apply suggestions from code review * Fix buffer size for xenserver --------- Signed-off-by: Rohit Yadav <[email protected]> Co-authored-by: Vishesh Jindal <[email protected]> Co-authored-by: vishesh92 <[email protected]>
…#11221) * console-proxy: fix stream buffer sizes to improve console performance This bumps the input and output stream buffers to 64KiB and uses them consistent across TLS and non-TLS based VNC connections. This fixes apache#10650 Co-authored-by: Vishesh Jindal <[email protected]> Signed-off-by: Rohit Yadav <[email protected]> * Make buffer size configurable & other improvements for CPU & memory utilisation * Setup batching of data for TLS connections to the VNC server * Apply suggestions from code review * Fix buffer size for xenserver --------- Signed-off-by: Rohit Yadav <[email protected]> Co-authored-by: Vishesh Jindal <[email protected]> Co-authored-by: vishesh92 <[email protected]>
Description
This fixes the console proxy input and output buffer sizes to accommodate responsive user-experience for desktop users using console (novnc).
Fixes #10650
How I tested:
cloud
serviceconsole-improvements.mov
Types of changes