[SOLVED] .Net Runtime Optimization Service: High CPU Usage Problem

The .Net Runtime Optimization Service is a component of Windows that helps your system by starting apps and programs. With .Net Runtime Optimization, apps and programs start faster than they would start without it.

It works in the background to compile .net assemblies when your computer is left idle and then uses them to start apps and programs. The executable file for this component is known as mscorsvw.exe, but you will find it in the Task Manager as .Net Optimization Service.

Normally, processes run by this component do not take long and it will not cause high CPU usage. However, if there is a problem in any of these processes CPU usage can spike and cause your computer to slow down.

If this is happening to you, this article will explain how to fix the problem.

Why do I see high CPU usage by .Net Runtime Optimization?

If you see high CPU usage by .Net Runtime Optimization it means that it is struggling to perform one of its processes.

.Net Runtime will cause high CPU usage when your computer is idle if it is faulty. This usually happens for the following reasons:

  • Viruses are affecting the way that it performs
  • .Net Runtime Optimization has been corrupted
  • The settings are wrong on your computer
  • There is a bug on your computer
  • .Net Runtime optimization is not optimized and needs to be speeded up using some commands
  • Nvidia Telemetry Container is causing an issue. This only applies if you are using an Nvidia GPU on your computer

What do I do?

There are a number of things that you should do to repair .Net Runtime Optimization if it is causing high CPU usage.

Option #1: Run a virus scan

Viruses and malware can affect the way that .Net Optimization performs. .Net Runtime Optimization high CPU usage issue is not that common. Malware is a common reason for problems that occur with it. Some types of malware disguise themselves as .Net Runtime Optimization.

If you have your own antivirus installed on your computer and you are familiar with the process then use it to run a virus scan and see what the results are.

Running a virus scan on Windows 10

Windows 10 should constantly be scanning your computer for viruses and malware by default. You can manually perform a scan to make sure.

  1. Type Windows Security into the search bar and click on the Windows Security shortcut
  2. Click on Virus and Threat Protection
  3. Click on Quick Scan
  4. Your computer will automatically perform a scan
  5. If your computer finds any viruses or malware it will notify you
  6. Follow the prompts to remove any viruses or malware

Note: Windows Security can also be found in Settings > Update and Security > Windows Security

After you have finished scanning for viruses it’s best to restart your computer.

You should leave it for some time to see if .Net Runtime Optimization is able to finish the process it was performing before. Leave it for fifteen minutes. If the optimization service is still causing high CPU usage after this time, it is likely that there is still a problem.

Option #2: Optimize .Net Runtime using the Command Prompt

It may be that .Net Runtime Optimization needs to be optimized itself. It’s designed to run using one CPU core, but you can speed it up by getting it to use multiple cores.

How to optimize .Net Runtime Optimization…

Open Command Prompt

  1. Search for Command Prompt in the search bar
  2. Right-click on it and choose Run as Administrator
  3. Minimize the Command Prompt window

Find out if you have a 32 bit or a 64-bit operating system

  1. Search for File Explorer in the search bar
  2. Right-click on My Computer
  3. Go to Properties
  4. Under System Type, you will be able to see if you have a 32 bit or a 64-bit operating system

If you have a 32-bit operating system

  1. Return to Command prompt
  2. Type the following command and hit enter: ‘cd C:WindowsMicrosoft.NETFrameworkv4.0.30319’. Alternatively, you can try ‘cd c windows microsoft.net framework v4.0.30319’
  3. Type this command and press enter: ‘ngen.exe executequeueditems’
  4. Leave the process to finish by itself

Restart your computer and see if .Net Runtime Optimization is working properly again. Allow your computer to run for some time to see if the .Net Runtime Optimization Service high CPU usage returns to normal.

If you have a 64-bit operating system

  1. Return to Command Prompt
  2. Type the following command and hit enter: ‘cd c:WindowsMicrosoft.NETFramework64v4.0.30319’. Alternatively, you can try ‘cd c windows microsoft.net framework64 v4.0.30319’
  3. Type this command and press enter: ‘ngen.exe executequeueditems’
  4. Leave the process to finish by itself

Restart your computer and see if .Net Runtime Optimization is working again. Again, allow your computer to run for some time to see if the .Net Runtime CPU usage returns to normal.

Option #3: Perform a clean boot

Performing a clean boot of your system can repair .Net Runtime Optimization. This will resolve the issue if another application is causing .Net Runtime Optimization to use CPU resources at an increased level.

A clean boot will run your system using only Windows programs and other components essential to the operation of the system. .Net Runtime Optimization is one of those components. Allowing it to run in a clean boot without interference may allow it to clear whatever process it was struggling with and return to normal.

  1. Press the Windows key + R to open the Run dialog box
  2. Type ‘msconfig’ and click OK
  3. Go to Services and check the tick box for Hide all Microsoft Services
  4. Press the Disable All button
  5. Go to the Startup tab
  6. Open Task Manager
  7. Select all the services you wish to disable. These will not be started next time you start your computer
  8. Restart your computer

You should allow your computer to operate for some time after you have started up. Hopefully, .Net Runtime Optimization will be able to clear the process it was struggling with and CPU usage will fall. Remember to return your settings to normal after you have finished this process.

Option #4: Restart your Nvidia Telemetry service

If you are using an Nvidia Telemetry service, restarting it can resolve a high CPU usage issue. This will also restart the last optimization service that .Net Runtime Optimization was trying to perform but might act as a solution.

  1. Open the Run dialog box by pressing the Windows key + R
  2. Type the following command: ‘services.msc’
  3. Click OK
  4. Find Nvidia Telemetry Container on the list
  5. Right-click on it and go to properties
  6. You will be able to see if it is running
  7. If it is, click Stop
  8. Click Start to restart it
  9. Also, make sure that Startup Type is set to Automatic in the drop-down window above

Allow some time and see if the Runtime Optimization is still causing high CPU usage. You can check in the Task Manager to see if this is the case. Open Task Manager and go to Processes. You will be able to see if any applications are causing high CPU usage.

Option #5: Disable .Net Runtime Optimization

As a last resort, you can disable .Net Runtime Optimization. This may cause an issue of its own or your computer may just not run at its optimum level without .Net Runtime Optimization.

Taking this step will resolve the Runtime Optimization service’s high CPU usage. This will allow you to use your computer again in the short term if this is proving difficult. In the long term though, you should try to repair .Net Runtime Optimization.

  1. Press the Windows key + R to open the Run dialog box
  2. Type ‘services.msc’ and click OK
  3. Go to Microsoft.NET Framework NGEN
  4. Select properties and go to the General tab
  5. Go to the drop-down menu next to Startup Type
  6. Select Disabled
  7. Hit enter

This will stop the .Net Runtime Optimization Service from operating. Go to the Task Manager and look at the Processes tab. .Net Runtime Optimization service high CPU usage should now not be an issue. You will be able to carry on with most processes, but you should try to get .Net Runtime Optimization up and running again as soon as you can.

We hope that the fixes in this article have been able to solve your .Net Runtime Optimization Service high CPU usage issue. If you find that the problem recurs, come back and try our other fixes to see if they resolve the issue.