Jump to content


Photo
- - - - -

Why does VNC suck?


  • Please log in to reply
10 replies to this topic

#1 Drake Anubis

Drake Anubis

    Never Forget

  • Agents of the Revolution
  • 911 posts
  • Gender:Not Telling
  • Location:San Diego, CA

Posted 18 July 2008 - 01:50 PM

Right now I am connected to another machine over VNC, and I don't understand why it feels like I'm connective over VNC. Things, like windows that don't drag in real time (ie, you move them and it takes a couple moments for the window to snap to the new location on my screen), or the screen saver that is refereshing about once every second or two.

I'm connecting into this quad-core machine over gigabit Ethernet. This machine is fast enough to encode and stream extremely high quality video, and the network is fast enough to move it, and my dual-core laptop is fast enough to decode it. Why does it still look like crap?

(Yes, I'm aware that it's dependent on my setup, compression, client, resolution, server, polling, color depth...etc), but I've never seen really good VNC in general, like VNC so good that forgot you were using it. The only thing that I've seen that comes close is desktop sharing in iChat because it has some impressive compression system)

#2 LUCKY_FUCKIN_CHARMS

LUCKY_FUCKIN_CHARMS

    TCP/IP....PI/MP

  • Members
  • 1,493 posts
  • Gender:Male
  • Location:Las Vegas

Posted 18 July 2008 - 02:38 PM

i dont ever have this problem in ultraVNC i mean sure it can get a little bit laggy every so often but for the most part it looks great in full color in ultra mode 2mbit connection. are you running multiple vnc viewer connections? even though youre usint mbit nics ultra tops out at 2mbit/s this is a shot from my mini note 2133

Attached Files



#3 Enmaku

Enmaku

    SUP3R 31337

  • Members
  • 163 posts
  • Gender:Male
  • Country:
  • Location:Las Vegas, NV

Posted 18 July 2008 - 03:11 PM

I had the same problem with TightVNC on my home lan (not gigabit or ultra high end mind you, but 100meg and decent machines)

Not sure exactly why but it was something about the encoding, I switched to Hextile and everything just worked. Might try different encoding methods

#4 UTS_HOST

UTS_HOST

    SUP3R 31337

  • Members
  • 152 posts

Posted 18 July 2008 - 03:25 PM

the free vnc use's a crap encoding. the one you pay for is good. plus it has encryption.

#5 mirrorshades

mirrorshades

    aviatorglasses

  • Agents of the Revolution
  • 951 posts
  • Gender:Male

Posted 18 July 2008 - 08:42 PM

VNC doesn't suck, you're just not looking at it in the right way. It is not, nor was it ever, designed to be a true remote desktop or x-style/thin client interface to a machine. It is purely a remote control utility. Instead of just giving a "virtual" desktop like RDP or Citrix, it has to take everything that is on the screen, encode it, pipe it over the connection, un-encode it, then re-create the desktop... all in as close to real-time as possible.

Put another way, it's kind of like watching TV over a closed-circuit camera. Yes, if you were just watching TV natively or through a super-duper high-end elaborate videoconferencing setup, it would look and sound a lot better... but that's not what a closed-circuit camera is designed to do. :)

I have used and loved VNC for several years now; it is great in a pinch, and I wouldn't hesitate to recommend it to anyone in need of a remote control solution. It's not made to be pretty or slick; it's made to get the job done. And it does.

#6 BSDfan

BSDfan

    SUPR3M3 31337 Mack Daddy P1MP

  • Banned
  • 300 posts

Posted 18 July 2008 - 08:51 PM

mirrorshades is absolutely correct.

#7 Drake Anubis

Drake Anubis

    Never Forget

  • Agents of the Revolution
  • 911 posts
  • Gender:Not Telling
  • Location:San Diego, CA

Posted 18 July 2008 - 10:27 PM

It is purely a remote control utility. Instead of just giving a "virtual" desktop like RDP or Citrix, it has to take everything that is on the screen, encode it, pipe it over the connection, un-encode it, then re-create the desktop... all in as close to real-time as possible.


I agree with the first part of your argument, I didn't think about it but you are right, they were all designed to be tools. I need a VNC that is actually designed to create a seamless experience. Somebody above said that the VNCs you pay for a better, and I think that makes sense. Like the Apple iChat Screen Sharing thing is pretty amazing in that it uses Variable Compression.

The second part of your statement, and I had to think about this for a while to make sure I wasn't wrong before destroying it like a prick, is completely nonsense. In a previous life I did professional multimedia production for a living, and the hardest computer related encoding task is determining what has changed in an image. Thats why codecs like h.264 take much longer to encode because the computer spends most of it's time trying to figure out how it can use the least amount of space to store the "most" amount of day, it's very very hard.

Given THAT is the hardest encoding problem, it does not apply (maybe a little, but not even close) to the desktop. In a video the pixels are constantly changing (lens noise, shadows, lighting...etc), and the computer decides which are important and which aren't. On the desktop it's perfectly easy for a computer to decede what has changed, because the screen will remain perfectly the same unless a change happens. The computer doesn't usually need to calculate tolerances, it never has to decide "Did the menu open enough for me to care about it?" because it's pretty black and white if the menu is open.

So not only is encoding for VNC significantly less difficult than encoding video, I'm using a machine that can handle it. When this machine was built (for video editing and encoding) like two years ago, it was arguably the fast machine that money could buy (for that task). The GPU, CPU, and RAM were all the fastest possible at the time. I get the same VNC experience now, that I got on my 1.2Ghz machine. But this machine has 3.0GHz(x4). VNC can monopolize 1, 2, or even 3 cores for it's processing if it can't unload some of that to the GPU (and it's my understand that only commercial VNC products really leverage GPU power).

"Pipe it over that connection", also doesn't apply because this network was built to support production class machines that had to move huge amounts of data between computers and a NAS. Not only does it have the bandwidth to support more data, it is correctly setup and can route data as fast as any network.

"Un-encode it", Decompressing doesn't take as much power as encoding/compressing. Even though my laptop is only a dual-core machine, that should be more than enough to decode anything sufficiently.

"Re-create the desktop", I don't actually know at all how that works, so you could have a point, maybe creative the desktop is very hard. But I have played games like bioshock and half-life on my laptop, and I would assume that those are going to work the system much harder.

Although I would completely agree that like CCTV systems, VNC was designed for a different purpose than creating a really smooth desktop session (cctv vs. video conferencing). And I don't all mean for this to sound like a personal attack, but your excuse that VNC is doing a difficult task and limited by processing/bandwidth, is completely wrong. (And it's possible that I misunderstood that, you could have just been pointing out the obvious significance of what it's doing, not necessarily that it's limited by any of those components)

#8 mirrorshades

mirrorshades

    aviatorglasses

  • Agents of the Revolution
  • 951 posts
  • Gender:Male

Posted 18 July 2008 - 11:11 PM

Well, I really know approximately zero about image encoding and manipulation, so I can't speak to how easy or hard something is, or why they did things a certain way. I know it can't be *too* hard, since stuff like Citrix and RDP work pretty nicely. But the details are out of my reach.

Also, VNC has roots way way back. It was also originally designed to be as cross-platform (i.e. elegantly functional) as possible. A lot of the modern day flavors have simply taken the existing code and brought it forward, so there is legacy code in there that is likely in need of a nice rewrite. UltraVNC is a variant that caters to Windows, and I've noticed some performance gains when using that one compared to some others. TightVNC, by counterexample, is optimized for slow connections, so it is more "lossy" than other variants.

I dunno, I guess I just never had extremely high expectations for it. I was a kid when 2400 baud was king, so lag never bothered me. (I still recall how fast I thought a 14.4kbps modem was when I first saw one.) VNC works great as a tool, but not so much as a remote desktop.

Ah, here is what Wikipedia has to say about how it works: http://en.wikipedia....i/Vnc#Operation

The VNC protocol (RFB) is very simple, based on one graphic primitive from server to client ("Put a rectangle of pixel data at the specified X,Y position") and event messages from client to server.

The server sends small rectangles of the framebuffer to the client. In its simplest form, the VNC protocol can use a lot of bandwidth, so various methods have been devised to reduce the communication overhead. For example, there are various encodings (methods to determine the most efficient way to transfer these rectangles). The VNC protocol allows the client and server to negotiate which encoding will be used. The simplest encoding, which is supported by all clients and servers, is the raw encoding where pixel data is sent in left-to-right scanline order, and after the original full screen has been transmitted, only transfers rectangles that change. This encoding works very well if only a small portion of the screen changes from one frame to the next (like a mouse pointer moving across a desktop, or text being written at the cursor), but bandwidth demands get very high if a lot of pixels change at the same time, such as when scrolling a window or viewing full-screen video.



#9 Drake Anubis

Drake Anubis

    Never Forget

  • Agents of the Revolution
  • 911 posts
  • Gender:Not Telling
  • Location:San Diego, CA

Posted 18 July 2008 - 11:41 PM

stuff like Citrix and RDP work pretty nicely


They use some neat methods of polling coupled with variable bit rates and black magic.

#10 slowz3r

slowz3r

    Will I break 10 posts?

  • Members
  • 4 posts
  • Location:"CrownTown" CA

Posted 23 July 2008 - 06:02 PM

If i may recommend something

Try RADMIN, Ive had nothing but pleasant experiences :)

http://www.radmin.com/

#11 p0larized

p0larized

    I broke 10 posts and all I got was this lousy title!

  • Members
  • 13 posts

Posted 01 August 2008 - 01:45 AM

Using it in an SSH tunnel with compression enabled will speed things up a bit.

Another reason VNC is so slow is because it will refresh the entire screen with each little movement of the mouse. More robust remote applications will just refresh the portions of the screen that show movement. I think the paid VNC apps do this as well.

Edited by p0larized, 01 August 2008 - 01:49 AM.





BinRev is hosted by the great people at Lunarpages!