The Interactive Session metric recorded by Citrix Director has always confused those trying to investigate why logon times are so high.
In this post I’ll explain how you can cut Interactive Session time by more than 60% immediately. You can reduce the time to as little as 3 seconds. This allows Citrix Director logon time reporting to become much more accurate.
For more logon time reduction tips see http://www.jgspiers.com/citrix-director-reduce-logon-times/
What is Interactive Session Time?
It is the time taken to handoff keyboard and mouse control to the user after the profile of the user is loaded for a session.
Event ID 2 is initially logged on the VDA shortly after a desktop/application icon is clicked within Receiver client or Receiver for Web. This event triggers the Interactive Session timer which ends once Event 1000 is logged to indicate that the session is ready for use. Event ID 1000 is logged by the Citrix Profile Management service.
So whilst Director records logon times, it is important to understand that this is the time taken from clicking to launch a resource until the machine is actually usable even though the actual logon may have completed some time before that. This produces innacurate results in Director for true logon times.
The Interactive Session time is calculated once Event ID 1000 is logged on the VDA. The faster the UPM Event User Message runs the quicker Event 1000 is logged and the calculation is complete.
So ideally we want UPMEvent.exe (or UpmUserMsg.exe for VDAs prior to v7.7) to run once we see that desktop wallpaper as that is when the logon is complete. By default, it instead runs some time after the profile has loaded.
What is faster than startup applications specified within the Run key? A log on Scheduled Task.
Open your gold image or Citrix App Layering Platform Layer (the Platform Layer should contain your VDA software). Launch RegEdit and navigate to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Delete the Citrix UPM UserMsg string. Finalise the image.
Now using Group Policy, create a new GPO which applies to all users logging on to the VDA.
Within the GPO expand User Configuration -> Preferences -> Control Panel Settings -> Scheduled Tasks -> New -> Scheduled Task (At least Windows 7).
On the General tab specify a name. Keep the task running under %LogonDomain%\%LogonUser%. Set Configure for to Windows 7 or the highest available OS.
On the Triggers tab click New.
For Begin the task choose At log on and for Any user. Click OK.
On the Actions tab click New.
Under Action select Start a program. Under Program/script enter “C:\Program Files\Citrix\Virtual Desktop Agent\upmEvent.exe” and beside Add arguments (optional) enter wait. Click OK.
Click OK to finish creating the Scheduled Task. When users log on to a VDA the UPMEvent.exe program launches via Scheduled Task immediately when the desktop shell has loaded.
With UPMevent.exe being started now by the Scheduled Task the average logon time has dropped to 13 seconds. Notice the Interactive Session times are all at 3 seconds, more than 50 seconds lower than a default XenDesktop 7.13 installation I ran my testing on. These results are on a non-persistent VDA which is rebooted between each logon.
Director is logging much truer logon times and our future reports will be much more accurate.
Note: In VDA versions before 7.7, upmEvent.exe was called upmUserMsg.exe.