* Overview
{anchor: Overview}

TurboVNC is a derivative of VNC (Virtual Network Computing) that is tuned to
provide peak performance for full-screen video and 3D workloads.  TurboVNC is
based on the [[http://www.tightvnc.com][TightVNC]] 1.3.x and
[[http://xf4vnc.sourceforge.net/][xf4vnc]] code bases, and on the surface, it
behaves similarly to its parents.  However, TurboVNC compresses 3D and video
workloads better than the "tightest" compression mode of TightVNC 1.3.x while
using only typically 15-20% of the CPU time of the latter.

All VNC implementations, including TurboVNC, use the RFB (remote framebuffer)
protocol to send "framebuffer updates" from the
VNC server to any connected "viewers."  Each framebuffer update can contain
multiple "rectangles" (regions that have changed since the last update.)  As
with TightVNC, TurboVNC analyzes each rectangle, splits it into multiple
"subrectangles", and attempts to encode each subrectangle using the
"subencoding type" that will provide the most efficient compression, given the
number of unique colors in the subrectangle.  The process by which TurboVNC
does this is referred to as an "encoding method."  A rectangle is first
analyzed to determine if any significant portion of it is solid,
and if so, that portion is encoded as a bounding box and a fill color ("Solid
subencoding.")  Of the remaining subrectangles, those with only two colors are
encoded as a 1-bit-per-pixel bitmap with a 2-color palette ("Mono
subencoding"), those with low numbers of unique colors are encoded as a color
palette and an indexed bitmap containing 8 index bits per pixel ("Indexed color
subencoding"), and subrectangles with high numbers of unique colors are encoded
using either JPEG or arrays of RGB pixels ("Raw subencoding"), depending on the
encoding method.  Zlib can optionally be used to compress the indexed color,
mono and raw subrectangles.

Part of TurboVNC's speedup comes from the use of libjpeg-turbo, the same
high-speed SIMD-optimized JPEG codec used by VirtualGL.  However, TurboVNC also
eliminates the CPU-hungry smoothness detection routines that TightVNC uses to
determine whether a subrectangle is a good candidate for JPEG compression, and
TurboVNC's encoding methods tend to favor the use of JPEG more, since it is now
generally the fastest subencoding type.  Furthermore, TurboVNC eliminates
buffer copies, it maximizes network efficiency by splitting framebuffer updates
into relatively large subrectangles, and it uses only the Zlib compression
levels that can be shown to have a measurable performance benefit.  TurboVNC
can compress 3D and video workloads somewhat better and many times faster than
any mode that TightVNC 1.3.x provided, and (using non-default settings)
TurboVNC can also compress 2D workloads nearly as well as TightVNC while using
only half of the CPU time.

TurboVNC is the product of extensive research, in which many different
permutations of the TightVNC encoder were benchmarked at the low level against
a variety of captured RFB sessions that simulated real-world application
workloads, both 2D and 3D.  For more information on the research leading to
TurboVNC's encoder design, see
[[http://www.virtualgl.org/pmwiki/uploads/About/tighttoturbo.pdf][this report]].

In addition to high performance, other notable features of TurboVNC include:

	* Fine-grained control over the JPEG image quality and the level of
		chrominance subsampling

	* Double buffering on the client side to reduce tearing artifacts in 3D and
		video applications

	* TurboVNC has the ability to hide network latency by decompressing and
		drawing a frame on the client while the next frame is being fetched from
		the server.  This can improve performance dramatically on high-latency
		connections.

	* TurboVNC supports authentication with one-time passwords or Unix login
		credentials.  Access control lists can be used to share VNC sessions with
		only certain users.

	* TurboVNC allows security/authentication policies to be set globally for a
		particular server machine.

	* TurboVNC provides a "lossless refresh" feature, which sends a
		lossless copy of the current screen image.  This is useful in situations in
		which image quality is critical but the network is too slow to support
		sending a high-quality image for every frame.  Lossless refreshes can be
		performed manually when a certain hotkey is pressed, or the TurboVNC Server
		can be configured to send a lossless refresh automatically if the user
		stops interacting with the application for a certain period of time.

TurboVNC, when used with VirtualGL, provides a highly performant and robust
solution for remotely displaying 3D applications over all types of networks.

TurboVNC is capable of sending 50+ Megapixels/second of image data over a
100 Megabit/second local area network with perceptually lossless image quality.
TurboVNC can deliver between 10 and 12 Megapixels/second of image data over a 5
Megabit/second broadband connection at reduced (but usable) image quality.

TurboVNC is compatible with other VNC distributions.  See
{ref prefix="Chapter ": Compatibility} for more information.  TurboVNC can be
installed onto the same system as other VNC distributions without interference.
