White Paper Conquering Rogue Application Behavior in a Terminal Server Environment Using Application Shaping to ensure reliable, consistent performance and application response times for improved end-user satisfaction Executive Summary Terminal server environments offer numerous benefits including more centralized management of computing resources, wider access to user applications, and greater data security. However, these environments don t come without their own challenges. IT departments are tasked with meeting the performance needs of many users now sharing computing resources. Every application that each user is running must share the CPU resources of the server on which they are running. Sometimes applications go rogue by consuming too many CPU resources. When this happens, all of the users experience sluggish response times and IT administrators must spend time troubleshooting and correcting the issue. Fortunately, there are software solutions that address the problem of rogue applications. Only one solution combines multiple approaches to optimize application performance and maximize CPU resource utilization. RTO Software s TScale solution offers Application Shaping which automates affinity assignments, application priority changes, and CPU load balancing to provide IT administrators with pinpoint application control. With Application Shaping, TScale gives you the tools to overcome problems associated with rogue applications and provide consistent and reliable application performance and responsiveness even during peaks in application demands. Written by: 6120 Windward Parkway Suite 200 Alpharetta, GA 30005 +1-678-987-4300 info@rtosoft.com www.rtosoft.com
Table of Contents Addressing the Problem... 3 Balancing the Benefits and Challenges of Terminal Servers... 3 The Problem of Sharing CPU Resources... 3 Rogue Applications... 3 The Solution... 4 Limiting Solutions... 4 TScale - the Innovative Solution... 4 Why is Application Shaping Necessary and Desirable?... 4 How Does Application Shaping Impact User Experience?... 5 How is Application Shaping Implemented in TScale?... 8 Conclusion... 9 About RTO Software... 9 2
Addressing the Problem Balancing the Benefits and Challenges of Terminal Servers Having gained widespread acceptance, sever-based computing technologies such as Citrix XenApp, Microsoft Terminal Services and now Microsoft Remote Desktop Services provide end users with access to applications from a central set of servers called terminal servers. Terminal servers enable conventional server systems to operate in multi-user mode and extend applications to end-users through thin-client interfaces. Instead of deploying an application to multiple desktops, the IT department makes it available on a server where users can logon and run the application. This centralized application management approach minimizes the complexity of the end-user desktop while maximizing application accessibility, ultimately allowing organizations to lower their total cost of ownership. The challenge to any IT department is to provide the users in the organization with prompt access to new and updated business applications along with acceptable levels of performance. The Terminal Server model delivers on its promise for rapid deployment of applications to all end-users, but the nature of the terminal server environment poses unique challenges in ensuring predictable, reliable performance and application response time. The Problem of Sharing CPU Resources One specific problem is that application components, or instances of applications, can sometimes exhibit behavior that causes all the other applications on the terminal server to pause or run slowly. Quite often, this negative behavior is due to an instance of an application consuming high levels of CPU time. We can split these applications into two categories. The first is made up of legitimate applications that periodically require intensive CPU utilization, such as large spreadsheet macros and recalculations that can take upwards of 5 minutes. The second category is comprised of applications where an instance misbehaves and literally runs away with the CPU resources. Collectively, we call these rogue applications applications that periodically require a high percentage of CPU cycles or consume too many CPU resources. Rogue Applications Applications that go rogue on a single-user desktop PC outside a terminal server environment only impact that individual user. However, in a terminal server environment the effect of rogue applications can be disastrous, because it impacts all of the users on that server. Consider a 40 person call center where time is literally money. What is the financial impact when representatives are unable to process transactions because the terminal server is hung due to a rogue application? In a typical scenario when an application goes rogue on a terminal server: All the users on that terminal server experience sluggishness or non-responsiveness with their applications. Several annoying minutes pass while they wait for the issue to clear up. One or more users will call the IT helpline to complain about performance. IT then opens a case and assigns a resource to troubleshoot the problem. The Citrix/Network admin identifies the specific terminal server(s) with a problem. The Citrix/Network administrator then troubleshoots the server to determine the problematic application or process thread. The bad application/thread is manually terminated, restoring CPU bandwidth back to the users on the system. 3
This is obviously a frustrating experience for the users of the applications on the terminal servers, as well as customers who may be impacted by the poor system response. In addition, IT staff must respond to correct the problem, taking them away from planned projects. It is clear that there are significant costs to the organization due to rogue applications. The Solution Limiting Solutions Fortunately, there are software solutions to the problem of rogue applications. One commonly use approach is to lower the priority of an application when it uses too many CPU resources. Lowering the priority of a rogue application will allow other processes to get the CPU resources they need. However, the rogue application could potentially affect each processor and the performance of all applications running on the server. Another commonly used approach is called CPU clamping or CPU throttling. Using this approach, a service runs on the terminal server and literally intervenes in the way the operating system runs by suspending the execution of application threads to limit offending applications to a preset percentage of CPU. Software solutions using this method keep rogue applications from consuming too many CPU resources. However, these solutions miss the mark on maximizing CPU resource utilization. For example, let s say you limit your applications to use no more than 30% of the available CPU resources. If you have several other applications using a total of 50% of the CPU resources when your application goes rogue, your applications will end up using only 80% of the total resources available to them. The other 20% of available resources will be wasted. TScale - the Innovative Solution A unique approach, developed by RTO Software and included in TScale, is called Application Shaping. Application Shaping automates affinity assignments, application priority changes, and CPU load balancing to provide IT administrators with pinpoint application control. With Application Shaping, TScale gives you the tools to overcome problems associated with rogue applications and provide consistent and reliable application performance and responsiveness even during peaks in application demands. Why is Application Shaping Necessary and Desirable? A terminal server environment is typically characterized by many users using many different applications while sharing two or four CPUs on the server. In this environment, if one instance of an application goes rogue or starts to consume more than its fair share of the CPU resources, it will have a very detrimental effect upon the performance that the server delivers to the remaining users and applications. For example, if a typical load on a production terminal server is 40 users of Outlook, 20 users of Internet Explorer, and 30 users of a CRM application load balanced between two CPUs on the server, the distribution would be as depicted in the table below: Application Users on CPU #0 Users on CPU #1 Outlook 20 20 Internet Explorer 10 10 CRM 15 15 4
As long as each instance of each application is well behaved, a typical modern dual processor server would in general be able to deliver acceptable response times and therefore an acceptable experience to the end users of the system. However, if one instance of IE goes rogue (in some instances, this can occur just by loading a pop-up that contains animation), then that instance of IE can consume virtually all of one of the two CPUs on the server. This leads to two very undesirable consequences: 1. All 20 Outlook users, the other 9 IE users, and all 15 CRM users who share the CPU with the rogue process experience bad performance. 2. As that CPU starts to hang the users of the application on it log off, and log back on again. These logons further stress the entire farm and create load on the other servers, reducing the response time and impacting the user experience across the farm. Note: While we have used Internet Explorer (IE) as a real example, please consider two things: 1) TScale s Application Shaping obviously applies to any application, not just IE, including 64-bit, 32- bit, 16-bit and DOS applications (via NTVDM). 2) IE alone does not typically exhibit rogue behavior. It is the animations, pop-ups and controls frequently used on web pages than can cause problems. Applying Application Shaping to IE controls these problems, and IE is simply used as an example. How Does Application Shaping Impact the User Experience? Application Shaping is an automated approach to dealing with the negative impacts of rogue applications. Application Shaping has three components: Application Affinity This component is used assign all instances of an application to run on a specific CPU on the server. Using Application Affinity for applications that frequently exhibit rogue behavior ensures that when rogue instances occur only one CPU is impacted. The remaining CPUs on that server will continue servicing the other users, optimizing performance for all applications running on the server. You can also use this feature to effectively partition a machine so that certain applications have access to only certain resources. Application Priority With Application Priority, Administrators can define the circumstances in which a potential rogue application is allowed to use CPU resources. TScale will lower an application s priority when it consumes CPU resources beyond its set threshold. Lowering the application priority allows other applications to get the CPU resources they need. If there are still remaining resources, the rogue application may use those additional resources after waiting its turn. Thus, TScale maximizes CPU resource utilization based on user demand rather than limiting CPU utilization based on strict CPU clamping rules. Dynamic CPU Balancing Many client applications work better on a single processor than on multiple processors. TScale s Dynamic CPU Balancing applies the most efficient affinity scheme for running processes, causing applications that perform more efficiently on a single processor to operate on a single processor while not limiting all instances of the application to a single processor. 5
TScale automatically assigns applications to run on the least-busy processor, balancing the server work load. Dynamic CPU Balancing also confines multi-threaded applications to one processor and restricts individual threads from consuming resources on all CPUs. Visibly Improved Response Times Together these approaches allow you to eliminate the impacts of rogue applications upon your terminal servers and deliver a superior user experience. When you add the benefits of TScale s Application Shaping to the benefits of TScale s Application Optimization features that have been in TScale since its inception, you get the results depicted in the diagrams below. (To learn more about TScale s Application Optimization and view other whitepapers or demos, please visit our web site www.rtosoft.com.) Before TScale 6
After TScale 7
How is Application Shaping Implemented in TScale? Configuring Application Shaping and control rogue applications is easily accomplished using the TScale Optimization Console. TScale s Optimization Console is a graphical user interface that allows administrators to manage all the TScale Agents installed on servers across the entire server farm in one application. TScale s Application Shaping is extremely flexible and configurable, allowing administrators to setup shaping policies which can be applied to individual servers, groups of servers, or the entire server farm. It is possible to individually specify shaping parameters for any number of applications or to name a default *.* process so that any application reaching certain levels of processor usage will be subject to shaping. TScale s Application Shaping gives administrators a great deal of granular control over the applications running on each server. When configuring Application Affinity, the administrator specifies which of the n CPUs on that server all instances of a process will run. Now when that application goes rogue, only the assigned CPU will be affected. For Application Priority, administrators set the threshold for TScale to lower the priority of an application after it has used x% of the CPU for n minutes and seconds. This allows other user applications to get the CPU resources they need, enhancing the application performance for all users. When using Dynamic CPU Balancing, administrators can also further specify which of the n CPUs on which applications can run. Applications that benefit from running on a single processor will see a performance gain. 8
Conclusion IT departments are responsible for providing consistent, reliable performance of key applications to the endusers. Organizations using Citrix XenApp, Microsoft Terminal Services, and/or Microsoft Remote Desktop Services in their business require robust tools to ensure peak system performance and prevent rogue applications from causing system freezes and sluggishness. Only TScale combines the benefits of both Application Shaping and Application Optimization into one easy to use and easy to administer product. With TScale you can deliver the following benefits to the users of your terminal server farm: Applications will perform better during periods of peak demand or high workload, resulting in better overall user experiences and less money spent on headroom and server redundancy. You will be able to comfortably support more concurrent users per server. Rogue applications will be constrained from consuming all server CPU resources so users will enjoy a more consistent application operation. Administration and help desk resources will be better utilized, as it will no longer be necessary to manually terminate rogue processes. About RTO Software RTO Software, Inc. is an established provider of application-focused performance management tools. As an innovative leader in this rapidly growing area, RTO provides software solutions to enterprises and software firms that want to improve the performance and capacity of applications operating in a Windows environment. RTO s solutions are used on thousands of servers around the world in a variety of industries, including financial management, manufacturing, healthcare, telecommunications, and government. RTO Software is based in Alpharetta, Georgia. For more information and to obtain a free evaluation version of TScale, please visit RTO Software at www.rtosoft.com, or call at +1-678-987-4300. 2010 RTO Software, Inc. Revised edition. All rights reserved. The information contained in this document represents the current view of RTO on the issues discussed as of the date of publication. Because RTO must respond to changing market conditions, it should not be interpreted to be a commitment on the part of RTO, and RTO cannot guarantee the accuracy of any information presented after the date of publication. This white paper is for informational purposes only. RTO MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. TScale is a registered trademark of RTO Software. Other product or company names mentioned herein may be the trademarks and/or registered trademarks of their respective owners. 9