Skip to content
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 proxy client sleep more generic #8694

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

DaanHoogland
Copy link
Contributor

Description

This PR...

Fixes: #8692

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@DaanHoogland
Copy link
Contributor Author

@weizhouapache @nvazquez , this is purely based on the description in #8692. Any advice on verification?

@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland 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.

…roxy/ConsoleProxyNoVncClient.java

Co-authored-by: Wei Zhou <weizhou@apache.org>
@blueorangutan
Copy link

Packaging result [SF]: ✖️ el7 ✔️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 8747

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 13.16%. Comparing base (e09fd2e) to head (ce94b05).

Additional details and impacted files
@@            Coverage Diff            @@
##               4.18    #8694   +/-   ##
=========================================
  Coverage     13.16%   13.16%           
  Complexity     9203     9203           
=========================================
  Files          2724     2724           
  Lines        258122   258122           
  Branches      40230    40230           
=========================================
  Hits          33989    33989           
  Misses       219825   219825           
  Partials       4308     4308           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blueorangutan
Copy link

Packaging result [LL]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6211

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8748

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test alma9 kvm-alma9

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@kohrar
Copy link
Contributor

kohrar commented Feb 23, 2024

A couple questions, if you don't mind:

  1. Would it make sense from a latency-perspective to only wait 1ms if there's actually no data coming in? If there's a big chunk of data coming in, you might not want to wait 1ms to read ~200 bytes (which appears to be the maximum the NIO readNextBytes method would return)
  2. Why 1ms? Could we raise this to reduce wasted CPU cycles even more? My testing showed the CPU went from 100% to 25%. This might still seem a bit excessive.

@blueorangutan
Copy link

[SF] Trillian test result (tid-9319)
Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9
Total time taken: 45921 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8694-t9319-kvm-alma9.zip
Smoke tests completed. 110 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor Author

A couple questions, if you don't mind:

1. Would it make sense from a latency-perspective to only wait 1ms if there's actually no data coming in? If there's a big chunk of data coming in, you might not want to wait 1ms to read ~200 bytes (which appears to be the maximum the NIO readNextBytes method would return)

2. Why 1ms? Could we raise this to reduce wasted CPU cycles even more? My testing showed the CPU went from 100% to 25%. This might still seem a bit excessive.

valid questions @kohrar , sounds like you are arguing for configurability. This is the simplest solution to the issue in your initial ticket. What you are asking now is a bigger (functional) change however. I would prefer to discuss and implement that separately.

@DaanHoogland DaanHoogland marked this pull request as ready for review February 24, 2024 19:28
@rohityadavcloud rohityadavcloud added this to the 4.18.2.0 milestone Feb 27, 2024
@rohityadavcloud rohityadavcloud merged commit 4e34e6b into apache:4.18 Feb 27, 2024
27 checks passed
@rohityadavcloud rohityadavcloud deleted the ghi8692-ConsoleProxySleep branch February 27, 2024 06:24
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Mar 5, 2024
* Make wait in the noVNC console proxy client more generic

* Update services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java

Co-authored-by: Wei Zhou <weizhou@apache.org>

---------

Co-authored-by: Wei Zhou <weizhou@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Console Proxy VM: High CPU when using secure VNC / NIOConnection
5 participants