I have been working with Citrix deployments for many years, and the primary aspect of these environments is change. You could add a new software package to thousands of users or fresh your server hardware. Collecting and tracking performance metrics over time helps you to understand how these changes affect your user capacity and user experience. In this post, we’ll discuss Logon Performance.
NOTE: THIS POST ASSUMES YOU ARE RUNNING CITRIX DIRECTOR (PICS ARE FROM VER 7.15 AND HAVE ACCESS TO MICROSOFT EXCEL (365 ON-PREM)
- Other blogs in this series: Be a Metrics Master: Concurrent Users
Why Track this Metric
When your user’s log on and start a desktop or application, this is their first impression of your Citrix environment. A quick logon time will allow them to start their work sooner, while a long one will color their impression of Citrix in general. There are many methods to reducing logon times. I recommend you read an in-depth article written by James Rankin that dives deep into all the techniques and tricks you can employ to get your logon times below 10 seconds!
Recording logon times is a Key Performance Indicator (KPI) that speaks to the overall health of your Citrix environment. This includes your Active Directory configuration, your storage efficiency, and your network configuration not to mention how well you’ve configured your virtual machine hosts to get users to their applications/desktops as soon as possible. The Citrix logon process is complex and has a lot of moving parts and the last time I saw a detailed diagram was a monstrous diagram put together by Brian Madden. Here are some resources to get more information (beyond the James Rankin article).
- Application Enumeration Process and the Application Launch Process in XenApp 6
- XenDesktop Connection Process and Communication Flow
- Digging into the Citrix logon process
How to collect the data
Citrix Director has some great views of logon times including how much time each part takes. Exporting this data and saving it over time will allow you to track how changes made in your environment affect logon times. Logon to Director and click on the Trends button. Then click on Logon Performance.
The default view is to show all the logon data for the last two hours. The graph shows the number of logons per two-minute intervals. This is represented by the blue bars. The dark-blue line is the average logon duration and the orange line represents the previous 2-hour average logon duration. Hovering your mouse over a blue bar shows a breakdown of the logon process and compares it to the baseline period which is taken from 2 hours prior. Let’s cover what each part of the Logon Duration means.
- Brokering – Time taken to decide which desktop/server to assign to the user.
- VM Start – If the session required a machine start, this is the time taken to start the virtual machine.
- HDX Connection – Time taken to complete the steps required in setting up the HDX connection from the client to the virtual machine.
- Authentication – Time taken to complete authentication to the remote session.
- GPOs – Time taken to apply group policy objects during logon.
- Logon Scripts – Time taken for the logon scripts to be executed.
- Profile Load – Time taken for the profile to load.
- Interactive Session – Time taken to “hand off” keyboard and mouse control to the user after the user profile has been loaded.
We can see how the times change from the prior two-hour baseline in these two examples.
In the graph on the left, we can see the current logon duration took 3 seconds longer than the prior baseline. You can see this indicated by the red triangles next to each phase. In contrast, on the other graph our logon improved by 16 seconds compared to the baseline. This is shown with the green triangles. This information is great for real-time tracking of issues in your environment, but to track changes over time we’ll have to compare data over a longer period.
To get data from for the past month, set the Time Period to ‘Last Month’ and Ending to custom. Then select the first day of the month. This will select the previous 30 days. Clicking Apply will refresh the graph.
Clicking Export, we’ll export this report as an Excel spreadsheet. The CSV version of this report creates a four-column table with Date, Average Logon Duration, Previous Month Average, and the number of logons for that day. The Excel export creates a file with 3 worksheets. One for Logon Performance with the Previous Month Average, one with the number of Logons, and one for the Logon Duration by User Session. This last sheet is useful for shorter time periods as it shows the Logon Duration breakdown for all users in the selected delivery group (or all users if that is selected).
How to record/display the data
There are many tools that can be used to display this information, but we’ll use Excel in this example as it’s the one I’m most familiar with and probably readily available to most Citrix Administrators. To display this information, we’re going to track the average Logon Duration for my main Delivery Group where most of my users reside. We have logically separated this Delivery Group into three environments. Each environment has separate group policy and WEM configurations. This way we can record and test changes before rolling the changes out to all users. The three environments are QA for testing, UAT for near-prod testing by a subset of users, and Prod which is used by everyone. To gather this info, we select the delivery group we need and export the data for each one. We just have to ensure the time period is the same for each export.
In our spreadsheet, we have seven columns. The Date and average logon duration and number of logons for each environment. Pasting the data from our export gives us the following:
This data can be averaged for the month for each environment to see a monthly overview.
This is accomplished by using the AVERAGEIF Excel function. This function returns the average of all cells in a range that meet a certain criteria. In this case, since our QA and UAT environments do not have data over the entire month we will have days that are blank or zero. We set the criteria to be not equal to zero, so we’re only averaging logons for days we have data.
NOTE: Since the export returns the average for the day, this table is showing an average of averages. This is not mathematically ideal but to calculate a true monthly average would require a custom SQL query of the Site Monitoring database.
We can also track the Logon Duration over time for each environment. I prefer to use a 3-D area graph to show this information. You create three Series, one for each environment, and select the date column for the Y-axis.
Once you have a few months of data, you get a graph that looks like this.
User Logon Duration should be a KPI (Key Performance Indicator) that you record and track. Watching it over time, especially if you can track changes and upgrades from environment to environment will give you great feedback on changes that improve your users’ experience. Please comment if you have any questions.
- Monitor historical trends across a Site
- Citrix Director: Logon Duration Improvements
- Diagnose user logon issues
- Interactive Session of Logon Duration in Citrix Director – Explained
- AVERAGEIF function
Thanks for reading,
Citrix Technology Advocate
Raleigh-Durham CUGC Leader