Thursday, July 22, 2010

What is mscorsvw.exe and why is it eating up my CPU? What is this new CLR Optimization Service?

SkyHi @ Thursday, July 22, 2010

Short version:


mscorsvw.exe is precompiling .NET assemblies in the background. Once it's done, it will go away. Typically, after you install the .NET Redist, it will be done with the high priority assemblies in 5 to 10 minutes and then will wait until your computer is idle to process the low priority assemblies. Once it does that it will shutdown and you won't see mscorsvw.exe. One important thing is that while you may see 100% CPU usage, the compilation happens in a process with low priority, so it tries not to steal the CPU for other stuff you are doing. Once everything is compiled, assemblies will now be able to share pages across different processes and warm start up will be typically much faster, so we're not throwing away your cycles.


If you are really want to get rid of mscorsvw.exe from your task manager, just do:


ngen.exe executequeueditems


which will drain all the queued up work.


REFERENCES

http://blogs.msdn.com/b/davidnotario/archive/2005/04/27/412838.aspx