Windows *: mscorsvw.exe high CPU usage

Another .NET update later, an hour spent looking this up. Why is mscorsvw.exe using 25% CPU for >30 minutes?

Here’s a short outliner on how to speed it up:

The scripts we’ve provided are a convenience for people who don’t want to deal with a command prompt. If you prefer to use the command prompt, you can use the commands below instead. These commands depend on the version of the .NET Framework you have installed and the version of Windows that you have and whether it’s 32-bit or 64-bit.

  • .NET 4, 4.5, or 4.5.1 Preview on Windows 7 or earlier:c:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe executeQueuedItems

    On a 64-bit operating system, add:

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe executeQueuedItems

  • .NET 4, 4.5, or 4.5.1 Preview on Windows 8 or 8.1 Preview:c:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe executeQueuedItems
    schTasks /run /Tn “\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319”

    On a 64-bit operating system, add:

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe executeQueuedItems
    schTasks /run /Tn “\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64”

  • If you don’t have .NET 4 or later installed, but you do have .NET 2.0 or 3.5, use this command instead:c:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe executeQueuedItems

    On a 64-bit operating system, add:

    c:\Windows\Microsoft.NET\Framework64\v2.0.50727\ngen.exe executeQueuedItems

These commands assume that Windows is installed on the C drive. If that’s not the case, you can change the drive letter, or use the %windir% environment variable (ex: %windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe executeQueuedItems)

Windows Server 2008

Well, as it is Saturday and I’m having lots of time (whereas I’d usually spend it working), I thought I’d give Windows Server 2008 a try. What interested me most, is the Windows Server 2008 Server Core Installations, as it’s supposed to lower the security risk (as there is *no* Internet Explorer, no Explorer nothing running by default, only a simply cmd.exe).

As one of my co-workers requested me to upload the Standard/Enterprise/Datacenter DVD (which he got through our Microsoft Select 6.0(?) agreement) to our ISO’ VMFS, I had the DVD already at hand. As for that, I *really* love the feature set of VMware.

Deploying a new VM (even if you have to reinstall it) is quite fast (took me about 20 minutes, which I used to get some breakfast – it was only 6:30am). That’s about when I figured, how damn greedy Windows Server 2008 is. 16GiB hard disk as default installation and 2GiB RAM for a simple server ? Damn.