The Terminal Server can be sized to deliver high-performance terminal sessions by estimating the amount of resources each user will require and the number of users who will utilize Terminal Services. Performing frequent performance testing on the Terminal Servers helps generate accurate information on Terminal Server usage. You should perform performance testing during both peak and nonpeak times to ensure proper data collection. Increase memory and processors or introduce additional Terminal Servers as necessary. Understanding the users' resource needs and the number of users will help you decide how to specify the server hardware requirements and determine how many Terminal Servers you need to support the load. Scaling Terminal ServicesScaling Terminal Services can be achieved by increasing server resources such as the number of processors and the amount of memory, as well as by increasing the number of servers that are servicing requests. When determining how to scale, also consider manageability, cost, and how end users may be affected if a server goes offline. For instance, using a greater number of lower-powered servers may increase manageability (such as updating applications, keeping up with operating system updates, and other maintenance), but if a server goes down, fewer users will be affected. The solution will vary depending upon your organization's needs and circumstances. Another consideration is the amount of flexibility your organization requires. Using more instead of bigger servers gives more flexibility because of the redundancy, as well as the capability to take servers offline for maintenance. In this scenario, it is important to use servers with enough power to sustain slightly greater workloads during those times when other servers in the farm go offline. Note For more information on scaling Terminal Services, refer to Microsoft's "Windows Server 2003 Terminal Server Capacity and Scaling" whitepaper. Adding Redundancy and Scalability to Session DirectoryUsing Session Directory server in Terminal Services farms is a great way to provide failover for user sessions. To avoid this service from becoming a single point of failure and scale it to meet the performance needs of the organization, you can configure Session Directory to run as a clustered service using MSCS. To create the cluster for Session Directory, do the following:
Note For more information on MSCS, refer to Chapter 31. Optimizing Terminal Services PerformanceOptimizing Terminal Services is a challenging task because of the complexities in any environment. Hardware resources, applications, usage, the number of users to support, and much more can affect how well Terminal Services responds to users. There are rarely cases where there is one "silver bullet" that can improve overall performance; it takes a combined approach. For instance, from a user perspective, video, color depth, audio redirection, printer redirection, and encryption level all affect how well a system performs. The following are best practices for ensuring that the Terminal Services implementation runs as efficiently and effectively as possible:
Monitoring Terminal ServerThe Performance MMC snap-in can be used to monitor Terminal Services and to gather session statistics. The two specific performance objects for Terminal Services are Terminal Services and Terminal Services Session. The first object, Terminal Services, has only three counters: active sessions, inactive sessions, and total sessions. Gathering this session data and teaming it with information such as Server Memory\Available Bytes and Processor\% Idle can give an administrator a clear understanding of Terminal Server usage and load. This information can be used to determine whether additional resources or servers need to be added to accommodate load or enhance performance. One adjustment that may be made after taking readings from these counters is the implementation of disconnected session time limits to free server hardware resources for active sessions. The second performance object, Terminal Services Session, can be used to monitor all counters available for a particular Terminal Server session. This object can be used to get accurate statistical information, such as how much memory and processor time the average Terminal Server session uses. Be sure to monitor network interfaces for available bandwidth to ensure that the Terminal Server is not creating a bottleneck between clients and other back-end servers. Using Windows System Resource Manager to Control ResourcesWith Windows System Resource Manager (WSRM), you can limit the amount of CPU and memory an application can use. In the Terminal Services environment, you can assign distinct settings based not only on an application, but on a specific user or group as well. This helps to enforce consistency among user sessions and prevent rogue applications or sessions from negatively affecting other user sessions. For more information on using the Windows Resource Manager, refer to Chapter 35, "Capacity Analysis and Performance Optimization." |