Why is VNC on Windows so slow?

30

11

In a test, I could stream a full HD movie across our network from my friend's computer, no problem. It's as fast as I could want.

But VNC is painfully slow. We've tried Real VNC and Tight VNC, I've played around with the Capture Method settings, but nothing seems to make a difference; it's just so slow.

Does anyone have any tips on using VNC, on how to improve the speed, or perhaps any alternatives?

Is it the nature of not being able to notice invalidated portions of the screen quickly enough, or is there a network thing slowing it down perhaps?

We are both using Windows 7.

We need to be able to view and control each other's PCs without locking out the host, so RDP will not work (unless someone knows otherwise).

Josh Comley

Posted 2011-05-18T14:26:16.767

Reputation: 3 582

Answers

28

VNC is just plain inefficient. VNC works pretty much by taking a series of screenshots, compressing them, and slinging them across the network

On Windows, RDP will give you better performance, but you need professional or better on the server/source end for proper RDP I believe.

wierdly remote assistance may work better for your needs -its RDP with both the user at the terminal, and the user at the remote system seeing the same screen

EDIT: 4 years on, I'm using nomachine for similar tasks - would work across OSes, and does a few other useful things.

Journeyman Geek

Posted 2011-05-18T14:26:16.767

Reputation: 119 122

⁺¹ for nomachine in particular — it's indeed, somehow, faster. – Hi-Angel – 2016-12-27T13:30:15.257

2

Yup, doesn't work on non-Pro versions, although there's a workaround I suppose. (And +1 of course, VNC sucks)

– slhck – 2011-05-18T14:33:14.957

Ah, I should have stipulated what I did in my edit just now! – Josh Comley – 2011-05-18T14:36:23.107

concurrent sessions, can be done with some [hackery] (http://www.missingremote.com/guide/how-enable-concurrent-sessions-windows-7-service-pack-1-rtm),for VNC style stuff... remote assistance maybe? . Edited my answer to include remote assistance.

– Journeyman Geek – 2011-05-18T14:42:53.510

josh Your edit makes sense, but notice the last line of @journeyman post where he says "remote assistance" may work better. Have you looked at Remote Assistance? I use it occasionally and it works great. – Jay R. Wren – 2011-10-21T23:04:17.633

Edited to reflect that remote assistance really is what you need to use ;) – Journeyman Geek – 2011-10-21T23:49:49.647

Link works for me. - all the link says is to hit start -> go to maintainance -> go to remote assistance. – Journeyman Geek – 2012-10-17T09:48:31.093

Looks like there is a new link (links here are broken), like http://andrewblock.net/2010/02/23/enable-remote-desktop-on-windows-7-home-premium-64-32-bit/ . Anyone tried this and can especially report on the remote assistance (which does not lock the screen)?

– Andreas Reiff – 2014-06-06T07:15:44.827

@AndreasReiff remote assistance doesn't lock the screen. remote desktop in XP and 7 locks the screen. Your link is about enabling remote desktop on windows 7 home premium(a rubbish version of windows 7 that apparently doesn't have remote desktop), that is not the hack people are talking about. The hack people are talking about is about allowing remote desktop to share the screen(not lock it), to share it as it apparently does in server versions of windows. – barlop – 2014-06-06T09:17:12.477

@barlop Thanks for clarifying. Stil, links are broken.. do you have this info? I was having this problem before, and would have used it if available, now I went for VNC as a workaround. – Andreas Reiff – 2014-06-06T09:49:05.390

@AndreasReiff with any broken link you can go to archive.org and see if it's there but anyhow, this answer http://superuser.com/questions/43776/how-can-i-have-multiple-active-windows-sessions-simultaneously mentions this AMAZING link http://digiex.net/guides-reviews/guides-tutorials/windows-guides/1879-enable-concurrent-sessions-windows-7-windows-vista-windows-xp-termsrv-dll.html I haven't tried it yet, if you do then report back

– barlop – 2014-06-06T09:56:55.993

15

VNC is not comparable to video streaming. In video streaming you typically transfer a pre-compressed video stream via the network. For HD streams it's often H.264 encoded. If you use VNC then your host computer has to take screen snapshots and compress them before sending them on to the network. There are several constraints here:

  • Strong compression needs a lot of CPU power. For example encoding a 90 minutes movie in H.264 in high quality often takes more than 4 hours compression time on my Athlon X2 4450e server. Usually such strong compression is unsuitable for real-time applications like remote control.
  • Less strong compression in turn will require more network bandwidth which might become an issue on low-bandwidth connections like the internet.

Well, there are a couple of "tricks" which are applied by video codecs and remote control and screen-sharing utilities. First of all they try to detect the screen changes and transfer the (compressed) image of the changes only. This usually saves A LOT of bandwith and processing power. However for full-screen video transfer it does not help a lot since the whole screen has to be re-transferred too often. As written above current machines will probably be unable to rel-time encode your screen content in Full-HD and stream it to a remote-control application since your host will have to decode the video content and then re-encode the raw images before sending them to the network. Some older Dual-Core machines are even at the limit when decoding Full-HD video content. Not even speaking about having to re-encode the Full-HD images on screen again before sending them to the VNC client.

To improve your VNC remote-control speed you can do the following:

  • Most VNC servers/clients support multiple compression algorithms. Some of them are optimized for small bandwidth, some for good image quality and some for low latency. This touches another aspect of remote control. Since the service is interactive latency matters (you don't want to see the reaction to a mouse click just after 5 minutes of encoding).
  • Try to reduce the amount of screen changes on your host machine. For example try disabling Windows desktop effects, animations etc. This saves bandwitdth as only changed parts of the screen are transferred over network.
  • Try disabling further visual effects on the host like transparency. Transparent Windows as used by Vista/Win7 reduce the "compressability" of images. Uni-colored/"flat" areas are much more efficient to compress than vibrant colors and fancy details. So disabling Aero transparency and desktop effects really speed up remote control experience. Most remote control tools even allow to disable such effects automatically on connect (e.g. Microsoft RDP and some VNC implementations).
  • Same applies to background pictures. Try using uni-colored background setting instead of HD pictures.

Another issue for VNC is that it has to detect the changes on your screen. Some VNC implementations do "dumb" screenshots and compare them to the previous screenshot to detect changes. This is taking a lot of power already. Some more advanced implementations work with special display drivers (check UltraVNC) which are more efficient here but require special drivers to be installed.

Of course all this does not help if you're playing a video on your host machine. In this case VNC will have to re-encode ~30 full-screen images per second and send it via network. On most compressions which can be performed in real-time by todays CPUs such a stream would take > 8Mbps of bandwidth. So it's unsuitable for most internet connections (especially think about asymmetric DSL connections with typically less than 1Mbps upload speed, and yes, it's upload speed which matters on host side).

It might be suitable for LAN use, but here you should probably more think about setting up a media server or share your media using DLNA/UPnP media server (even Win7 media player can do this). Then use a DLNA client to play the shared media.

SkyBeam

Posted 2011-05-18T14:26:16.767

Reputation: 3 612

Nice try but totally wrong, neither the CPU load nor the network usage is anyway high. Even with simple difference transfer it could do a 20fps over a 1gib network. – Lothar – 2017-04-07T18:49:24.903

1+1, nice explanation. I'd also go for the DLNA/Media Server version. – slhck – 2011-05-18T15:02:13.980

4

The absolute fastest VNC variant I've ever used is UltraVNC with the Video Mirror Driver installed. RDP is still noticeably faster, but it's not nearly as bad.

I've also heard really good things about ZeroRemote, but never tested it. It appears that TrueRemote is its successor.

afrazier

Posted 2011-05-18T14:26:16.767

Reputation: 21 316

Not supported on GNU/Linux. – Hi-Angel – 2016-12-27T13:02:03.057

1

If you're trying to watch video across a LAN, the fastest solution in terms of sheer screen-drawing speed is probably Radmin.

Shinrai

Posted 2011-05-18T14:26:16.767

Reputation: 18 051

3Tried Radmin and, yes it's commercial, but it's bloody worth it! Very fast. Fantastic. – Josh Comley – 2011-05-18T21:47:55.663

1

As @Journeyman Geek says, VNC is inefficient. This is by design so that VNC doesn't have to "understand" what the remote client is trying to display.

RDP actually does, so it can take shortcuts and render images faster. RDP tells the other end, for example, "client opened a window at this location" instead of sending the bitmap data representing the screen change.

There are "terminal server" hacks out there that will add RDP capability to the versions of Windows that don't feature them, but I don't officially recommend them and you use these at your own risk. However, I think even the "Starter" versions of Windows 7 come with "Remote Assistance" (msra.exe) which you might try using.

Things you can do to improve VNC performance, however, include lowering the display depth to 8 bits, lowering the resolution of the client screen, and using client-side bitmap caching. That means VNC has to ship less data on the wire and you'll experience better performance (but it won't look pretty).

LawrenceC

Posted 2011-05-18T14:26:16.767

Reputation: 63 487

0

If you are looking for performance you need to not use VNC, Try something like LogMeIn. It's free and works well.

Jeff F.

Posted 2011-05-18T14:26:16.767

Reputation: 4 293

Just tried LogMeIn, didn't like it at all! – Josh Comley – 2011-05-18T14:46:28.793

3I love LogMeIn for remote control, but for video? Not a chance. VNC is at least P2P. It goes directly between the source and destination. LogMeIn introduces a connection through their server, which means you've got much higher latency. All the problems with VNC plus a few more. It's powerful at what it is designed for, but it's not designed for real-time full-screen video. – music2myear – 2011-05-18T15:45:30.637

I'm not trying to do video, I only used video as a test to ensure the connection between the two computers wasn't slow – Josh Comley – 2011-05-18T16:36:04.000

0

You may also try TeamViewer, it's free for non-commercial use and was fairly fast for me. I've not tested it on HD video though.

wizzard0

Posted 2011-05-18T14:26:16.767

Reputation: 488

0

For me, even over internet (with ping rates > 50ms and decent bandwithd > 1mbit/s) I get very good behavior on UltraVNC. The magic comes with changing the connection settings.

After starting the viewer, go to "Connection Options", disable "Auto select best settings", enable "Tight" and lower the "Jpeg" to lower quality, if needed (2-4 works well).

That is the only way I know of of gting Full Colors with decent performance. You will get several fps afterwards, enough to get a fast slideshow on a full screen movie (enough for everything I am doing, including remote development, for real movie watching too slow and also there is no audio).

Also, in server "Properties", it helps to have (if not using mirror driver which greatly helps performance) to have "Poll Full Screen", "Poll Foreground Window", "Poll Window Under Cursor", "System HookDll", "Low Accuracy" turned on. Basically, just about everything on the left.

Andreas Reiff

Posted 2011-05-18T14:26:16.767

Reputation: 895