Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Server 2008 R2 Terminal Server that's just been kinda sitting around for the last three months with very, very low usage (perhaps 1 user for an hour, once a day).

All of a sudden, for no reason I can fathom, mscorsvw.exe (.NET Runtime Optimisation Service) has started consuming 100% of one processor, causing all sorts of alarms and triggers to go off. It's a repetative pattern, so it's quite predictable to tell when it's going to happen next:

Processor spikes caused by .net optimiser

Does anyone know what might cause this? I have done the obvious (re-started the server), but apart from that I'm SOL.

The only thing I can think of that might be relevant is I approved a half-dozen Windows Updates this morning via WSUS, but they are not due to be installed until 2am tomorrow morning (some of them were related to .NET 4 security).

Nobody is logged onto the server (except me), and even if they were, we don't have any .NET apps that are used on there.

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

mscorsvw is a process that pre-compiles .NET binaries. Your updates may have triggered this activity. At least, that's what http://blogs.msdn.com/b/davidnotario/archive/2005/04/27/412838.aspx says is happening.

You might get more clue what exactly is happening if you can run the sysinternals procmon utility. That will tell you what file(s) mscorsvw is hitting or focusing on, and help determine if it is actually focusing on potential .NET files.

From that website, if this is what's happening, running

ngen.exe executequeueditems

should "clear out the queue" by having it run everything at once instead of waiting for the CPU to become idle, as it appears is when this is happening on your server. Once it is done with the pre-compiling, it should stop happening.

share|improve this answer
    
Ugh, you're quite right. I totally forgot that that TS is set to a totally different timezone, where it IS 2am, hence the updates. And the behaviour it describes is exactly what I'm seeing, so that makes a lot of sense. Thanks. –  Mark Henderson Jun 17 '11 at 1:29
    
No problem. I've run into that mscorsvw bugger before and that's why I suspected this was what was happening to you...I scratched my head awhile trying to figure out what that thing was doing :-) –  Bart Silverstrim Jun 17 '11 at 1:31
    
I'm gunna flush that queue because the constant alerts is driving me nuts –  Mark Henderson Jun 17 '11 at 1:33
    
My problem is related sql 2012, see here: dba.stackexchange.com/questions/30448/… –  Alexandre Jun 5 '13 at 14:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.