Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Why is X11VNC incredibly slow on a gigabit lan?

  1. #1
    Join Date
    Feb 2009
    Beans
    28

    Why is X11VNC incredibly slow on a gigabit lan?

    I'm new to Ubuntu (and Linux) but I've installed x11vnc (sudo apt-get install x11vnc) and then I run "x11vnc -display :0 &" to start the server.

    After that I use RealVNC VNC Viewer on my Windows Vista machine to connec to x11vnc and it works but it's incredibly slow. (eg. it's unusuable)

    I've checked my RealVNC settings and it's only requesting low color (8 colors) and it's definitely not a bandwidth issue since I'm on a gigabit lan so what else is going on?

    Do I need to configure something else?

    Also, how do I get x11vnc server to start with X?

  2. #2
    Join Date
    Dec 2006
    Beans
    810

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    Quote Originally Posted by sofakng View Post
    I'm new to Ubuntu (and Linux) but I've installed x11vnc (sudo apt-get install x11vnc) and then I run "x11vnc -display :0 &" to start the server.

    After that I use RealVNC VNC Viewer on my Windows Vista machine to connec to x11vnc and it works but it's incredibly slow. (eg. it's unusuable)

    I've checked my RealVNC settings and it's only requesting low color (8 colors) and it's definitely not a bandwidth issue since I'm on a gigabit lan so what else is going on?
    How fast is your graphics card's read rate? (not write rate)

    x11vnc prints out how fast your read rate is:
    Code:
    16/03/2009 13:17:07 Autoprobing TCP port 
    16/03/2009 13:17:07 Autoprobing selected port 5900
    16/03/2009 13:17:08 fb read rate: 10 MB/sec
    16/03/2009 13:17:08 screen setup finished.
    Please post what it prints out for your card.

    Most Xorg drivers are slow like the above (10 MB/sec). This will be the bottleneck on fast LAN. E.g. it takes 0.5 seconds to read in a single 1280x1024x32 screen, so the most you could expect is 2 of those frames per second.

    Nvidia drivers can be 400+ MB/sec and this makes a very big different for LAN usage. Also, if one must use Xorg drivers and he doesn't care much for very fast local performance, he can set the ShadowFB option in xorg.conf.

    More info Here.

  3. #3
    Join Date
    Mar 2009
    Location
    India
    Beans
    55
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    maybe you can try out tightvnc... i have not tried x11vnc, but on this one, i get reasonably good performance on a 100Mbps line..

  4. #4
    Join Date
    Dec 2006
    Beans
    810

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    How fast is your graphics card's read rate? (not write rate)
    If the read rate limitation is not the problem here are some other things one can check.

    1) Try adding the option "-noxdamage" to the x11vnc command. In compiz/Xorg the XDAMAGE extension is broken (changes happen to the screen but are not reported to apps who are interested in changes like x11vnc.)

    2) Make sure the connection is not using the "raw" or even "hextile" encoding. The "raw" encoding has no compression and can be slow even on LAN. Here is x11vnc output showing this problem:

    Code:
    17/03/2009 20:18:24 Pixel format for client 127.0.0.1:
    17/03/2009 20:18:24   32 bpp, depth 24, little endian
    17/03/2009 20:18:24   true colour: max r 255 g 255 b 255, shift r 16 g 8 b
    17/03/2009 20:18:24 Enabling X-style cursor updates for client 127.0.0.1
    ...
    17/03/2009 20:18:24 Using raw encoding for client 127.0.0.1

  5. #5
    Join Date
    Feb 2009
    Beans
    28

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    Thanks for the replies!

    I'll try "-noxdamage" when I get home but noticed two things from my logfile:

    1) The fb read rate is 362 MB/sec.
    2) It appears as though I'm using ZRLE encoding but for some reason it switches to hextile.

    Can somebody check my log file? It's located here: http://pastebin.com/mf0088e4

    EDIT: I'm using RealVNC on Windows Vista to connec to x11vnc and I have the encoding set to "Auto select" (and ZRLE is an available option so it should work...?)
    Last edited by sofakng; March 18th, 2009 at 02:24 PM.

  6. #6
    Join Date
    Dec 2006
    Beans
    810

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    Quote Originally Posted by sofakng View Post
    I'll try "-noxdamage" when I get home but noticed two things from my logfile:

    1) The fb read rate is 362 MB/sec.
    That's a good read rate, so it shouldn't be the problem. Using Nvidia drivers, correct?

    2) It appears as though I'm using ZRLE encoding but for some reason it switches to hextile.
    Hextile should be OK on fast LAN. I did a test and it seems a bit faster than ZRLE (but it uses a lot of bandwidth.)

    Can somebody check my log file? It's located here: http://pastebin.com/mf0088e4
    Your log looks pretty reasonable.

    Can you define and quantify which activities are slow, your estimate how long they are taking, etc.? Thanks.

    I'm using RealVNC on Windows Vista to connec to x11vnc and I have the encoding set to "Auto select" (and ZRLE is an available option so it should work...?)
    You probably don't need to play with that, but you can if nothing else works. I hope the problem is the xdamage bug...

    BTW, in the past I have noticed slower than expected response running vnc viewers on Windows machines over a LAN. Do you have a 2nd Linux machine you could run the viewer on as a test? Maybe boot the windows machine with a Linux live-cd?

  7. #7
    Join Date
    Feb 2009
    Beans
    28

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    I've tried the -noxdamage parameter and it solved my problem!

    Thanks so much for the help.

    One last question though...

    How can I get x11vnc to always run in the background and not exit after I disconnect a vnc session?

    My system is setup so that tty2 uses autologin and "startx" is executed using .bash_profile. (eg. it's a home theater PC that uses Ubuntu)

  8. #8
    Join Date
    Dec 2006
    Beans
    810

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    Quote Originally Posted by sofakng View Post
    I've tried the -noxdamage parameter and it solved my problem!
    Great, I am glad it is working for you!

    It is unfortunate that Xorg hasn't fixed this bug going on 3 years now. Feel free to add yourself to the bug report.

    The main problem seems to be the X server's interaction with the (very silly IMHO) compiz/beryl, etc. compositing window managers. I think going back to a normal window manager would allow x11vnc to work with XDAMAGE (this gives a nice performance improvement.)
    How can I get x11vnc to always run in the background and not exit after I disconnect a vnc session?

    My system is setup so that tty2 uses autologin and "startx" is executed using .bash_profile. (eg. it's a home theater PC that uses Ubuntu)
    Have a look at these:

    http://www.karlrunge.com/x11vnc/faq.html#faq-service

    http://www.karlrunge.com/x11vnc/faq....isplay-manager

    It is the '-forever' option that keeps it waiting for more connections. Perhaps there is a 'xclients' or 'startup' script you can add the x11vnc command to.

    Search these forums for 'x11vnc forever' and I think you'll get some useful ideas.

  9. #9
    Join Date
    May 2007
    Beans
    1,197

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    Quote Originally Posted by krunge View Post
    How fast is your graphics card's read rate? (not write rate)

    x11vnc prints out how fast your read rate is:
    Code:
    16/03/2009 13:17:07 Autoprobing TCP port 
    16/03/2009 13:17:07 Autoprobing selected port 5900
    16/03/2009 13:17:08 fb read rate: 10 MB/sec
    16/03/2009 13:17:08 screen setup finished.
    Please post what it prints out for your card.

    Most Xorg drivers are slow like the above (10 MB/sec). This will be the bottleneck on fast LAN. E.g. it takes 0.5 seconds to read in a single 1280x1024x32 screen, so the most you could expect is 2 of those frames per second.

    Nvidia drivers can be 400+ MB/sec and this makes a very big different for LAN usage. Also, if one must use Xorg drivers and he doesn't care much for very fast local performance, he can set the ShadowFB option in xorg.conf.
    When you talk about the graphics card's read rate, is that referring to the graphics card in the server computer or the viewer computer? The fact that you are referring to this in relation to x11vnc, makes me think it may be the server computer's read rate to which you refer-- but then the server computer is sending and the viewer computer is reading, so it doesn't completely make sense that one would be concerned about the read rate on the sending computer.

  10. #10
    Join Date
    Dec 2006
    Beans
    810

    Re: Why is X11VNC incredibly slow on a gigabit lan?

    Quote Originally Posted by swarup View Post
    When you talk about the graphics card's read rate, is that referring to the graphics card in the server computer or the viewer computer? The fact that you are referring to this in relation to x11vnc, makes me think it may be the server computer's read rate to which you refer-- but then the server computer is sending and the viewer computer is reading, so it doesn't completely make sense that one would be concerned about the read rate on the sending computer.
    A better term I have seen used (and should use myself) is 'readback rate'. I.e. what is the rate at which pixels rendered in the graphic hardware's framebuffer memory (Video RAM) can be read back into the computer's main memory (main RAM, where x11vnc accesses it.)

    Yes, this rate is on the x11vnc side (VNC server), and is a rate local to that computer (i.e. on the "DAN": Desktop Area Network.)

    Having this local-rate high makes a noticable difference in VNC response, except perhaps when connecting to x11vnc over the slowest network links.

    I'm building a new desktop for myself and one constraint is to use nvidia and its proprietary drivers because I access the desktop alot via x11vnc. I'm not too keen on proprietary drivers, but it doesn't look like Xorg drivers will ever reach this level of performance.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •