Skip to content

Console Proxy VM: High CPU when using secure VNC / NIOConnection #8692

@kohrar

Description

@kohrar
ISSUE TYPE
  • Bug Report
COMPONENT NAME
Console Proxy
CLOUDSTACK VERSION
4.18, 4.19
CONFIGURATION

Clean install of Apache CloudStack 4.18 and 4.19

OS / ENVIRONMENT

Rocky Linux 8.9

SUMMARY

When using the secure KVM VNC console proxy in 4.18 or 4.19, the Console Proxy SystemVM uses 100% of its single CPU when handling the connection.

A quick analysis of the java process suggests the high CPU usage is from the NIOConnection components:
Screenshot from 2024-02-21 11-48-20
NoVncClient getNextBytes:
Screenshot from 2024-02-21 11-48-35

The ~100% CPU usage is happening even when the VNC screen is blank (eg. when the screen is off).

In the mean time, I've changed the console proxy's SystemVM compute offering with additional CPUs to reduce CPU contention as we've had some users complain VNC connections were not responding.

If this is expected behavior of NIOConnection, it may be reasonable to increase the CPU allocations in the default console proxy compute offering.

STEPS TO REPRODUCE
  1. Connect to a KVM VNC session on ACS >4.18.
  2. Connect to the console proxy and watch the java process's CPU usage.
EXPECTED RESULTS

Reasonable CPU usage when proxying a connection when little data (or screen changes) are happening.

ACTUAL RESULTS

I am seeing ~100% CPU usage per active VNC connection even when nothing is happening on the session (eg. a black screen).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions