ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
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:

NoVncClient getNextBytes:

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
- Connect to a KVM VNC session on ACS >4.18.
- 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).
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
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:


NoVncClient getNextBytes:
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
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).