You may have noticed that your system performance has recently taken a hit. When you visit the task manager to go to the root of the problem, you may see that the main culprit is mscorsvw.exe. Here I will tell you all about the .NET Runtime Optimization service and how you can speed it up using 2 simple methods.
What Is The .NET Runtime Optimization Service?
While many users do not notice this process running in the background at all. It is actually a component of Windows that optimizes your system to launch apps faster.
The .NET Framework is a popular choice among software developers to write and develop apps. it is so because the .NET framework contains a technology called the Native Image Generator (NGEN) that makes launching apps faster. It will also periodically optimize your machine.
How To Fix .NET Runtime Optimization Service High CPU Usage
It is ironic that an optimization service hogs up CPU resources. It slows down because it needs to recompile its libraries for optimizing the launching of applications on your system.
First and foremost, you should not try to end this task from the task manager. You should know that it is performing an important task in the background of helping your apps launch run faster. The slowing down of your system only temporary as it will return to normal after this task is finished.
However, there is something you can do to speed up the optimization service. These fixes will speed up the .NET Runtime Optimization service and help it finish its tasks faster.
# FIX 1 (Enable Multi-Core Usage)
By default, the .NET Runtime Optimization service uses only one CPU core. So, the multi-core CPU that you have is not being utilized to its full potential.
You can tell the service to utilize more than one core (Up to 6 cores) that will speed up the task it is running, and you can perform other tasks faster.
Note: Majority of the speed up occurs for the .NET Framework 4. If you only have the .NET Framework 2 or 3.5 installed, the speedup effect will be more minor.
- Open an elevated Command Prompt. To do so, open the Run dialogue by pressing Win + R, type cmd and press Ctrl + Shift + Enter to launch the command prompt with administrative privileges.
- If you have your Windows installed in the C drive, use the following commands and press Enter:
For 32-bit OS: cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
For 64-bit OS: cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
3. Type the following command next and press Enter:
4. Check if the CPU usage has gone back to normal from the Task Manager.
These commands instruct the .NET Runtime Optimization service to use all the available cores (up to 6 cores) of the CPU to finish the task quicker.
However, if you are uncomfortable running the command prompt, you can follow this next method as well.
# FIX 2 (Run The Official Script By Microsoft)
If you don’t like running the command yourself or if you have an older version of Windows, you can use the official script made by Microsoft made by them for the same thing.
1. Visit the GitHub page of the script here.
2. Right-click on the Raw button and click on Save link as.
3. Make sure that the file type is Windows Script Host file.
4. Download the file.
5. Double click and execute the file to run the script.
This will execute the multicore usage and tells the NET Runtime Optimization service to finish its task fast.
When You Can See This Service Running?
This service runs at mainly two times.
- When the .NET Framework is installed on your machine
- When the .NET Framework is serviced by Windows Update
According to the Microsoft developers, here is an excerpt:
“We try to update and optimize the .NET Framework during the night (specific to each time zone), while most people are sleeping. Sometimes, it isn’t possible to do that, particularly if a machine is turned off. As a result, the .NET Framework is sometimes updated during the day, which then requires the .NET Framework Optimization Service to run during the day, too.
When that happens, you might notice the service running and possibly slowing down your machine for a period of time.”
Many app developers have used the NET Runtime Framework to make the app launches faster. But the high CPU usage is sometimes annoying. Now you know how to re-solve the .NET Runtime Optimization service high CPU Usage using the two fixes given above. Comment below if you successfully solved this issue and discuss further the same.