The interactive session is probably the most time spent during logon, according to Citrix Director. What is, actually, the interactive session and how can it be reduced? For many customers and users the logon duration is important and, therefore, you might want to minimize the time. This is nothing new and I have written and talked about the Windows logon a lot in the past because it's an important topic, once you steal the user's PC and replace it with a Thin Client.
Before going into details, we have to talk about the login time in general. What's the starting point and what's the end of the whole process? This is exactly where you might get different results with different tools. If you are using ControlUp you will most probably end up with up to 20 seconds less than in Citrix Director. This is simply because ControlUp sees the login finished at a different point than Citrix with Director. That doesn't mean Citrix is wrong and ControlUp is right, they both just use different "finish" states. I personally agree more with ControlUp then with Citrix and here is why.
According to this Citrix Blog, the login ends with receiving Windows Explorer "input-idle" state. This by itself is, in my opinion, a problem. Through the Windows run keys and other places, applications are launched automatically and most often done by Windows Explorer. This then extends the login time because Explorer will not get to the idle state even though the user might already see the desktop and can also start working. For customers who start more programs at login will get a much longer time for the interactive session in Director. That might end up with 40-60 seconds total login time. Now if you are using other programs like the Logon Simulator, you get shorter login times because the program uses Citrix ICO logon notification and not the Explorer idle state.
What can you do to reduce the interactive time?
First of all, when using Windows Server 2012 or above, set the following registry key through group policies.
StartupDelayInMSec REG_DWORD = 0x00000000 Find the story behind the key in this Microsoft Blog
Adding the key might speed up the login by several seconds within Citrix Director because it would directly influence the interactive session.
The previously mentioned Citrix blog explains that the Explorer idle state is a comparable event (1000, Desktop Ready) logged with Citrix User Profile Manager. This information will be quite helpful, together with Microsoft Procmon (this is just one way, but a simple one; I actually used Microsoft WPA).
Isolate one Server and login with the administrator and run Procmon. Now login with a standard user or a user when login takes a long time. When done, stop Procmon. Check the event log for the UPM 1000 ID. Use the time as a starting point in Procmon to go back in time for the amount of time shown in Director for the interactive session.
Let's say UPM event 1000 is at 8:00:00 and the interactive session time shown in Director is 20 seconds. Then in Procmon you need to look at the trace from 7:59:40 to 8:00:00. What applications, scripts, etc., are started during that time and are they needed? If you don't need them then get rid of those programs. On my systems, I found that I get to a minimum of around 6 seconds for the interactive session time. This is the time of system processes that are required like Citrix seamless- and graphics engine, Microsoft Windows Desktop Manager, and so on. This can only be quicker with general faster systems.
When you get closer to the minimum interactive session time, you will find that other programs will not differ so much anymore for the total login time. In my case, it's 11 seconds with the logon simulator and 12 seconds within Citrix Director.
See the relationship between total time and interactive session time
I recently setup VDA servers based on Windows Server 2016 with XenDesktop 7.12. The main focus was to see the impact of the interactive session when I made changes to the system as described before. Ok, I also did some other changes that I do by default to optimize systems to rollout.
Check out the following image I took from Citrix Director over a time period, when I was optimizing the system. It's always with the same non administrator user connecting to the same VDA Server (just one to keep things constant).
Keep in mind, the numbers are from my lab environment and you can not use the numbers to compare with your systems. The whole idea here is to show the importance of the interactive session if you want to get the login time down in Citrix Director.
Check out the left image. Left side is the total login time (Gesamt) and on the right the time for the interactive session; both in seconds.
Another thing, getting the time down from 11 seconds to 7.5 seconds is much harder then the first 20 seconds.
Short video for the Sever 2016 login
Caching features can reduce the login time slightly doing a re-login to the same system.
After optimizing the system I compared the last login with ControlUp (9 seconds), ControlUp Login Simulator (8 seconds), and Citrix Director (11.5 seconds). In my opinion, Citrix login time will always be higher but less significant if you get the interactive session time down to a minimum. Two more things. First the VM had 2vCPU's and I changed to 4vCPU's and reduced the interactive session to 6 seconds, but the total time stayed almost the same. Next, I added all times found in Director but it was always 2-4 seconds less then the total time in Director... 2-4 seconds for what? I couldn't find anything.
Let me know how far did you get the interactive session down?