In this article of our tuning windows 2012 series, we’ll look further into optimizing the remote desktop session host and give some tips for dealing with antivirus, task scheduler, notifications, and other software and application components.
antivirus and antispyware
Installing antivirus and antispyware software on an rd session host server can greatly affect system performance, and in particular cpu usage. To minimize impact on cpu utilization, you should exclude those folders that hold temporary files, especially those generated by services and other system components.
Task scheduler lets you examine the list of tasks that are scheduled for different events. for rd session host, it is useful to focus specifically on the tasks that are configured to run on idle, at user sign-in, or on session connect and disconnect. Because of the specifics of the deployment, many of these tasks might be unnecessary.
desktop notification icons
Notification icons on the desktop can have fairly expensive refreshing mechanisms. you can customize the notification icons and disable unnecessary notifications by removing the component that registers them from the startup list or by changing the configuration on applications and system components to disable them.
remotefx data compression
Remotefx compression can be configured and optimized. three different values are possible:
- optimized to use less memory – consumes the least amount of memory per session but has the lowest compression ratio and therefore the highest bandwidth consumption
- balances memory and network bandwidth – reduced bandwidth consumption, but marginally increases memory consumption (approximately 200 kb per session).
- optimized to use less network bandwidth – further reduces network bandwidth
- usage at a cost of approximately 2 mb per session. if you want to use this setting, you should assess the maximum number of sessions and test to that level with this setting before you place the server in production.
You can also choose to not use a remotefx compression algorithm. Choosing to not use a remotefx compression algorithm will use more network bandwidth, and it is only recommended if you are using a hardware device that is designed to optimize network traffic. Note that even if you do not use an remotefx compression algorithm, some of the graphics data will be compressed.
Device redirection increases how much network bandwidth rd session host connections use because data is exchanged between devices on the client computers and processes that are running in the server session. The extent of the increase is a function of the frequency of operations that are performed by the applications that are running on the server against the redirected devices.
Printer redirection and plug and play device redirection also increase cpu usage at sign-in. you can redirect printers in two ways:
- matching printer driver – based redirection when a driver for the printer must be installed on the server. earlier releases of windows server used this method.
- easy print – printer driver redirection uses a common printer driver for all printers.
The easy print method causes less cpu usage for printer installation at connection time. the matching driver method causes increased cpu usage because it requires the spooler service to load different drivers. For bandwidth usage, the easy print method causes slightly increased network bandwidth usage, but not significant enough to offset the other performance, manageability, and reliability benefits.
Iif you use audio redirection, it causes a steady stream of network traffic, and enables you to run multimedia applications that typically have high cpu consumption.
client experience settings
By default, remote desktop connection (rdc) automatically chooses the right experience setting based on the suitability of the network connection between the server and client computers. Typically, it is best to leave the rdc configuration at “detect connection quality automatically.”
If you want to tweak rdc settings manually, rdc provides control over a range of settings that influence network bandwidth performance for the remote desktop services connection. You can change the following settings through the rdc user interface:
settings that apply when connecting to any computer:
- disable wallpaper – (rdp file setting: disable wallpaper:i:0): suppresses the display of desktop wallpaper on redirected connections. this setting can significantly reduce bandwidth usage if desktop wallpaper consists of an image or other content with significant costs for drawing.
- bitmap cache – (rdp file setting: bitmapcachepersistenable:i:1): when this setting is enabled, it creates a client-side cache of bitmaps that are rendered in the session. it provides a significant improvement and it should always be enabled (unless there are other security considerations).
- show contents of windows while dragging – (rdp file setting: disable full window drag:i:1): when this setting is disabled, it reduces bandwidth by displaying only the window frame instead of all the content when the window is dragged.
- menu and window animation – (represented by two rdp file settings: disable menu anims:i:1 and disable cursor setting:i:1): when this setting is disabled, it reduces bandwidth by disabling animation on menus (such as fading) and cursors.
- font smoothing – (rdp file setting: allow font smoothing:i:0): controls cleartype font-rendering support. when connecting to computers running windows 8 or windows server 2012, enabling or disabling this setting does not have a significant impact on bandwidth usage. however, for computers running versions earlier than windows 7 and windows 2008 r2, enabling this setting affects network bandwidth consumption significantly.
Settings that apply only when connecting to computers running windows 7 and earlier operating system versions:
- desktop composition – this setting is supported only for a remote session to a computer running windows 7 or windows server 2008 r2.
- visual styles – (rdp file setting: disable themes:i:1): when this setting is disabled, it reduces bandwidth by simplifying theme drawings that use the classic theme.
The following list indicates which options are chosen if you change the connection speed within the experience tab of remote desktop connection:
- detect connection quality automatically – when this setting is enabled, remote desktop connection automatically chooses settings that will result in optimal user experience based on connection quality. (this configuration is recommended when connecting to computers running windows 8 or windows server 2012).
- modem (56 kbps) -when this setting is selected, it allows persistent bitmap caching.
- low speed broadband (256 kbps – 2 mbps) – persistent bitmap caching, visual styles
- cellular/satellite (2mbps – 16 mbps) – desktop composition; persistent bitmap caching; visual styles; desktop background
- high speed broadband (2 mbps – 10 mbps ) – desktop composition; show contents of windows while dragging; menu and window animation; persistent bitmap caching; visual styles; desktop background
- wan (10 mbps or higher with high latency) – desktop composition; show contents of windows while dragging; menu and window animation; persistent bitmap caching; visual styles; desktop background (all)
- lan (10 mbps or higher)– desktop composition; show contents of windows while dragging; menu and window animation; persistent bitmap caching; themes; desktop background.
When the rdp connection profile is saved, it creates an rdp file. You can identify the speed optimization settings in the rdp configuration file as follows:
- modem = 1
- lowspeedbroadband = 2
- cellular with latency = 3
- highspeedbroadband = 4
- wan with latency = 5
- lan = 6
- detect connection quality automatically = 7
You can also modify the desktop size for remote sessions through the rdc client or through the rdp file (desktopwidth:i:1152 and desktopheight:i:864). Remember that the larger the desktop size, the greater the memory and bandwidth consumption that is associated with that session. The current maximum desktop size that a server accepts is 4096 x 2048.