XVnc high cpu usage, even when not connected and idle

1,865 views
Skip to first unread message

bsfer...@avnera.com

unread,
Apr 4, 2018, 8:23:57 PM4/4/18
to TigerVNC User Discussion/Support
I built the latest TigerVNC server binary on a headless Linux workstation at work, which also has RealVNC binaries. The TigerVNC XVnc implementation takes considerably more CPU resources. Even when it should be completely dormant waiting for a connection, it for some reason will still see CPU usage hover around 5-10%. During actual usage, it can spike to 80% on a modern Xeon CPU.

Is there a reason for the discrepancy compared to RealVNC? Are there options I can adjust that would bring the CPU usage in line with RealVNC or lower in general? Thank you.

Brian Hinz

unread,
Apr 4, 2018, 9:35:37 PM4/4/18
to bsfer...@avnera.com, TigerVNC User Discussion/Support
On Wed, Apr 4, 2018 at 8:23 PM, bsferrazza wrote:
I built the latest TigerVNC server binary on a headless Linux workstation at work, which also has RealVNC binaries. The TigerVNC XVnc implementation takes considerably more CPU resources. Even when it should be completely dormant waiting for a connection, it for some reason will still see CPU usage hover around 5-10%. During actual usage, it can spike to 80% on a modern Xeon CPU.

Is there a reason for the discrepancy compared to RealVNC? Are there options I can adjust that would bring the CPU usage in line with RealVNC or lower in general? Thank you.

If the server was built with OpenGL support, then one possible source of the discrepancy is software rendering.  I've seen cases of "idle" connections burning significantly more than 5-10% when 3D screensavers start running on the disconnected session.  If you have 3D desktop effects enabled then again this will cost you in terms of CPU cycles because it's all rendered in software.  RealVNC (at least the older binaries) wasn't built with mesa support so 3D rendering wasn't possible at all.

-brian

bsfer...@avnera.com

unread,
Apr 4, 2018, 11:30:49 PM4/4/18
to TigerVNC User Discussion/Support
OK. But I can be sitting there with nothing but a terminal with 'top' running (so virtually static imagery), and it can still hover over 50% CPU usage fairly regularly. These are headless servers at work, so I'm using a dummy video driver with Xorg and the software rasterizer Mesa 3D llvmpipe. But this should be common to both RealVNC and TigerVNC, so it would appear that under the same conditions RealVNC uses less CPU resources. Unless TigerVNC is being more aggressive with its compression and taxes the CPU more as a result. Are there options with TigerVNC server that I can play with to reduce the CPU demand? I'm running Xfce4, and it seems like a rather basic setup. Turning off the alpha transparency on xfce4-terminal didn't seem to improve the CPU usage much.

bsfer...@avnera.com

unread,
Apr 4, 2018, 11:48:42 PM4/4/18
to TigerVNC User Discussion/Support
So here's a perfect example of what I consider to be weird behavior. I can be connected to the TigerVNC server, with nothing but xfce4-terminal open and one tab showing 'top'. If I open another tab and say untar a very large file with the verbose setting so each untarred file is rapidly printed to the terminal, the CPU usage will go up considerably. This much makes sense since it's compressing so many differences between frames. But if I switch back over to the 'top' tab, so the untarring is happening in the background with nothing actually being updated to the display, the Xvnc CPU usage will still be quite high. How could that be?

DRC

unread,
Apr 5, 2018, 12:19:57 AM4/5/18
to tigervn...@googlegroups.com
Spiking to 80% during actual usage is normal on a high-speed network.
You might not be seeing that with RealVNC (particularly the free
version-- RealVNC 4.1.x), because the codecs it used were inefficient
and slow, and it lacked the RFB flow control extensions (thus, your
performance with RealVNC could easily be constrained by the client CPU
or the network.)

Shot in the dark-- are you using a build of TigerVNC based on X.org
1.19.x? If so, then I have seen a similar issue to what you describe,
but I'll have to dig up my notes on it.

bsfer...@avnera.com

unread,
Apr 5, 2018, 12:32:02 AM4/5/18
to TigerVNC User Discussion/Support


On Wednesday, April 4, 2018 at 9:19:57 PM UTC-7, DRC wrote:
Spiking to 80% during actual usage is normal on a high-speed network.
You might not be seeing that with RealVNC (particularly the free
version-- RealVNC 4.1.x), because the codecs it used were inefficient
and slow, and it lacked the RFB flow control extensions (thus, your
performance with RealVNC could easily be constrained by the client CPU
or the network.)


I'm a little confused. So you're saying that because RealVNC's codecs were poor, it actually somehow got away with not being as demanding of the CPU? Wondering if there's build options or runtime options for TigerVNC that could reduce CPU demand with a slight hit in quality/latency.
 

Shot in the dark-- are you using a build of TigerVNC based on X.org
1.19.x?  If so, then I have seen a similar issue to what you describe,
but I'll have to dig up my notes on it. 

Yes, I built TigerVNC 1.8.0 with Xorg 1.19.3, as is described in the latest Linux From Scratch book. 
Reply all
Reply to author
Forward
0 new messages