Bandwidth Allocation for Terminal Server connections over RDP

Published Sep 07 2018 05:54 PM 700 Views
Occasional Contributor
First published on CloudBlogs on Apr, 09 2007

Over a Terminal Server RDP connection, there are multiple applications (for example video, clipboard, printer output etc) that send data over the connection from server to client.  On a low bandwidth connection these applications compete for available bandwidth.  As a result, important graphics data, such as the location of a window the user moves on the desktop, has to compete with data transmitted in the background, like a print job or a file copy. This problem manifests itself most severely when printing a large document over a low bandwidth connection. The printer data competes for available bandwidth with the video rendering, thus deteriorating the graphics rendering significantly.

In Vista (and Longhorn Server) we fix this by introducing a simple scheme wherein a fixed percentage of bandwidth is allocated to video, and the rest goes to virtual channel traffic (this means all kind of redirections). By default this allocation is 70% for Video and 30% for virtual channel data, meaning when bandwidth usage is under pressure video data is guaranteed to get 70% of the available bandwidth.

Although this scheme does solve the problem effectively, there could be some scenarios that might want to tweak it a bit. There are some registry values that can be set to tweak these settings. < Note these are unsupported settings so all the legal disclaimers apply! > A reboot is required for these setting to take effect.

Below is the list of registry values that affect the bandwidth allocation behavior. These are all DWORD values under HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTermDD

FlowControlDisable:

When set to 1 this value will disable new flow control algorithm; making it essentially FIFO (First-In-First-Out) for all packet requests. This provides results similar to win2k3. (Default for this value is 0).

FlowControlDisplayBandwidth / FlowControlChannelBandwidth:

These two values together determine the bandwidth distribution between display and virtual channels. You can set these values in the range of 0-255. For example setting FlowControlDisplayBandwidth = 100 and FlowControlChannelBandwidth = 100 will make the equal bandwidth distribution between video and VCs. The default is 70 for FlowControlDisplayBandwidth and 30 for FlowControlChannelBandwidth, thus making the default distribution equal to 70-30.

FlowControlChargePostCompression:

This value if set to 1 bases the bandwidth allocation on post-compression bandwidth usage. Default for this value is 0 - meaning the bandwidth distribution is applied on Pre-Compressed data.

%3CLINGO-SUB%20id%3D%22lingo-sub-246511%22%20slang%3D%22en-US%22%3EBandwidth%20Allocation%20for%20Terminal%20Server%20connections%20over%20RDP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-246511%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20CloudBlogs%20on%20Apr%2C%2009%202007%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EOver%20a%20Terminal%20Server%20RDP%20connection%2C%20there%20are%20multiple%20applications%20(for%20example%20video%2C%20clipboard%2C%20printer%20output%20etc)%20that%20send%20data%20over%20the%20connection%20from%20server%20to%20client.%26nbsp%3B%20On%20a%20low%20bandwidth%20connection%20these%20applications%20compete%20for%20available%20bandwidth.%26nbsp%3B%20As%20a%20result%2C%20important%20graphics%20data%2C%20such%20as%20the%20location%20of%20a%20window%20the%20user%20moves%20on%20the%20desktop%2C%20has%20to%20compete%20with%20data%20transmitted%20in%20the%20background%2C%20like%20a%20print%20job%20or%20a%20file%20copy.%20This%20problem%20manifests%20itself%20most%20severely%20when%20printing%20a%20large%20document%20over%20a%20low%20bandwidth%20connection.%20The%20printer%20data%20competes%20for%20available%20bandwidth%20with%20the%20video%20rendering%2C%20thus%20deteriorating%20the%20graphics%20rendering%20significantly.%3C%2FP%3E%0A%20%20%3CP%3EIn%20Vista%20(and%20Longhorn%20Server)%20we%20fix%20this%20by%20introducing%20a%20simple%20scheme%20wherein%20a%20fixed%20percentage%20of%20bandwidth%20is%20allocated%20to%20video%2C%20and%20the%20rest%20goes%20to%20virtual%20channel%20traffic%20(this%20means%20all%20kind%20of%20redirections).%20By%20default%20this%20allocation%20is%2070%25%20for%20Video%20and%2030%25%20for%20virtual%20channel%20data%2C%20meaning%20when%20bandwidth%20usage%20is%20under%20pressure%20video%20data%20is%20guaranteed%20to%20get%2070%25%20of%20the%20available%20bandwidth.%3C%2FP%3E%0A%20%20%3CP%3EAlthough%20this%20scheme%20does%20solve%20the%20problem%20effectively%2C%20there%20could%20be%20some%20scenarios%20that%20might%20want%20to%20tweak%20it%20a%20bit.%20There%20are%20some%20registry%20values%20that%20can%20be%20set%20to%20tweak%20these%20settings.%20%26lt%3B%20%3CB%3E%20Note%20these%20are%26nbsp%3Bunsupported%20settings%20so%20all%20the%20legal%20disclaimers%20apply!%20%3C%2FB%3E%20%26gt%3B%20A%20reboot%20is%20required%20for%20these%20setting%20to%20take%20effect.%3C%2FP%3E%0A%20%20%3CP%3EBelow%20is%20the%20list%20of%20registry%20values%20that%20affect%20the%20bandwidth%20allocation%20behavior.%20These%20are%20all%20DWORD%20values%20under%20%3CB%3E%20HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTermDD%3C%2FB%3E%3C%2FP%3E%0A%20%20%3CP%3E%3CB%3E%20FlowControlDisable%3A%20%3C%2FB%3E%3C%2FP%3E%0A%20%20%3CP%3EWhen%20set%20to%201%20this%20value%20will%20disable%20new%20flow%20control%20algorithm%3B%20making%20it%20essentially%20FIFO%20(First-In-First-Out)%20for%20all%20packet%20requests.%20This%20provides%20results%20similar%20to%20win2k3.%20(Default%20for%20this%20value%20is%200).%3C%2FP%3E%0A%20%20%3CP%3E%3CB%3E%20FlowControlDisplayBandwidth%20%2F%20FlowControlChannelBandwidth%3A%20%3C%2FB%3E%3C%2FP%3E%0A%20%20%3CP%3EThese%20two%20values%20together%20determine%20the%20bandwidth%20distribution%20between%20display%20and%20virtual%20channels.%20You%20can%20set%20these%20values%20in%20the%20range%20of%200-255.%20For%20example%20setting%20FlowControlDisplayBandwidth%20%3D%20100%20and%20FlowControlChannelBandwidth%20%3D%20100%20will%20make%20the%20equal%20bandwidth%20distribution%20between%20video%20and%20VCs.%20The%20default%20is%2070%20for%20FlowControlDisplayBandwidth%20and%2030%20for%20FlowControlChannelBandwidth%2C%20thus%20making%20the%20default%20distribution%20equal%20to%2070-30.%3C%2FP%3E%0A%20%20%3CP%3E%3CB%3E%20FlowControlChargePostCompression%3A%20%3C%2FB%3E%3C%2FP%3E%0A%20%20%3CP%3EThis%20value%20if%20set%20to%201%20bases%20the%20bandwidth%20allocation%20on%20post-compression%20bandwidth%20usage.%20Default%20for%20this%20value%20is%200%20-%20meaning%20the%20bandwidth%20distribution%20is%20applied%20on%20Pre-Compressed%20data.%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-246511%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20CloudBlogs%20on%20Apr%2C%2009%202007%20Over%20a%20Terminal%20Server%20RDP%20connection%2C%20there%20are%20multiple%20applications%20(for%20example%20video%2C%20clipboard%2C%20printer%20output%20etc)%20that%20send%20data%20over%20the%20connection%20from%20server%20to%20client.%3C%2FLINGO-TEASER%3E
Version history
Last update:
‎Sep 07 2018 05:54 PM