8

I installed Windows 7 on an old laptop yesterday evening, so that I could experiment with Win32 API programming. I started it updating about 5 hours ago. It downloaded the updates in 30 minutes or so, but as of right now it is still installing them, and only 58% complete.

Why is this taking so long, and what can I do to hasten it?

The laptop is an HP Pavilion dv6701us, with 2 GB of RAM, a 120 GB SATA hard disk, and a dual core Pentium D CPU, for what it's worth.

Update (July 18 2015): I've now observed this behavior on every Windows 7 machine in my household, 32 and 64 bit alike. It seems almost invariant with respect to RAM, CPU speed and number of cores, even SSD vs. HDD. All Windows 7 systems I've seen updating, take over 8 hours to install ~200 updates.

Is there anyone for whom Windows Update is not spectacularly slow?

Update (July 19 2015): here is the link to the compressed xprof file:

https://drive.google.com/file/d/0B7EgLkt64WtaWWc5YTJicThLNFk/view?usp=sharing

Update (September 14 2015):

I wasn't entirely satisfied with the answer below - can Microsoft really be shipping something that broken? - so I decided to have a go at it with Sysinternals procmon. This is what I see, over and over again, while Windows Update hangs and doesn't even start downloading stuff:

High Resolution Date & Time:    9/14/2015 8:24:12.9744097 PM
Event Class:    Registry
Operation:  RegOpenKey
Result: NAME NOT FOUND
Path:   HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate
TID:    3376
Duration:   0.0000183
Desired Access: Query Value

That WindowsUpdate key does not exist. Could be it's supposed to be nonexistent; but I strongly suspect otherwise, seeing as it is accessed over and over and over again by the updater's service host process, in a seemingly endless loop. The question in that case, though, would be: what entries/values should it contain?

Google/Bing so far hasn't turned up anything, but I'm going to keep looking on this.

Update 2 (September 14 2015):

I tried the hotfix from here: https://support.microsoft.com/en-us/kb/2700567

It claimed to fix some things, including something about the update service registration being missing or corrupt(!). Bizarre. This is a fresh Windows 7 SP1 install.

... However, Windows Update is still just as slooooooooow as before, chugging away at 50% of available CPU power while appearing for all the world to be stuck in an endless loop.

I just don't understand this. Windows has 90% of the desktop user base, it cannot possibly be this awful by default... I will keep investigating.

15
  • It could be something to do with CPU clock speed or RAM. What are your specifications?
    – EdG
    Commented Nov 1, 2014 at 22:28
  • I just updated the question with some specs.
    – DanL4096
    Commented Nov 1, 2014 at 23:32
  • 1
    @Moab, that doesn't really make sense. The OS was using less than half of the 2 GB of RAM, and had hundreds of MB to spare even if I included caches. What I mainly saw was lots of CPU activity and disk IO.
    – DanL4096
    Commented Apr 27, 2015 at 7:41
  • 1
    When windows runs out of physical memory it uses the hard drive as memory, thus the increase of disk IO
    – Moab
    Commented May 17, 2015 at 16:41
  • 1
    As I said above, Windows was not running out of physical memory. It was not swapping - at least, not any more than the normal Windows swap load.
    – DanL4096
    Commented Jun 7, 2015 at 0:56

4 Answers 4

7
+50

Starting with Windows Vista the Updates come as difference files. So during setup, Windows need to creates the real files based on the diffs. This is CPU intensive and takes some time especially on really old CPUs like your Pentium D.

In your provided xperf file you have a high CPU usage from TrustedInstaller because it needs to create a pending.xml. This means that the updated files were in use and had to be updated during shutdown/boot which results in this dialog:

enter image description here

Here the CPU is busy writing the XML data

wcp.dll!Windows::ServicingAPI::CCSITransaction::GeneratePendingTransactionContent 

and writing data into the registry

wcp.dll!Windows::Rtl::SystemImplementation::CKey_IRtlKeyTearoff::CreateNewKey.

But the bigger issue is that you try to install 5 .Net Framework updates:

enter image description here

Now Windows is busy because the .Net optimizer service mscorsvw.exe runs to compile the updated .net files into machine code to improve performance and reduce memory usage of .net applications.

enter image description here

This is also very CPU extensive and your Intel Atom CPU N270 @ 1.60GHz is too slow.

Microsoft provided a script to speed this up.

7
  • 1
    Oh, like RPM deltas on Fedora? Interesting. That would explain the CPU usage, though not the shear length of time it takes the updates to finish installing.
    – DanL4096
    Commented Nov 3, 2014 at 16:18
  • I don't know how RPM works. In Windows this is called delta package and the dpx.dll (delta package expander) is used to create the real files. Commented Nov 3, 2014 at 16:41
  • Thanks for the analysis! For the record, I used the Atom netbook for testing purposes because I wasn't using it for anything else. However, it should be noted that the netbook came with Windows 7 preinstalled when I bought it.
    – DanL4096
    Commented Jul 20, 2015 at 16:52
  • ok. Try the provided script by Microsoft and look if this improves setup of .net updates during Windows Update. Commented Jul 20, 2015 at 17:39
  • 1
    I created a guide for DPC issues: msfn.org/board/index.php?showtopic=140263. Capture a xperf trace and run the commands to dump the statistics into the dpc.txt and look for file version in the fileversion.txt. Now look at the vendor homepage for a driver update. Commented Jul 21, 2015 at 4:04
2

To find out why your computer is taking so long install the Windows Updates, open your Start Menu and type Resource Monitor. You will be presented with a screen showing a summary of the resource use on your computer.

On the right side of the window you will notice four graphs indicating activity in the four major subsystems of your computer (CPU, Disk, Memory, and Network). What you're looking for is your computer's bottleneck, i.e. the subsystem that's holding everything else back (there's usually only one at a time).

Interpreting the graphs

Observing each graph you'll see a green shaded area and a blue line, both representing values in the Y-axis of the chart.

CPU

The blue line indicates how much of your processor's maximum frequency is in use. If the blue line is at the top of the graph, your CPU is running at 100% of its rated speed; if it's halfway up the chart, then the CPU has been throttled down 50%.

The green area shows how much (on a scale of 0-100%) of your processor's available speed your PC is using.

Your CPU is the bottleneck if the green shading fills the graph, in which case the blue line should also be at the top.

Disk

The blue line indicates how busy your disk is from 0% (idle) to 100% (working as hard as it's capable of under the circumstances). The green line indicates the total Mbps/Gbps of data is being read+written, on a scale of 0-100% of the figure shown at the top of the chart. So if the chart shows 10 Mbps and the green line is 75% of the way up, your disk is moving a painfully slow 7.5 Mbps of data.

Your disk is the bottleneck when the blue line is pegged at the top of the chart. This, by the way, is my guess as to where your bottleneck is but that's beside the point since I'm teaching you how to figure it out yourself.

Network

The network chart is like the Disk chart. The blue line shows what percent of the total bandwidth of which your network adapter is capable is in use, while the green line shows how much data is being used, again according to the scale shown.

Your network is the bottleneck if the blue and green lines are at the top of the chart.

Memory

The blue line shows what percent of your physical memory is in use while the green line shows how many hard page faults per second are occurring.

It's unlikely you'll find the blue line all of the way to the top of the graph since Windows will proactively move data from memory to the hard drive to keep some free RAM available (this is called paging). However, if a lot of RAM is in use and the hard drive is quite active then memory is probably a bottleneck. The number of pages/sec can also indicate when you're too low on RAM. If you have a consistent occurrence of hard page faults, that means Windows is hoping to find data in (fast) memory but is having to look in the pagefile on the (much slower) disk for the needed bits.


By observing Resource Monitor while your computer is working you can quickly determine what subsystem is showing things down, and therefore what upgrade would most effectively improve performance.

5
  • 2
    Thank you. I'm seeing bottlenecks with both CPU and disk, about equally. Still not sure why this is a problem though; the machine in question can install an equal "volume" of Ubuntu or Fedora updates, perhaps 300 MB or so, in less than 20 minutes.
    – DanL4096
    Commented Nov 3, 2014 at 0:31
  • FWIW I've a brand new Win 8.1 quad-core laptop with no issues: Windows Update used about 20-40% of both disk and CPU capacity [in a brief sample period] and took about 2 hours [excluding download time] to update ~60 different parts of MS Windows at ~250MB total. Meanwhile Kubuntu does the same volume of updates on a 8yo dual-core desktop in about 20-30mins. It seems far slower than it should be; perhaps it needs an option to use all available CPU as I'm guessing they throttle it back to allow other apps to run, that's the only viable reason I can see.
    – pbhj
    Commented May 24, 2015 at 19:55
  • Unfortunately (maybe) Windows Update doesn't throttle use of system resources. I can appreciate your comparison between updating Windows and Kubuntu but given we're considering two dissimilar OSes it's difficult to draw consistently helpful conclusions from such an analysis. Commented May 24, 2015 at 21:00
  • Monitoring resources is far from sufficient, while the question is very interesting. Using windows 7 in parallel with Linux on the same computer I can say that on Linux no update takes more than 30 minutes, while on Windows after four hours only two thirds of updates installation is done, and that without the installations that take place after restart. The question is: why Windows is taking SO LONG on the same resources?, just by considering the experience in itself, even without comparing it to Linux.
    – user162573
    Commented Jun 18, 2015 at 19:41
  • The reason it takes so long is because Windows Update is hitting a resource bottleneck on the machine. The point of looking at the PC's resource use is to determine which subsystem is holding the whole process back. Armed with that information you can actually do something to speed up the process. Commented Jun 18, 2015 at 19:49
-1

Looking at your specs, the machine sounds very slow, which obviously is correct in this situation.

What you can do is buy some more RAM for the machine if it will take it. The processor seems old and slow being a Pentium D, so your machine processes will take longer.

I would give more information about buying RAM, but unfortunately, that is not one of the things that happens on Super User.

1
  • 1
    The machine is not "very slow." It runs Windows 7 quite snappily... Until the update process starts, at which point it gets bogged down.
    – DanL4096
    Commented Nov 3, 2014 at 16:16
-1

You can create a Windows 7 install USB thumbdrive (or DVD but thumbdrive is faster) which includes all the patches till that date. This makes installations on older machines not take such an extraordinary amount of time. Here is one page that outlines the process. http://www.sysadminlab.net/mobile/creating-a-fully-patch-install-wim-for-windows-78-without-mdt-but-using-wsus-offline-updater

If you are going be doing a lot of these then it is worth learning to create your own installers. If not, then just live through the lengthy update this time.
You probably have a pre-Service Pack 1 media. A newer Windows 7 DVD will already be patched.

4
  • The DVD is for Windows 7 SP1.
    – DanL4096
    Commented Nov 2, 2014 at 1:30
  • Yes, and since it comes with SP1 already your updates times would be improved drastically. A definite win; you should have chosen this option. I've installed thousands of machines and specialize in slower ones. The answer you chose was esoteric and not pragmatic to solving the ultimate issue of decreasing update times. Commented Sep 8, 2015 at 22:14
  • You misunderstand my comment above. My installation DVD is the SP1 version. It has SP1 slipstreamed. The problem is, there are now 5 years worth of additional updates... Which I do not have the tools to slipstream anyway, because I mostly run Linux.
    – DanL4096
    Commented Sep 11, 2015 at 17:49
  • And you misunderstood my answer. I said to use a thumbdrive installer that INCLUDES all the 5 years of patches up to the current date. If you don't have the tools to create the installer USB then you can find someone that has already created it and d/l their version. Commented Oct 23, 2015 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .