Getting started with EdgeSight for Load Testing

The Controller is, in effect, the management console where script creation ... the geographic locations of your organization in order to understand the effects of ... application or desktop and save the ICA file to a location on ..... 36342/0907/PDF.
4MB taille 113 téléchargements 375 vues
White paper

Getting started with EdgeSight for Load Testing

Table of contents Introduction.......................................................................................................................................... 1 Overview.............................................................................................................................................. 2 Defining Load....................................................................................................................................... 3 Connections......................................................................................................................................... 4 Define Users..................................................................................................................................... 5 Instructions........................................................................................................................................... 5 Performing a Load Test......................................................................................................................... 8 Create Monitoring Options................................................................................................................ 8 Performing the Load Test.................................................................................................................. 8 Monitor View....................................................................................................................................10 Conclusion.......................................................................................................................................... 11

Introduction Citrix EdgeSight™ for Load Testing provides the best automated load and performance testing solution for Citrix Presentation Server™ environments. EdgeSight for Load Testing takes the guesswork out of forecasting required resources, reduces maintenance costs associated with regression testing, and minimizes the chances of introducing instability through configuration or software changes. Simple-to-use record and replay scripting accurately reproduces real user interactions with an application, creating a library of reusable, repeatable tests. Compare and contrast before and after scenarios for configuration or software changes. Identify branch office application performance bottleneck issues with the scalable remote launch capabilities of EdgeSight for Load Testing. This guide provides a high-level overview to enable you to begin creating simple yet meaningful scripts and interpret the data produced. More-detailed script creation techniques can be found in the online help for EdgeSight for Load Testing.

1

Overview EdgeSight for Load Testing consists of two basic components • The Controller • The Launcher The Controller is, in effect, the management console where script creation, load profile creation and monitoring occur. The Controller can be installed onto a server (not a Presentation Server) or a workstation. The Launcher is the component that controls and creates the ICA® sessions that will create load on the target machine. The Launcher can be installed on the same machine as the Controller, on a dedicated machine, or on multiple machines for morecomplex load-testing scenarios. A workstation-class machine can be expected to support up to 50 individual ICA sessions. The Launcher must be installed onto a machine that has the ICA client present Please follow the installation instructions contained in the product. It is important to make configuration changes to the Presentation Server to ensure the smooth running of load tests. These changes are described in the Configuring the Server section of the online help.

How EdgeSight for Load Testing works Controller • Virtual user control • Virtual scripting • Rich Performance vs. Load information from launchers

Citrix Infrastructure Launcher • Virtual user creation and control • Input and response to system under test • ICA focused

2

Figure 1: EdgeSight for Load Testing Architecture

• Presentation Server or Desktop Server infrastructure • Single or multiple servers

Defining Load

From the menu bar, select Load and then Add

When creating load it is important to give consideration to the task that you are carrying out. There are two common scenarios used in load testing that will deliver different, yet important, performance information: • Application or server stress testing • Environment simulation The load patterns that are created for each of these scenarios will differ based on whether you are trying to understand the capacity or application performance limitations for your environment, or whether you are trying to model the usage patterns for your environment. For the purposes of this guide we create a simple test. Open the EdgeSight for Load-testing Controller by selecting Start > All Programs > Citrix > EdgeSight for Load Testing > Controller When the Controller has started, select Script > New

Figure 3: Load Properties Enter 2 into the Load Duration section. In the Load Control section enter a starting number of 1 and an end number of 15 as shown in Figure 3. This will utilize 15 users during our test, quickly increasing the number over a 2-minute period. In this mode 1 user will be added every 8 seconds. Select OK to commit to this load profile. Multiple load profiles can be created to lengthen the duration of the test at different user load rates. For the purposes of this example we will create a second load profile to maintain the user count at 15 for a further 5 minutes. Follow the directions above to add another load profile with the values displayed below

Figure 2: Script Properties Type a name for your script (as shown in Figure 2) and select OK You will now see new items in the tree representing Load, Connections and Instructions. Select Load For this example, we will rapidly increase the load on the server over a 2-minute period. For a stress-testing scenario, it would be advisable to add load to your server gradually over a period of time, such as 30 minutes. This will enable us to view how your application performs as new users are added and the load increases, identifying potential performance tipping points.

Figure 4: Load Properties

3

A third load profile will enable us to gracefully complete the test having the users slowly logging out of the system

Tip: Presentation Server 4.5 removed the ability to create an ICA connection directly from the management console. In Presentation Server 4.0 the user can right-click on a published application inside the Presentation Server Management Console and select Create ICA File. In Presentation Server 4.5 it is necessary to have Web Interface for Citrix® Presentation Server configured. In Web Interface, left-click the published application or desktop and save the ICA file to a location on your machine. Once you have done this, it is necessary to take one more step to prevent the ICA file being removed after use. To accomplish this, open the ICA file in an application such as Notepad, and change the line RemoveICAFile=yes to RemoveICAFile=no. As shown in Figure 7

Figure 5: Load Properties The view of your load profiles should now look like Figure 6

Figure 6: Defined Load Profile When attempting to emulate your own environment, more-realistic loads can be created by increasing user loads over different time periods, simulating an increased frequency of logins at 9:00 am for example. EdgeSight for Load Testing delivers a great deal of flexibility in how load can be applied. Please see the online help and tutorial for further load-creation options.

Figure 7: Edit .ICA File From the Menu Bar, select Connection > New For this example, we will be connecting directly to Presentation Server.

Connections Connections define the location or locations that tests will be launched from. In our architecture diagram, these machines are known as ‘Launchers’ and must have the Launcher component installed. In a simple scenario, this may be the same machine from which you use the Controller; in a more-complex environment, you may wish to launch tests from multiple machines distributed around the geographic locations of your organization in order to understand the effects of latency and connectivity on different sites. Connections can be established by either using an ICA file or by specifying the name of the server you wish to connect to. Figure 8: Connection Properties

4

Enter Localhost if you intend to use the same machine on which the Controller is installed or the machine name if you have installed the Launcher on a separate machine.

Once you have entered the details, select OK. You will now see the list of users displayed (Figure 11).

If you intend to use an ICA file to connect to a specific application, browse to the location of that file in the Connection ICA File field or enter the server name of the Presentation Server that you will be accessing. Once complete, select OK. A new connection will now be displayed under the Connections icon in the Controller interface (Figure 9 )

Figure 11: Configured Users When you begin to create your load script, it will be necessary to select the user that you wish to use to make the connection to the server. Select the first user in the list by clicking on the computer icon in front of the user information.

Figure 9: Connections Node

Define users Now we need to define the user credentials that will be used to log in to the Presentation Server to carry out the test. In this example, we will use a single user ID for the load test. In the Menu Bar, select Users > Create. Enter the number of users you require for this test and the credentials you wish to use. This dialog will create the number of specified users with these credentials.

Instructions We are now ready to begin recording our script. The instructions folder is the place where the mouse clicks, keyboard presses, wait times and synchronization points are recorded. Before we begin the recording it is important to be aware of some best practices when recording scripts with EdgeSight for Load Testing: • B uild scripts incrementally: While it is easy to record all of your interactions with an application in one go, doing this will make problem resolution difficult should there be an issue. EdgeSight for Load Testing makes it easy to stop and start the recording process, meaning that you can piece together the script and test that everything works as expected. • U se folders: Creating sub-folders under the Instructions folder will make the interpretation of the results of the load test easy to view, understand and explain. Folders can be created for different tasks or parts of the load test.

Figure 10: Add Users

In the script we are going to produce, we shall follow both of the above best practices. Although this will be a simple application interaction, it will demonstrate how quickly and easily robust scripts can be created with EdgeSight for Load Testing.

5

The first task will be to record the successful logon and logoff to the Presentation Server. By recording these events, we form the basis of the recording, ensuring that any pop-up boxes are cleared effectively and that a successful logoff the system can occur. Once they are recorded, we will create folders for each of these tasks. Select the Instructions folder and from the Menu Bar select Record; you can also press the red Record Button on the icon bar at the top of the Controller interface. Tip: Ensure that you have launched the Launcher or an error will be produced. A session will now launch to your Presentation Server. Any key presses or mouse clicks that you make within the session will be recorded by EdgeSight for Load Testing as part of your script.

Figure 13: Recorded Script For descriptions of the meanings of the icons within the script, please refer to the online help. This will help to interpret the meanings and the flow of the scripts. Next, create two folders for the tasks that we have performed. From the icon menu, select the New Folder icon (as shown in Figure 14 ). If your test does not present you with a pop-up, just ignore this step. Figure 12: ICA connection Window When this session launches, we are presented with an ICA Seamless Host Agent pop-up window as a result of the direct connection (Figure 12). First, we will clear this window by selecting OK. Next, initiate the logoff by selecting Start > Logoff and then confirm the logoff. We will now be taken back to the Controller user interface with our new script elements as shown in Figure 13.

Figure 14: New Folder Rename the new folder to Clear Popup. Repeat this to create a folder called Logoff. For this test, the first three items in the script constitute the act of clearing the pop-up screen. ICA Seamless Host Agent is the name

6

of the window into which we clicked; there was a pause of 3.828 seconds from when it appeared to when we left clicked to select OK. Highlight these three items and drag them into the Clear Popup folder we just created in the left-hand pane.

For this example, we will open the Notepad application and type a small amount of text. Once the login process has completed, click on the Start button. Tip: Using keyboard shortcuts when creating scripts provides a much more robust solution than clicking on menus. Wherever possible, use the keyboard shortcut.

The remaining actions constitute the logoff from the system beginning with the synchronization point labeled Program Manager (the desktop of the session is represented by the Program Manager Synchronization point). You can see that when we clicked on the Start button (Program Manager) the Start Menu was the result. From here we left-clicked onto Logoff, the result of which was the Logoff window represented by the logoff synchronization point. We left clicked in this window to finalize the logoff task.

Press r to select Run Program.

Highlight all of these script elements and drag them into the folder named Logoff in the left pane.

Type in some text into Notepad.

You should now have two folders with all of your instructions separated into them. Next, we will record some simple application interactions. First, create a new folder into which your script instructions will be placed. Position the folder in the middle of your existing folders as these instructions will be executed after you have logged in, but before you log out. In the left pane, highlight your new folder (Figure 15 ). By doing this, when you press Record, EdgeSight for Load Testing will play through your script until it reaches your highlighted position; in this case, it will log in, clear the pop-up box and then stop. You will hear a beep – this means you can start using your application. Press Record.

Type “notepad” into the Run Program dialog. The Notepad application will appear on the screen.

Press Alt and f to select the File Menu. Press x to exit the application. Press n to reject saving the changes. Tip: When you create more-complex scripts, it’s important to give some thought to data that is being created as part of the script and whether and where that information should be saved. In this case, if we saved the file as part of the script creation, when we replayed the script it would also attempt to save the file to the same location with the same name; this would result in an extra dialog asking whether we wish to overwrite the existing file. As we didn’t see this when we created the script, this would cause the script to fail. By not saving the information, we avoid that issue. The online help details options within the product that can help overcome issues such as this. At this point we have performed all of the tasks that we wish to perform. As we have already recorded the logout procedure, we do not need to perform that task. Instead, return to the Controller and press the Stop button on the icon bar. The session to the Presentation Server will close itself down and our instructions will appear in the Controller. The script should look like the script in Figure 16.

Figure 15: Highlight Folder

7

Create monitoring options EdgeSight for Load Testing monitors two key areas: • Presentation Server performance • Application transaction performance Presentation Server performance will be monitored by selecting a number of key performance counters on that machine. It’s important to note that EdgeSight for Load Testing does not install anything on the Presentation Server. In this example we will monitor the key counters of % processor time and Memory Available Mbytes. These counters will enable us to check the basic performance of memory and CPU. In the Controller, expand the Display node and select Counters. From the Menu Bar select Counters > Add. In the dialog, type in the name of the server, preceded by a double backslash \\ (as shown in Figure 17) and select the metric that you wish to monitor. You will need to repeat this for each metric.

Figure 16: Recorded Script In the left pane, rename the folder to Use Notepad. We are now ready to perform our load test. Note: Although this is a simple example of a test, the use of the methods above will enable more-complex scripts to be constructed very quickly and easily. Please see the online help for further script creation options.

Performing a load test We now have all of the elements required to perform our first load test. Before we do, we need to give some thought as to how we will monitor the performance of the test and the Presentation Server we are connecting to.

8

Figure 17: Select Counter We will add further monitoring options for application response as we monitor the live load test.

Performing the Load Test We are now ready to start our load test. In the icon bar, select the Play Button .

The components making up this view are: Tip: Ensure that you have activated the Launcher; otherwise, an error message will be produced. You will start to see your sessions being launched. The sessions can be tiled on the screen as in Figure 18.

• User Count – the number of users connected to the test • C onnect – the time taken to establish the connection to the Presentation Server • I nstructions – the time taken to complete the instructions that we have recorded for our test • Disconnect – the time taken to logoff the Presentation Server • I CA ping – the time taken for an ICA packet to travel between the Launcher and the Presentation Server As the load test runs, timing information will populate the cells to the right of these categories, indicating the performance of each of these elements of the script. From this view, we can further drill into the Instructions folder to better understand exactly where time is being spent during the execution of the instructions. You can continue drilling into this until you reach the step-by-step synchronization point information to identify the exact place in your script where a bottleneck may be occurring.

Figure 18: Tiled Sessions Now that our test is running, we will move to the display node within the Controller to look at the performance information being returned from the Launcher. When you select the Display node, the Scripts window in the right pane will display the high-level information for our test. Doubleclick on the name of the test to drill down into the performance information. You will see the information in Figure 19.

Figure 20: Timing Information The numbers shown in the cells represent the time taken between each of the steps. The small green number to left of the cell represents the number of times that action or instruction has successfully been completed. The central number represents the average time taken to complete that action or instruction. Tip: the second number in brackets displayed in Figure 20 shows the difference between the fastest time for the action to complete and the slowest time for the action to complete, and can be added to the view by selecting Display > Properties from the menu bar and selecting Show Delay’ from the Display Properties dialog (Figure 21).

Figure 19: Scripts Tab

9

Useful metrics to monitor include: • User Count – This provides a baseline by which to judge the application’s performance as the user count increases. • P erformance Counters – These are selected from the Counters tab in the display view. • Connect – This will highlight whether connection time is affected by the load being placed on the server. • Instructions – It is useful to understand the total transaction time for the scripts that you have recorded. As the script continues and you begin to notice areas of the script beginning to slow down due to load, these areas can be added to the view independently to provide correlation between the items listed above and the potential performance bottleneck. Areas of poor performance will be highlighted by the cells in which the timing information is displayed turning yellow, orange or red based on the amount of degradation (please see online help for information on QoS levels). Once you have added the items that you wish to view, your monitor view will display the performance information for the test. When the test has completed, the monitor view should look similar to that in Figure 23.

Figure 21: Display Properties

Monitor view EdgeSight for Load Testing provides the flexibility to customize monitoring to identify exactly those elements in which we are interested. Any of the items above can be added to the monitor screen to display our baseline metrics and those areas of the script in which we are interested (normally, the elements being impacted by performance). To add items to the monitor view, we first have to select the items we wish to monitor. Right-click on the item that you wish to add to the monitor view and select Add Measurement to Display (Figure 22) Alternatively, highlight the item and select the icon bar.

icon from the

Figure 23: Load Test Results In this chart, we are displaying the key performance metrics for this test:

Figure 22: Add Measurement

10

User Count – This enables us to contrast the performance against the number of users that are active on the Presentation Server. In this case, you see the increase from 1 to 15 users in a little over 2 minutes. % Processor Time – In this case, we see the processor

utilization slowly increase to approximately 20% as the number of users increases.

Conclusion

Memory Available Bytes – The scale has been changed on this counter in order for us to view this information. We see a slight increase in the memory utilization but still have plenty in reserve.

Load testing should be seen as an iterative process: performing tests, analyzing the results and then making changes to the test to identify where bottlenecks will start to appear. By steadily increasing user load we understand how this performance degrades and are able to easily isolate performance bottlenecks.

Run – This was a specific element in the script when we launched the Notepad application. Although this script showed very little degradation, this was the element where we saw the largest change in performance. In tests where larger degradations are seen, adding a metric such as this will highlight specific areas of concern. Use Notepad – This is the time for our complete instruction set where we use the Notepad application. This provides a higher-level view of the complete time taken for this folder of instructions. For this particular test we can deduce that our Presentation Server is more than capable of supporting 15 users running the Notepad application. In order to identify how many users our Presentation Server can support, we would re-run this test with an increasing number of users until degradation in the time to carry out the actions became unacceptable.

With more-complex applications, we should expect to see greater degradation in response times as the number of users increases, processor utilization increases and memory is consumed. This may lead to the conclusion that an application causes a bottleneck, perhaps by requesting and waiting for back-end information which itself degrades with a large number of requests from different users. It may be that a server becomes resource-bound by the CPU, in which case we may wish to investigate whether a different CPU option provides greater scalability for the number of users we wish to serve, creating savings in hardware costs. Or alternatively we may recognize that simply adding more memory to the server may increase the potential user density. Ultimately, we hope to reach a number and configuration that enables us to forecast the optimum number of users a server can support while maintaining the best user experience. EdgeSight for Load Testing creates a set of scripts that, once completed, provide the ability to repeatedly run identical load tests to provide direct comparisons between different hardware or software configurations. These same tests can be used to easily regression-test environments as they change with the implementation of hotfixes, service packs or new applications, or to compare and contrast hardware upgrades. Although this paper has used a very simple application to demonstrate the concepts in successfully building a script and understanding the output, the application of these methods to even the most complex applications or application mixes will enable you to create robust scripts with meaningful, actionable results. For information on building more complex scripts including the addition of variables, iterating folders and bitmap recognition, please take the time to go through the tutorial that is included in the online help of EdgeSight for Load Testing Happy Load Testing!

The EdgeSight Product Team

11

Notice The information in this publication is subject to change without notice. THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTIES OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. CITRIX SYSTEMS, INC. (“CITRIX”), SHALL NOT BE LIABLE FOR TECHNICAL OR EDITORIAL ERRORS OR OMISSIONS CONTAINED HEREIN, NOR FOR DIRECT, INCIDENTAL, CONSEQUENTIAL OR ANY OTHER DAMAGES RESULTING FROM THE FURNISHING, PERFORMANCE, OR USE OF THIS PUBLICATION, EVEN IF CITRIX HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES IN ADVANCE. THE USE CASES IN THIS PAPER ARE PROVIDED ONLY AS POTENTIAL EXAMPLES AND YOUR ACTUAL COSTS AND RESULTS MAY VARY.

Citrix Worldwide Worldwide headquarters Citrix Systems, Inc. 851 West Cypress Creek Road Fort Lauderdale, FL 33309 USA T +1 800 393 1888 T +1 954 267 3000 Regional headquarters Americas Citrix Silicon Valley 4988 Great America Parkway Santa Clara, CA 95054 USA T +1 408 790 8000 Europe Citrix Systems International GmbH Rheinweg 9 8200 Schaffhausen Switzerland T +41 52 635 7700 Asia Pacific Citrix Systems Hong Kong Ltd. Suite 3201, 32nd Floor One International Finance Centre 1 Harbour View Street Central Hong Kong T +852 2100 5000 Citrix Online division 5385 Hollister Avenue Santa Barbara, CA 93111 USA T +1 805 690 6400 www.citrix.com

About Citrix Citrix Systems, Inc. (Nasdaq:CTXS) is the global leader and the most trusted name in application delivery infrastructure. More than 200,000 organizations worldwide rely on Citrix to deliver any application to users anywhere with the best performance, highest security and lowest cost. Citrix customers include 100% of the Fortune 100 companies and 98% of the Fortune Global 500, as well as hundreds of thousands of small businesses and prosumers. Citrix has approximately 6,200 channel and alliance partners in more than 100 countries. Annual revenue in 2006 was $1.1 billion. ©2007 Citrix Systems, Inc. All rights reserved. Citrix®, ICA®, Citrix Presentation Server™ and Citrix EdgeSight™ are trademarks or registered trademarks of Citrix Systems, Inc. and/or one or more of its subsidiaries, and may be registered in the United States Patent and Trademark Office and in other countries. Microsoft® and Windows® are registered trademarks of Microsoft Corporation in the U.S. and/or other countries. All other trademarks and registered trademarks are property of their respective owners. 36342/0907/PDF

www.citrix.com