High CPU Usage and General Troubleshooting #4168
Replies: 2 comments
-
I'm sure this is just an artifact of your script, but this is a display number, not a socket.
You could also use
These are both client side switches and won't have any effect on a server.
That's already the default, so this has no effect.
That's very unlikely, as there is no code even referring to sockets or socket-dirs in the clipboard adapters.
That's the software renderer, not a GPU.
Is the CPU usage really coming from xpra?
This is well out of date.
Kernel bug?
Use
Are you sure that the popups are from xpra itself?
I have no idea what
These are not xpra messages.
Also not from xpra.
The details are missing.
I see no sign of that here, but it is possible. |
Beta Was this translation helpful? Give feedback.
-
Not heard back, closing. |
Beta Was this translation helpful? Give feedback.
-
I posted a couple weeks ago regarding Xpra for FreeBSD jails. I've automated the basic integration into my system, but I'm still having lingering issues, and some points I could use some clarity on.
Setup Overview
FreeBSD 14.0-RELEASE-p5 with i3wm. All workstation activities are conducted inside jails (kernel-virtualized FreeBSD containers). Host is merely a coordinator for jails.
Jails with X11, start an xpra server with the following command:
xpra start :${_socket} --socket-dir=/tmp/xpra --opengl=force --speaker=off --pulseaudio=no --notifications=no --tray=no --system-tray=no --mmap=/tmp/xpra --desktop-scaling=auto --clipboard=yes --clipboard-direction=both > /dev/null 2>&1 &
Host (which has the Xorg display) starts one xpra client per X11 jail with the following command:
xpra attach --socket-dir=/<path_to_jail>/tmp/xpra --opengl=force --speaker=off --pulseaudio=no --notifications=no --tray=no --system-tray=no --mmap=/<path_to_jail>/tmp/xpra --desktop-scaling=auto --clipboard=yes --clipboard-direction=both > /dev/null 2>&1 &'
Note:
--socket-dir
is being used, because otherwise--cliboard and --clipboard-direction
don't seem to work.X11 applications are started inside jails with the following command:
xpra control :${_socket} start <APP>
GPU is exposed to the jails, and logs show OpenGL is being used. Log example:
Primary Issues
I'm getting huge bursts of CPU.
ps -axJ <jail>
shows 500-1100%, sometimes up to 3600% (on a 24/48 threadripper). Particularly when switching to a new i3 workspace that has a web browser with videos, social media, and/or charting webapp. Typically it settles down to 50%-200 in about 5-10 seconds, but even just switching tabs can spike it up again. Comparing side-by-side shows a 2-10x difference in CPU usage (compared to jails that directly access the host .X11-unix socket without Xpra).I added the options:
--desktop-scaling=auto and --mmap=/tmp/xpra
and it seemed like the spikes were shorter and less severe, but I'm not sure if these could be better formatted. There is intermittent fuzziness during normal workstation activities, that didnt seem to be present without scaling=auto.I'm also getting intermittent kernel panics, which almost never happened previously. Last debug showed:
Other issues
I'm not sure if
--speaker=off --pulseaudio=no
is being honored. Logs show:I'm not sure if
--notifications=no --tray=no --system-tray=no
is being honored either, as I get popups when the client connects or is disconnected. I'd prefer to suppress the popups.With telegram-desktop, all typing inside the app is very laggy/delayed until a clipboard copy is performed (then typing is normal/immediate). Xpra starts/attaches successfully with about 140 lines in server.log. In the interest of space, here's the briefest log snippets (with line numbers included).
After launching app:
After performing a copy operation inside the app:
Wrapping Up
I've tested a number of different options/configs but I'm not really sure where to troubleshoot next. I wonder if dbus could be an issue? I have dbus installed/enabled on the host and inside the jails. I've attached a full log from the jail "disp1". This should be representative of what xpra start/attach looks like for all jails (excepting the jail with telegram-desktop in it).
Thanks in advance. I know this is a long write up. Any help is appreciated.
server.log
Beta Was this translation helpful? Give feedback.
All reactions