guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dogbert <>
Subject Re: Guacamole 0.9.12 WAN Performance (Ubuntu 14, XDRP)
Date Tue, 06 Jun 2017 14:48:57 GMT
Hi Al Gore/Cody,

So I saw this email and I'm looking into Guacamole again, a while ago I did
a poc(project taken over from offshore) with Guac looking to move to it
from novnc. I have seen CPU spikes, even on my dev box(quad core 8 thread
32GB of RAM), when running a session. My sessions are running CAD like apps
with a 3D model and moving the model can cause a cpu spike. Right now I'm
using version 0.9.9, but I'm getting IT to upgrade me to 0.9.12(Don't have
sudo on my box at this job). Also might be worth noting that my dev box is
running Centos 6.7.  With my application I think I'm running over
websockets, but my question is how can I be sure? My endpoint is running on
a Grails app with endpoint code bellow(I have fixed the todo in another
branch). Also When I connect I use a ws:// url. If I run in FireFox I see
not network traffic, but if I run it chrome I see a bunch of get request.


package com.commpany.vnc.guacamole

import grails.util.Environment
import org.glyptodon.guacamole.GuacamoleException
import org.glyptodon.guacamole.protocol.ConfiguredGuacamoleSocket
import org.glyptodon.guacamole.protocol.GuacamoleClientInformation
import org.glyptodon.guacamole.protocol.GuacamoleConfiguration
import org.glyptodon.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint

import javax.servlet.ServletContext
import javax.servlet.ServletContextEvent
import javax.servlet.ServletContextListener
import javax.websocket.EndpointConfig
import javax.websocket.Session
import javax.websocket.server.ServerContainer
import javax.websocket.server.ServerEndpoint

@ServerEndpoint(value = "/guacamole/websocket", subprotocols = ["guacamole"])
class GuacamoleEndpoint extends GuacamoleWebSocketTunnelEndpoint
implements ServletContextListener {

    void contextInitialized(ServletContextEvent sce) {
        ServletContext servletContext = sce.servletContext
        ServerContainer serverContainer =

        try {
            // This is necessary for Grails to add the endpoint in development.
            // In production, the endpoint will be added by the @ServerEndpoint
            // annotation.
            if (Environment.current == Environment.DEVELOPMENT) {
            serverContainer.defaultMaxSessionIdleTimeout = 0
        } catch (IOException e) {
            log.error(e.message, e)

    void contextDestroyed(ServletContextEvent sce) {


    protected GuacamoleTunnel createTunnel(Session session,
EndpointConfig config) throws GuacamoleException {
        String colorDepth = session.requestParameterMap.colorDepth[0]
        Boolean cursor =
        Boolean readOnly =

        GuacamoleClientInformation info = new GuacamoleClientInformation();

        GuacamoleConfiguration guacamoleConfig = new GuacamoleConfiguration()
        //TODO Replace with a more secure method of getting the params

        if (colorDepth) {
            guacamoleConfig.setParameter("color-depth", colorDepth)//
can set it to 16 but not 8.

        if (cursor) {
            guacamoleConfig.setParameter("cursor", 'remote')

        if (readOnly) {
            guacamoleConfig.setParameter("read-only", "true")

        GuacamoleSocket socket = new ConfiguredGuacamoleSocket(new
InetGuacamoleSocket("localhost", 4822), guacamoleConfig, info)

        // Return a new tunnel which uses the connected socket
        return new SimpleGuacamoleTunnel(socket)

On Fri, Jun 2, 2017 at 9:40 AM, Al Gore <> wrote:

> The most common issues are CPU on the guacd server and using HTTP instead
> of
> websockets. Here is how you can figure this out:
> 1. Run "top" on your guacd server, open a console to one of your Ubuntu
> hosts in a browser, then open a terminal window or something and drag it
> quickly in a circle while watching top. Note the CPU usage on your guacd
> server. If it is really high, either you are running on HTTP comms, your VM
> integration components are out of date, or the CPU just isn't powerful
> enough. Try setting "maximum performance" power settings and
> installing/upgrading your VM integration components.
> 2. Open a browser debugger (F12) and connect to an Ubuntu instance. Note
> the
> protocol being used for the connection. If you see a large number of HTTP
> requests that occur every second or so continuously, then you are stuck on
> HTTP and websockets are not working. This will cause massive overhead.
> If you find out that one of these is the problem, I can help point you in
> the right direction to fix it. If they are not the problem, I know a few
> other things to look at.
> --
> View this message in context: http://apache-guacamole-
> WAN-Performance-Ubuntu-14-XDRP-tp1040p1043.html
> Sent from the Apache Guacamole (incubating) - Users mailing list archive
> at

View raw message