I’m researching the impact of various Windows 10 optimizations on login duration, especially in a non-persistent VDI environment. In the first part of this blog-series, I described the infrastructure and showed some preliminary results. One of the issues I had was the difference in login time of what was measured with the stopwatch versus what UberAgent logged as login time. Fortunately, that has been resolved now (thanks to Helge Klein and his team) and I decided to redo the first tests. I also performed the test using LoginVSI, just to automate multiple logins, not for simulating a workload (yet).

Disable Windows updates and Windows Module Installer

After performing the first tests with 10 login sessions in a row I noticed high CPU load on the host:

  • 10:36: boot 10 VMs (instant clones = resume)
  • 10:51: First login. Then every 2 minutes, 1 login, 6th was skipped)
  • 11:09: 10th and final login. After that, CPU-load still 50%.

Looking at the load of a VM:

Apparently, the load was already high before logging in. The high CPU-load stopped at 11:25.

This was for every VM. Luckily, I have UberAgent running, so the cause was quickly found:

The process “TiWorker.exe” is causing the high CPU load. This process is also causing high IO-load:

The TIWorker.exe is a system component in Microsoft Windows which is responsible for installing new modules and updates. The Windows update service was already disabled, but there is another service which is responsible for downloading and installing new modules: The service Windows Modules Installer. After disabling this service, the CPU-load is much butter after logging in sessions on the VMs:

For all the tests I performed, I disable this service (and the Windows update service) so this won’t mess up the results.

Baseline

For each test, I perform 10 logins, with 2 minutes in between. The averages of those 10 logins are taken to calculate the average. The first test is to set a baseline login duration of a new user. I used the following Windows 10 VM parameters:

  • Windows 10, 64 bit, 1607 Enterprise edition
  • 1 vCPU
  • 4GB RAM
  • 40GB harddisk

1 vCPU is not what I normally recommend, but it is interesting to see how it compares to 2 vCPU VMs (which will be the default for the other tests).

According to UberAgent, the average login for the 10 logins was 70.19 seconds:

Logon duration:

Logon per section:

There was one session which took more than 12 seconds extra compared to the average. So for the final calculations, I will probably leave out the fastest and the slowest login and take average of the middle 8.

This is a clean login, without optimizations and without applying User environment settings (like drive mappings, start menu shortcuts, user policies, printers, etc.). There is only 1 group policy active (see the first blogpost for the GPO-settings). Setting User Environment settings will add 10-60 more seconds, depending on the UEM solution you choose and what settings you apply. I’ve seen environments where this can take even more time. This will be one of the test-scenario’s later on.

Optimizations

The first optimization is to add another vCPU. 1 vCPU is clearly not enough for Windows 10. 2 vCPU is the minimum I advice my customers. In some cases 3 vCPU is even better, when using PCoIP as a display protocol and you don’t have Teradici APEX cards for example.

The average login duration now is 30.71 seconds:

Logon duration:

Logon per section:

In this case, there was one session 7 seconds faster then the other sessions. But the average is still half the time compared to the 1 vCPU VM. Let me remind you, this is still without setting the user environment. But we want the first login to be as fast as possible, as it will be a first login every time a user logs on to a non-persistent desktop.

Windows 10 versions

Now let’s discuss Windows 10 versions. I’m using the Windows 10 x64 1607 (Current Branch) Enterprise edition. This version has the Windows store, Windows Store Apps and some other stuff you probably don’t need in a VDI environment (VDI is for legacy applications, right?). As an alternative, I will also test the Long term Servicing Branch (LTSB) edition. This version doesn’t have the Windows store, the builtin Windows apps and the Edge browser, but is more lean and mean for VDI. I’m interested in the login difference between the two.

Testing with a 2 vCPU VM, 4GB RAM and 40GB disk, the average login duration with the LTSB version is 17.91 seconds:

Logon duration:

Logon per section:

Again with one session a bit off compared to the others. But still almost 13 seconds faster than the regular Windows 10 version.

Group Policy

Next step is to add a Computer Group Policy to adjust some basic settings for a (non-persistent) VDI environment. The GPO settings I added where:

Disabling the setting “show first sign-in animation” should speed up the login for the user.

The user doesn’t see the first-login animation (getting things ready) and compared to the first test with a 2 vCPU VM (Windows 10 Current Branch (1607)) this is almost 5 seconds faster. According to UberAgent, the login duration is on average 25.52 seconds:

Logon duration:

Logon per section:

Conclusion: adding this group policy speeds up the login process 5 seconds with the CB version.

The same test but with the LTSB version, the average login duration is 15.38 seconds:

Logon duration:

Logon per section:

Conclusion: adding this group policy speeds up the login process 2.5 seconds with the LTSB-version. I will keep the CP-VDI-Default and the CP-VDI-non-persistent computer policies as the default for the rest of the tests.

Persistent profile

I also want to compare the login duration to a situation where the VDI-environment is persistent and the user will always log on to the same virtual desktop. So the first login is a user logs in to a new desktop, the second login is after a reboot, and the user profile is still on the virtual machine.

These are the logon durations according to UberAgent:

After the initial login, the next logins on the same desktop with the same user is comparable between the Windows 10 1607 version and the LTSB version. The difference in initial login duration could be caused by the Windows Store apps, as it is one of the differences between the CB and the LTSB version.

Windows Store/Modern Apps

If you decide to use the Current Branch version, but you don’t want the Windows store/modern apps, you can remove them with the powershell-script created by Michael Niehaus (there is a downloadlink for version 1.2). There are other scripts available, but this one works good for me. You can remove all modern apps, or create a XML-file with a selection. I removed all the apps:

Even the Windows Store is gone! Only the Edge browser remains (and “Contact Support”). There is no Windows store in the LTSB version, so I only performed the login tests with the CB-version:

Average login duration is 17.66 seconds. Still more than 2 seconds slower than the LTSB version, but 8 seconds faster than the CB- version with Windows Store Apps.

Logon duration:

Logon per section:

So far part 2 of this series. Stay tuned for part 3 where I investigate more optimizations. Let’s see if I can get under 10 seconds. 🙂