Earlier today I blogged about the extraordinary amount of time it was taking to install updates on a Windows 7 virtual machine. I believed that the issue came down to TrustedInstaller.exe taking what seemed to be an ever increasing amount of RAM and opening an inordinate number of handles.
After writing this blog post, I wondered who at Microsoft might be interested in the issue. I ended up tweeting a link to Mark Russinovich in the hope that it would whet his interest (the blog did have pictures of Process Explorer, one of Mark’s great Sysinternals utilities ☺):
And verily, Mark did reply:
As Mark was kind enough to respond I knew I had to go and reproduce the issue! So I built a new VM of Windows 7 Ultimate x64 with stock standard settings, but only 1GB of RAM (oops):
|Stock Windows 7 Ultimate x64 install on a VM|
I configured Performance Monitor to trace Working Set and Handle counters on the TrustedInstaller.exe process, and saved the settings into a Data Collector Set so that I could capture the whole update process.
Then I started the Windows Update:
|Windows Update: I selected the additional important update, but none of the optional updates|
Three hours later (I did say whoops about the RAM, didn’t I?) Windows finished installing updates, and I was able to generate a report from the Data Collector Set that showed the following graph:
|Graph of Working set and Handle Count + summary of Working Set detail|
|Handle Count detail|
At the end of the process we see 34,500 open handles, and a peak of 600MB memory usage. As one would expect, the RAM usage went up and down quite a bit as updates were installed. More disturbingly, the Handle Count really did not decrease significantly through the process. So the real message of the graph is the trend for both the green Handle Count, and the red Working Set, which are both clearly heading the wrong way: up.
There were fewer updates to install than with the other VM, which was also installing Microsoft Office Updates; I’m guessing this had an impact on the overall numbers.
Minor note: I didn’t fix the time zone for the VM. I wasn’t really doing this at 3AM!