Recently I had a problem on a Windows 2012R2 server running SQL Server 2016 and the synchronization service from the domain to the Microsoft Azure service. The server generated an extremely high CPU load from one day to the next. Even restarting the services or the server did not bring any improvement here.
After a quick look at the running processes I found that NET Runtime Optimization Service or the file Mscorsvw.exe created a permanent CPU load on the machine. The whole thing can be fixed quite easily by running the following command as an administrator:
Attention, the whole thing takes a few minutes, after running through the CPU load on the server is normal again, the NET Runtime Optimization Service no longer generates a high CPU load. More about the ngen.exe you can read at Microsoft, as well as all parameters and their meaning.
Recently someone asked me that in an RDP session on a Windows server…