Michael Jumper commented on GUACAMOLE-668:

Simply measuring instantaneous CPU usage is a poor metric, particularly with 
respect to subjective remote desktop performance. See: 

I don't believe forcing JPEG or WebP for all updates is an option that should 
exist at the guacd level. I would also argue that the option should not exist 
even at the connection parameter level. The surface implementation is intended 
to be clever enough to choose the most appropriate compression, so explicitly 
forcing JPEG/WebP would be a step backward.

Assuming that you are seeing subjective performance issues when PNG is used for 
a particular series of updates, and subjective performance improvements when 
JPEG/WebP are used instead, the proper solution would be to improve the 
heuristics selecting between PNG and JPEG/WebP, not to entirely disable a 
component of Guacamole's optimization subsystem under the assumption that PNG 
will always underperform. Experience has shown that PNG actually performs 
better in terms of subjective responsiveness for non-photographic graphical 
updates, and that choosing JPEG/WebP in a case where PNG would be a better 
choice results in uncomfortable lag. With this in mind, I think any approach 
that eliminates PNG would be inherently incorrect.

What do you think about adding such an ability and what would be the best 
approach to implement this? If you provide guidance, I can try to implement it.

If you have questions about Guacamole, please use the mailing lists. JIRA is 
meant as an issue tracker, not a forum. I would advise against implementing 
this at all for the reasons above, but if you would like to discuss this 
further (ideally taking a step back and considering alternative approaches that 
don't indiscriminately eliminate PNG), I suggest opening a thread on 

> Preferring JPEG due to lower CPU usage - controlling guacd behaviour via some 
> kind of preferences
> -------------------------------------------------------------------------------------------------
>                 Key: GUACAMOLE-668
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-668
>             Project: Guacamole
>          Issue Type: Wish
>          Components: guacd
>            Reporter: Andrzej Dorobisz
>            Priority: Major
> In our HPC center, we observe that guacamole-server (guacd) is generating 
> quite high CPU-usage even if only one session is currently processed (it 
> reaches 100% when moving window back and forth).
> We have tested that using JPEG instead of PNG in 
> "{{__guac_common_surface_flush_}}_" (_src/common/surface.c_) noticeably 
> decreases the CPU usage. When WebP is available it performs better than PNG 
> but still it's slower (in terms of CPU usage) than JPEG.
> We believe that user running _guacd_ should be able to choose which format is 
> preferred - without recompilation. Our first idea was to use _guacd.conf_ for 
> passing such a preference, but we see that it is not so simple. We have to 
> store such a preference somewhere and then pass it to VNC client which is 
> calling {{__guac_common_surface_flush}} function.
> -------
> What do you think about adding such an ability and what would be the best 
> approach to implement this? If you provide guidance, I can try to implement 
> it.

This message was sent by Atlassian JIRA

Reply via email to