Windows components remote desktop services remote desktop session host

Роли служб удаленных рабочих столов Remote Desktop Services roles

Применяется к: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016 Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016

В этой статье описываются роли в среде служб удаленных рабочих столов. This article describes the roles within a Remote Desktop Services environment.

Узел сеансов удаленных рабочих столов Remote Desktop Session Host

Узел сеансов удаленных рабочих столов размещает приложения на основе сеансов и рабочие столы, к которым вы предоставили пользователям общий доступ. The Remote Desktop Session Host (RD Session Host) holds the session-based apps and desktops you share with users. Пользователи получают доступ к этим рабочим столам и приложениям посредством одного из клиентов удаленного рабочего стола для Windows, MacOS, iOS или Android. Users get to these desktops and apps through one of the Remote Desktop clients that run on Windows, MacOS, iOS, and Android. Пользователи также могут подключаться с помощью поддерживаемого браузера благодаря веб-клиенту. Users can also connect through a supported browser by using the web client.

Рабочие столы и приложения можно упорядочить в один сервер узла сеансов удаленных рабочих столов или несколько; это так называемые коллекции. You can organize desktops and apps into one or more RD Session Host servers, called «collections.» Вы можете настроить эти коллекции для конкретных групп пользователей в рамках каждого клиента. You can customize these collections for specific groups of users within each tenant. Например, можно создать коллекцию, где определенная группа пользователей имеет доступ к конкретным приложениям, но любой другой пользователь, не входящий в группу, которую вы выделили, не сможет получить доступ к этим приложениям. For example, you can create a collection where a specific user group can access specific apps, but anyone outside of the group you designated won’t be able to access those apps.

Для небольших развертываний можно устанавливать приложения непосредственно на серверах узла сеансов удаленных рабочих столов. For small deployments, you can install applications directly onto the RD Session Host servers. Для более крупных развертываний рекомендуется создание базового образа и подготовка виртуальных машин на основе этого образа. For larger deployments, we recommend building a base image and provisioning virtual machines from that image.

Коллекции можно расширять, добавляя виртуальные машины сервера узла сеансов удаленных рабочих столов в ферму и назначая для каждой виртуальной машины узла в коллекции одну и ту же группу доступности. You can expand collections by adding RD Session Host server virtual machines to a collection farm with each RDSH virtual machine within a collection assigned to same availability set. Это обеспечивает более высокий уровень доступности коллекции и увеличивает ее масштаб для поддержки нескольких пользователей или приложений с большой нагрузкой на ресурсы. This provides higher collection availability and increases scale to support more users or resource-heavy applications.

В большинстве случаев несколько пользователей используют один и тот же сервер узла сеансов удаленных рабочих столов, что позволяет наиболее эффективно расходовать ресурсы Azure для решения размещения рабочих столов. In most cases, multiple users share the same RD Session Host server, which most efficiently utilizes Azure resources for a desktop hosting solution. В этой конфигурации пользователям необходимо входить в коллекцию с неадминистративными учетными записями. In this configuration, users must sign in to collections with non-administrative accounts. Вы также можете предоставить некоторым пользователям полный административный доступ к их удаленному рабочему столу путем создания коллекций рабочих столов с персональными сеансами. You can also give some users full administrative access to their remote desktop by creating personal session desktop collections.

Для дальнейшей настройки рабочих столов можно создать и отправить виртуальный жесткий диск с ОС Windows Server, который можно использовать как шаблон для создания новых виртуальных машин узла сеансов удаленных рабочих столов. You can customize desktops even more by creating and uploading a virtual hard disk with the Windows Server OS that you can use as a template for creating new RD Session Host virtual machines.

См. сведения в следующих статьях: For more information, see the following articles:

Посредник подключений к удаленному рабочему столу Remote Desktop Connection Broker

Посредник подключений к удаленному рабочему столу управляет входящими подключениями удаленного рабочего стола для ферм серверов узла сеансов удаленных рабочих столов. Remote Desktop Connection Broker (RD Connection Broker) manages incoming remote desktop connections to RD Session Host server farms. Посредник подключений к удаленному рабочему столу обрабатывает подключения как к коллекциям полноценных рабочих столов, так и к коллекциям удаленных приложений. RD Connection Broker handles connections to both collections of full desktops and collections of remote apps. Посредник подключений к удаленному рабочему столу может балансировать нагрузку на серверы в коллекции при создании новых подключений. RD Connection Broker can balance the load across the collection’s servers when making new connections. Если включен посредник подключений к удаленному рабочему столу, использование циклического перебора DNS для узлов сеансов удаленных рабочих столов для серверов балансировки не поддерживается. If RD Connection Broker is enabled, using DNS round robin to RD Session Hosts for balacing servers is not supported. Если сеанс отключается, посредник подключений к удаленному рабочему столу повторно подключит пользователя к правильному серверу узла сеансов удаленных рабочих столов и прерванному сеансу, который по-прежнему будет присутствовать на ферме узла сеансов удаленных рабочих столов. If a session disconnects, RD Connection Broker will reconnect the user to the correct RD Session Host server and their interrupted session, which still exists in the RD Session Host farm.

Необходимо установить соответствующие цифровые сертификаты на сервере посредника подключений к удаленному рабочему столу и на клиенте для поддержки единого входа и публикации приложений. You’ll need to install matching digital certificates on both the RD Connection Broker server and the client to support single sign-on and application publishing. При разработке или тестировании сети можно использовать самостоятельно созданный самозаверяющий сертификат. When developing or testing a network, you can use a self-generated and self-signed certificate. Тем не менее при выпуске службам требуется сертификат из доверенного корневого центра сертификации. However, released services require a digital certificate from a trusted certification authority. Имя, присвоенное сертификату, должно совпадать с внутренним полным доменным именем (FQDN) виртуальной машины посредника подключений к удаленному рабочему столу. The name you give the certificate must be the same as the internal Fully Qualified Domain Name (FQDN) of the RD Connection Broker virtual machine.

Посредник подключений к удаленному рабочему столу для Windows Server 2016 можно установить на той же виртуальной машине, что и доменные службы Active Directory, чтобы сократить затраты. You can install the Windows Server 2016 RD Connection Broker on the same virtual machine as AD DS to reduce cost. Если вам нужно увеличить масштаб для большего числа пользователей, можно также добавить дополнительные виртуальные машины посредника подключений к удаленному рабочему столу в той же группе доступности для создания кластера посредника подключений к удаленному рабочему столу. If you need to scale out to more users, you can also add additional RD Connection Broker virtual machines in the same availability set to create an RD Connection Broker cluster.

Перед созданием кластера посредника подключений к удаленному рабочему столу необходимо развернуть базу данных SQL Azure в среде клиента или создать группу доступности AlwaysOn SQL Server. Before you can create an RD Connection Broker cluster, you must either deploy an Azure SQL Database in the tenant’s environment or create an SQL Server AlwaysOn Availability Group.

См. сведения в следующих статьях: For more information, see the following articles:

Шлюз удаленных рабочих столов Remote Desktop Gateway

Шлюз удаленных рабочих столов предоставляет пользователям в общедоступных сетях доступ к рабочим столам и приложениям Windows, размещенным в облачных службах Microsoft Azure. Remote Desktop Gateway (RD Gateway) grants users on public networks access to Windows desktops and applications hosted in Microsoft Azure’s cloud services.

Компонент шлюза удаленных рабочих столов использует протокол SSL для шифрования канала связи между клиентами и сервером. The RD Gateway component uses Secure Sockets Layer (SSL) to encrypt the communications channel between clients and the server. Виртуальная машина шлюза удаленных рабочих столов должна быть доступна через общедоступный IP-адрес, который разрешает входящие TCP-подключения через порт 443 и входящие UDP-соединения через порт 3391. The RD Gateway virtual machine must be accessible through a public IP address that allows inbound TCP connections to port 443 and inbound UDP connections to port 3391. Это позволяет пользователям подключаться через Интернет с помощью транспортного протокола связи HTTPS и протокола UDP соответственно. This lets users connect through the internet using the HTTPS communications transport protocol and the UDP protocol, respectively.

Для правильной работы системы цифровые сертификаты, установленные на сервере и клиенте, должны совпадать. The digital certificates installed on the server and client have to match for this to work. При разработке или тестировании сети можно использовать самостоятельно созданный самозаверяющий сертификат. When you’re developing or testing a network, you can use a self-generated and self-signed certificate. Тем не менее при выпуске службам требуется сертификат из доверенного корневого центра сертификации. However, a released service requires a certificate from a trusted certification authority. Имя сертификата должно соответствовать полному доменному имени, используемому для доступа к шлюзу удаленных рабочих столов,будь то внешнее DNS-имя общедоступного IP-адреса или запись CNAME DNS, указывающая на общедоступный IP-адрес. The name of the certificate must match the FQDN used to access RD Gateway, whether the FQDN is the public IP address’ externally facing DNS name or the CNAME DNS record pointing to the public IP address.

Для клиентов с меньшим числом пользователей роли веб-доступа к удаленным рабочим столам и шлюза удаленных рабочих столов можно сочетать на одной виртуальной машине, чтобы сократить затраты. For tenants with fewer users, the RD Web Access and RD Gateway roles can be combined on a single virtual machine to reduce cost. Также можно добавить дополнительные виртуальные машины шлюза удаленных рабочих столов в ферму шлюза удаленных рабочих столов для повышения доступности служб и масштабирования до большего числа пользователей. You can also add more RD Gateway virtual machines to an RD Gateway farm to increase service availability and scale out to more users. Виртуальные машины в больших фермах шлюза удаленных рабочих столов должны быть настроены в наборе с балансировкой нагрузки. Virtual machines in larger RD Gateway farms should be configured in a load-balanced set. Соответствие IP-адресам не требуется при использовании шлюза удаленных рабочих столов на виртуальной машине Windows Server 2016, но необходимо при его запуске на виртуальной машине с Windows Server 2012 R2. IP affinity isn’t required when you’re using RD Gateway on a Windows Server 2016 virtual machine, but it is when you’re running it on a Windows Server 2012 R2 virtual machine.

См. сведения в следующих статьях: For more information, see the following articles:

Веб-доступ к удаленным рабочим столам Remote Desktop Web Access

Веб-доступ к удаленным рабочим столам дает пользователям доступ к рабочим столам и приложениям через веб-портал, а затем запускает их через собственное клиентское приложение «Удаленный рабочий стол (Майкрософт)» на устройстве. Remote Desktop Web Access (RD Web Access) lets users access desktops and applications through a web portal and launches them through the device’s native Microsoft Remote Desktop client application. Веб-портал можно использовать для публикации рабочих столов и приложений Windows для клиентских устройств с Windows и другими системами; можно также выборочно публиковать рабочие столы или приложения для конкретных пользователей или групп. You can use the web portal to publish Windows desktops and applications to Windows and non-Windows client devices, and you can also selectively publish desktops or apps to specific users or groups.

Веб-доступ к удаленным рабочим столам нуждается в службах IIS для правильной работы. RD Web Access needs Internet Information Services (IIS) to work properly. Подключение через HTTPS предоставляет канал зашифрованной связи между клиентами и веб-сервером удаленных рабочих столов. A Hypertext Transfer Protocol Secure (HTTPS) connection provides an encrypted communications channel between the clients and the RD Web server. Виртуальная машина веб-доступа к удаленным рабочим столам должна быть доступна через общедоступный IP-адрес, который разрешает входящие TCP-подключения через порт 443, чтобы пользователи клиента могли подключаться из Интернета с помощью транспортного протокола связи HTTPS. The RD Web Access virtual machine must be accessible through a public IP address that allows inbound TCP connections to port 443 to allow the tenant’s users to connect from the internet using the HTTPS communications transport protocol.

На сервере и клиентах должны быть установлены соответствующие сертификаты. Matching digital certificates must be installed on the server and clients. При разработке и тестировании это может быть самостоятельно созданный самозаверяющий сертификат. For development and testing purposes, this can be a self-generated and self-signed certificate. При выпуске службе потребуется сертификат из доверенного корневого центра сертификации. For a released service, the digital certificate must be obtained from a trusted certification authority. Имя сертификата должно совпадать с полным доменным именем, используемым службой веб-доступа к удаленным рабочим столам. The name of the certificate must match the Fully Qualified Domain Name (FQDN) used to access RD Web Access. Возможные полные доменные имена — это внешнее DNS-имя для общедоступного IP-адреса и запись CNAME DNS, указывающая на общедоступный IP-адрес. Possible FQDNs include the externally facing DNS name for the public IP address and the CNAME DNS record pointing to the public IP address.

Для клиентов с меньшим числом пользователей можно сократить расходы, объединив рабочие нагрузки веб-доступа к удаленным рабочим столам и шлюза удаленных рабочих столов в одной виртуальной машине. For tenants with fewer users, you can reduce costs by combining the RD Web Access and Remote Desktop Gateway workloads into a single virtual machine. Также можно добавить дополнительные виртуальные машины для веб-доступа к удаленным рабочим столам в ферму веб-доступа к удаленным рабочим столам для повышения доступности служб и масштабирования до большего числа пользователей. You can also add additional RD Web virtual machines to an RD Web Access farm to increase service availability and scale out to more users. В ферме веб-доступа к удаленным рабочим столам с несколькими виртуальными машинами необходимо настроить виртуальные машины в наборе с балансировкой нагрузки. In an RD Web Access farm with multiple virtual machines, you’ll have to configure the virtual machines in a load-balanced set.

Дополнительные сведения о том, как настроить веб-доступ к удаленным рабочим столам, см. в следующих статьях: For more information about how to configure RD Web Access, see the following articles:

Лицензирование удаленных рабочих столов Remote Desktop Licensing

Активированные серверы лицензирования удаленных рабочих столов позволяют пользователям подключаться к серверам узла сеансов удаленных рабочих столов, где размещены рабочие столы и приложения клиента. Activated Remote Desktop Licensing (RD Licensing) servers let users connect to the RD Session Host servers hosting the tenant’s desktops and apps. Среды клиентов обычно поставляются с уже установленным сервером лицензирования удаленных рабочих столов, но для размещенных рабочих сред необходимо будет настроить сервер для каждого отдельного пользователя. Tenant environments usually come with the RD Licensing server already installed, but for hosted environments you’ll have to configure the server in per-user mode.

Поставщик услуг должен иметь достаточно лицензий RDS на подписчика для охвата всех авторизованных уникальных (не одновременных) пользователей, которые выполняют вход в службу каждый месяц. The service provider needs enough RDS Subscriber Access Licenses (SALs) to cover all authorized unique (not concurrent) users that sign in to the service each month. Поставщики услуг могут приобрести службы инфраструктуры Microsoft Azure напрямую, а лицензии на подписчика — по программе Microsoft Service Provider Licensing Agreement (SPLA). Service providers can purchase Microsoft Azure Infrastructure Services directly, and can purchase SALs through the Microsoft Service Provider Licensing Agreement (SPLA) program. Клиенты, которым нужно решение для размещения рабочих столов, необходимо приобрести полное размещенное решение (Azure и службы удаленных рабочих столов) у поставщика услуг. Customers looking for a hosted desktop solution must purchase the complete hosted solution (Azure and RDS) from the service provider.

Маленькие клиенты могут снизить затраты путем объединения файлового сервера и компонентов лицензирования удаленных рабочих столов на одной виртуальной машине. Small tenants can reduce costs by combining the file server and RD Licensing components onto a single virtual machine. Чтобы обеспечить высокую доступность службы, клиенты могут развернуть две виртуальные машины сервера лицензирования удаленных рабочих столов в одной группе доступности. To provide higher service availability, tenants can deploy two RD License server virtual machines in the same availability set. Все серверы удаленных рабочих столов в среде клиента связываются с обоими серверами лицензирования удаленных рабочих столов для поддержания возможности подключения пользователей к новым сеансам даже в случае, если один из серверов выйдет из строя. All RD servers in the tenant’s environment are associated with both RD License servers to keep users able to connect to new sessions even if one of the servers goes down.

См. сведения в следующих статьях: For more information, see the following articles:

Источник

Скатерть-самобранка, или как развернуть службы удаленного рабочего стола на Windows Server 2012 R2

Сегодня мы объясним, чем развертывание RDS Session Host на Windows Server 2012 R2 отличается от более ранних версий Windows Server и расскажем о доступных опциях развертывания. Remote Desktop Services на Windows Server значительно усовершенствовались за последнее время, но остается, тем не менее, много непонятного по причине множества вовлеченных в процесс компонентов. RD Session выполняют всю грязную работу, обслуживая терминальные сессии пользователей. Однако даже при самом примитивном сценарии обязательно использование RD Connection Broker (посредника подключений к удаленному рабочему столу). Еще до того, как вы запланируете развертывание служб удаленного рабочего стола, стоит ознакомиться с его ролью.

RD Connection Broker

Когда сеанс удаленного рабочего стола отключается, приложения в сеансе пользователя продолжают работать. Для отслеживания сеансов пользователей RD Connection Broker (Посредник подключений удаленного рабочего стола) хранит такую информацию, как название сеансов удаленных рабочих столов, где проходит каждая сессия, состояние сессии и ее идентификатор, а также информация о подключенных пользователях в каждой сессии. Эта информация используется для подключения пользователей к существующим сеансам на серверах RD Session Host (терминальные сервера Windows). При создании новой сессии RD Connection также играют свою роль путем подключения пользователей к серверам RD Session Host по мере загрузки.

Начиная с Windows Server 2012, посредники подключений к удаленному рабочему столу не только хранят данные о пользовательских сессиях, но и информацию о конфигурации. Посредник подключений к удаленным рабочим столам использует внутреннюю базу данных Windows для сохранения сессии и информации о конфигурации, кроме случаев, когда установлен режим высокой доступности (HA), где используется сервер SQL 2008 R2 (или более поздняя версия).

Посредник подключений к удаленному рабочему столу требует домен Active Directory, но не может быть установлен на контроллере домена (DC). Можно развернуть службы удаленного рабочего стола в рабочей группе с помощью установки роли сервера, хотя при этом теряется возможность централизованного управления, пульты управления и функционал удаленных приложений Remoteapp.

Централизованная публикация приложений

В Windows Server 2012 также введен концепт коллекций (collections). В Windows Server 2008 R2 требовалось, чтобы системные администраторы публиковали приложения для каждого RD Session Host в индивидуальном порядке. Теперь посредник подключений к удаленному рабочему столу хранит информацию о конфигурации.

Опции развертывания: быстрая и стандартная

Ключ к пониманию того, как развернуть RDS на Windows Server 2012 R2 в понимании того, что недостаточно установки роли RD Session Host. Диспетчер серверов обеспечивает специальный режим развертывания для установки RDS, таким образом все необходимые компоненты установлены в нужных местах, чтобы делает развертывание простым и быстрым.

Windows components remote desktop services remote desktop session host. Смотреть фото Windows components remote desktop services remote desktop session host. Смотреть картинку Windows components remote desktop services remote desktop session host. Картинка про Windows components remote desktop services remote desktop session host. Фото Windows components remote desktop services remote desktop session host
Службы удаленного рабочего стола на Windows Server 2012 R2

В мастере добавления ролей и компонентов (Add Roles and Features Wizard) в диспетчере серверов есть специальная опция установки, установка служб удаленных рабочих столов (Remote Desktop Services installation), которую необходимо выбрать при развертывании служб удаленных рабочих столов. Формулировка при этом варианте немного смущает, но опция позволяет устанавливать хосты сеансов удаленных рабочих столов без развертывания полной инфраструктуры виртуальных ПК (virtual desktop infrastructure — VDI).

Стандартное развертывание — это модель развертывания по умолчанию, и если вы действительно хотите установить все необходимые роли на одном сервере, что не является лучшей практикой, то стоит выбрать эту опцию. Быстрая установка (Quick Start) может быть полезна в сценариях тестирования или в небольших филиалах, где есть только один доступный сервер.

Консоли управления

Все необходимые консоли управления можно найти в диспетчере серверов на сервере, где установлен посредник подключений к удаленным рабочим столам, за исключением RD Gateway и RD Licensing.

Установка служб удаленного рабочего стола на Windows Server 2012 R2

Лицензирование

Развертывание служб удаленного рабочего стола

Windows components remote desktop services remote desktop session host. Смотреть фото Windows components remote desktop services remote desktop session host. Смотреть картинку Windows components remote desktop services remote desktop session host. Картинка про Windows components remote desktop services remote desktop session host. Фото Windows components remote desktop services remote desktop session host
Стандартное или быстрое развертывание

Windows components remote desktop services remote desktop session host. Смотреть фото Windows components remote desktop services remote desktop session host. Смотреть картинку Windows components remote desktop services remote desktop session host. Картинка про Windows components remote desktop services remote desktop session host. Фото Windows components remote desktop services remote desktop session host
Роли служб удаленных рабочих столов

Windows components remote desktop services remote desktop session host. Смотреть фото Windows components remote desktop services remote desktop session host. Смотреть картинку Windows components remote desktop services remote desktop session host. Картинка про Windows components remote desktop services remote desktop session host. Фото Windows components remote desktop services remote desktop session host
Выберите сервер из пула серверов

Windows components remote desktop services remote desktop session host. Смотреть фото Windows components remote desktop services remote desktop session host. Смотреть картинку Windows components remote desktop services remote desktop session host. Картинка про Windows components remote desktop services remote desktop session host. Фото Windows components remote desktop services remote desktop session host
Ход развертывания

Источник

Performance Tuning Remote Desktop Session Hosts

This topic discusses how to select Remote Desktop Session Host (RD Session Host) hardware, tune the host, and tune applications.

In this topic:

Selecting the proper hardware for performance

For an RD Session Host server deployment, the choice of hardware is governed by the application set and how users use them. The key factors that affect the number of users and their experience are CPU, memory, disk, and graphics. This section contains additional guidelines that are specific to RD Session Host servers and is mostly related to the multi-user environment of RD Session Host servers.

CPU configuration

CPU configuration is conceptually determined by multiplying the required CPU to support a session by the number of sessions that the system is expected to support, while maintaining a buffer zone to handle temporary spikes. Multiple logical processors can help reduce abnormal CPU congestion situations, which are usually caused by a few overactive threads that are contained by a similar number of logical processors.

Therefore, the more logical processors on a system, the lower the cushion margin that must be built in to the CPU usage estimate, which results in a larger percentage of active load per CPU. One important factor to remember is that doubling the number of CPUs does not double CPU capacity.

Memory configuration

Memory configuration is dependent on the applications that users employ; however, the required amount of memory can be estimated by using the following formula: TotalMem = OSMem + SessionMem * NS

OSMem is how much memory the operating system requires to run (such as system binary images, data structures, and so on), SessionMem is how much memory processes running in one session require, and NS is the target number of active sessions. The amount of required memory for a session is mostly determined by the private memory reference set for applications and system processes that are running inside the session. Shared code or data pages have little effect because only one copy is present on the system.

One interesting observation (assuming the disk system that is backing up the page file does not change) is that the larger the number of concurrent active sessions the system plans to support, the bigger the per-session memory allocation must be. If the amount of memory that is allocated per session is not increased, the number of page faults that active sessions generate increases with the number of sessions. These faults eventually overwhelm the I/O subsystem. By increasing the amount of memory that is allocated per session, the probability of incurring page faults decreases, which helps reduce the overall rate of page faults.

Disk configuration

Storage is one of the most overlooked aspects when you configure RD Session Host servers, and it can be the most common limitation in systems that are deployed in the field.

The disk activity that is generated on a typical RD Session Host server affects the following areas:

System files and application binaries

User profiles and user data

Ideally, these areas should be backed up by distinct storage devices. Using striped RAID configurations or other types of high-performance storage further improves performance. We highly recommend that you use storage adapters with battery-backed write caching. Controllers with disk write caching offer improved support for synchronous write operations. Because all users have a separate hive, synchronous write operations are significantly more common on an RD Session Host server. Registry hives are periodically saved to disk by using synchronous write operations. To enable these optimizations, from the Disk Management console, open the Properties dialog box for the destination disk and, on the Policies tab, select the Enable write caching on the disk and Turn off Windows write-cache buffer flushing on the device check boxes.

Network configuration

Network usage for an RD Session Host server includes two main categories:

RD Session Host connection traffic usage is determined almost exclusively by the drawing patterns that are exhibited by the applications running inside the sessions and the redirected devices I/O traffic.

For example, applications handling text processing and data input consume bandwidth of approximately 10 to 100 kilobits per second, whereas rich graphics and video playback cause significant increases in bandwidth usage.

Back-end connections such as roaming profiles, application access to file shares, database servers, e-mail servers, and HTTP servers.

The volume and profile of network traffic is specific to each deployment.

Tuning applications for Remote Desktop Session Host

Most of the CPU usage on an RD Session Host server is driven by apps. Desktop apps are usually optimized toward responsiveness with the goal of minimizing how long it takes an application to respond to a user request. However in a server environment, it is equally important to minimize the total amount of CPU usage that is needed to complete an action to avoid adversely affecting other sessions.

Consider the following suggestions when you configure apps that are to be used on an RD Session Host server:

Minimize background idle loop processing

Typical examples are disabling background grammar and spell check, data indexing for search, and background saves.

Minimize how often an app performs a state check or update.

Disabling such behaviors or increasing the interval between polling iterations and timer firing significantly benefits CPU usage because the effect of such activities is quickly amplified for many active sessions. Typical examples are connection status icons and status bar information updates.

Minimize resource contention between apps by reducing their synchronization frequency.

Examples of such resources include registry keys and configuration files. Examples of application components and features are status indicator (like shell notifications), background indexing or change monitoring, and offline synchronization.

Disable unnecessary processes that are registered to start with user sign-in or a session startup.

These processes can significantly contribute to the cost of CPU usage when creating a new user session, which generally is a CPU-intensive process, and it can be very expensive in morning scenarios. Use MsConfig.exe or MsInfo32.exe to obtain a list of processes that are started at user sign-in. For more detailed info, you can use Autoruns for Windows.

For memory consumption, you should consider the following:

Verify that DLLs loaded by an app are not relocated.

Relocated DLLs can be verified by selecting Process DLL view, as shown in the following figure, by using Process Explorer.

Here we can see that y.dll was relocated because x.dll already occupied its default base address and ASLR was not enabled

Windows components remote desktop services remote desktop session host. Смотреть фото Windows components remote desktop services remote desktop session host. Смотреть картинку Windows components remote desktop services remote desktop session host. Картинка про Windows components remote desktop services remote desktop session host. Фото Windows components remote desktop services remote desktop session host

If DLLs are relocated, it is impossible to share their code across sessions, which significantly increases the footprint of a session. This is one of the most common memory-related performance issues on an RD Session Host server.

For common language runtime (CLR) applications, use Native Image Generator (Ngen.exe) to increase page sharing and reduce CPU overhead.

When possible, apply similar techniques to other similar execution engines.

Remote Desktop Session Host tuning parameters

Page file

Insufficient page file size can cause memory allocation failures in apps or system components. You can use the memory-to-committed bytes performance counter to monitor how much committed virtual memory is on the system.

Antivirus

Installing antivirus software on an RD Session Host server greatly affects overall system performance, especially CPU usage. We highly recommend that you exclude from the active monitoring list all the folders that hold temporary files, especially those that services and other system components generate.

Task Scheduler

Task Scheduler lets you examine the list of tasks that are scheduled for different events. For an RD Session Host server, 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 should disable any notifications by removing the component that registers them from the startup list or by changing the configuration on apps and system components to disable them. You can use Customize Notifications Icons to examine the list of notifications that are available on the server.

Remote Desktop Protocol data compression

Remote Desktop Protocol compression can be configured by using Group Policy under Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment > Configure compression for RemoteFX data. Three 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 while marginally increasing 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 Remote Desktop Protocol compression algorithm, so we only recommend using it with a hardware device designed to optimize network traffic. Even if you choose not to use a compression algorithm, some graphics data will be compressed.

Device redirection

Device redirection can be configured by using Group Policy under Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Device and Resource Redirection or by using the Session Collection properties box in Server Manager.

Generally, device redirection increases how much network bandwidth RD Session Host server 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 increases 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.

Introduced in Windows ServerВ 2008, Easy Print printer driver redirection uses a common printer driver for all printers.

We recommend the Easy Print method because it 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, Easy Print causes slightly increased network bandwidth usage, but not significant enough to offset the other performance, manageability, and reliability benefits.

Audio redirection causes a steady stream of network traffic. Audio redirection also enables users to run multimedia apps 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. We recommend that the RDC configuration remain at Detect connection quality automatically.

For advanced users, RDC provides control over a range of settings that influence network bandwidth performance for the Remote Desktop Services connection. You can access the following settings by using the Experience tab in Remote Desktop Connection or as settings in the RDP file.

The following settings apply when connecting to any computer:

Disable wallpaper (Disable wallpaper:i:0) Does not show 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 (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 on bandwidth usage, and it should always be enabled (unless there are other security considerations).

Show contents of windows while dragging (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 (Disable menu anims:i:1 and Disable cursor setting:i:1): When these settings are disabled, it reduces bandwidth by disabling animation on menus (such as fading) and cursors.

Font smoothing (Allow font smoothing:i:0) Controls ClearType font-rendering support. When connecting to computers running WindowsВ 8 or Windows ServerВ 2012 and above, 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.

The following settings only apply 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 (disable themes:i:1) When this setting is disabled, it reduces bandwidth by simplifying theme drawings that use the Classic theme.

By using the Experience tab within Remote Desktop Connection, you can choose your connection speed to influence network bandwidth performance. The following lists the options that are available to configure your connection speed:

Detect connection quality automatically (Connection type:i:7) 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 and above).

Modem (56 Kbps) (Connection type:i:1) This setting enables persistent bitmap caching.

High-speed broadband (2 Mbps – 10 Mbps ) (Connection type:i:4) This setting enables desktop composition, show contents of windows while dragging, menu and window animation, persistent bitmap caching, visual styles, and desktop background.

WAN (10 Mbps or higher with high latency) (Connection type:i:5) This setting enables desktop composition, show contents of windows while dragging, menu and window animation, persistent bitmap caching, visual styles, and desktop background.

LAN (10 Mbps or higher) (Connection type:i:6) This setting enables desktop composition, show contents of windows while dragging, menu and window animation, persistent bitmap caching, themes, and desktop background.

Desktop Size

Desktop size for remote sessions can be controlled by using the Display tab in Remote Desktop Connection or by using the RDP configuration file (desktopwidth:i:1152 and desktopheight:i:864). The larger the desktop size, the greater the memory and bandwidth consumption that is associated with that session. The current maximum desktop size is 4096 x 2048.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *