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

High CPU Usage #154

Closed
mmolaie opened this issue Apr 30, 2023 · 9 comments
Closed

High CPU Usage #154

mmolaie opened this issue Apr 30, 2023 · 9 comments

Comments

@mmolaie
Copy link

mmolaie commented Apr 30, 2023

hello
i have install kasmvnc on docker ubuntu 20.04
hight CPU Usage on Xvnc when connect to it. Over 200%
what should i do?

@mmcclaskey
Copy link
Collaborator

Sorry for the delayed response. Are you still experiencing this issue. If so, can you provide the output of top so I can see what other processes are going on.

@ich777
Copy link

ich777 commented Aug 18, 2023

@mmcclaskey hi, thank you for the Debian Bookworm build. I'm running into some issues where I get really high CPU usage when something is moving on the screen (Intel i5-10600 60-70% utilization) is this expected? Most certainly I'm missing something.
I passed through /dev/dri to the container and I also can see that my iGPU is used from Xvnc but the CPU usage stays really high.

Don't know if I should post in #163 or here but I think this issue is more appropriate.

If you need anything please let me know, attached also a few pictures:

grafik

grafik

@mmcclaskey
Copy link
Collaborator

It looks like there are a lot of Xvnc processes running, can you explain what is going on there?

What is your desktop environment? Can you try disabling compositing in your desktop environment to see if the CPU utilization drops?

@ich777
Copy link

ich777 commented Aug 18, 2023

I really don't know, I just start the kasmvncserver and after that xfce4-session (I use XFCE4) and then this happens.

Disabling compositing also doesn't help, it looks pretty much the same.

@thelamer
Copy link

@ich777 no this is not normal, please post the exact methodology you used to start kasmvncserver and the accompanying logs. (pastebin)
There should only ever be one Xvnc pid in your tree.

@ich777
Copy link

ich777 commented Aug 20, 2023

@thelamer sure thing, I uploaded the logs here: kasmvnc.log

I just do that:

kasmvncserver :0 -noxstartup -hw3d -disableBasicAuth
xfce4-session --display=:0

@ich777
Copy link

ich777 commented Sep 6, 2023

Still not solved but I give up on KasmVNC.

@thelamer
Copy link

thelamer commented Sep 6, 2023

Despite support for GPUs for the actual desktop session all of our encoding methods are done in pure CPU. I think some of the confusion in this thread is us looking at the htop output and concluding many Xvnc instances are running at once but that is just how htop displays threaded applications.
With a video playing back or high movement KasmVNC will use all the CPU it can get it's hands on to attempt to deliver rects at 60fps.

@mmcclaskey
Copy link
Collaborator

For others that run into this issue, KasmVNC by default will automatically create N number of threads based on how many cores your system has. It looks like for @ich777 system KasmVNC was creating a lot of threads for encoding. You can override the encoding.rect_encoding_mode.rectangle_compress_threads setting, if for some reason Kasm is being overly greedy. Perhaps you are running it on a system with a lot of cores and hyperthreads, we don't really have a lot of information to go on. Since the submitter gave up on kasmvnc, I will close the issue. If others run into this, try adjusting this setting and provide us more details on your system and what setting worked for you.

https://www.kasmweb.com/kasmvnc/docs/latest/configuration.html#encoding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants