Fix: High CPU Usage by .NET Runtime Optimization Service (2024)

This problem usually appears randomly but it can also occur after an update is installed to .NET Framework. The process’s executable is mscorsvw.exe and it will be displayed in Task Manager under that name or as .NET Runtime Optimization Service. It doesn’t run so often and it’s a service that runs to optimize .NET Framework which, in return, makes sure apps and programs dependent on it run faster.

Fix: High CPU Usage by .NET Runtime Optimization Service (1)

However, this optimization sometimes takes way too long and users have reported that it consumes a large percentage of CPU resources each time it runs. It also goes on for a couple of days. Follow the methods we have prepared below in order to try to resolve this problem.

What Causes the .NET Runtime Optimization Service High CPU Usage?

The official answer is that the process needs to recompile its libraries and that it should only run when the computer is idle. Microsoft also states that the process shouldn’t take more than a couple of minutes. However, that is not the case and people find themselves waiting more than a week without progress. Here are some causes:

  • It’s generally running slow and you can try to speed it up by running certain commands.
  • There might be malware running on your computer which either camouflaged itself as the service or the service has been infected. Try running a malware scanner. In some cases, if there is malware, the AntiMalware service might also be consuming high resources.
  • The service may have gone corrupt and you should try restarting it.

Solution 1: Optimizing the process

It’s not recommended to end this process immediately as it will actually help your computer and the way apps and games are run. However, there are various ways you can speed up the process simply by running this helpful command or by running a script for the same effect. This should enable the process to use more CPU cores which will enable it to finish running more quickly. Check it out below!

  1. Search for “Command Prompt” either right in the Start menu or by tapping the search button right next to it. Right-click on the first result which appears at the top and select the “Run as administrator” option.
Fix: High CPU Usage by .NET Runtime Optimization Service (2)
  1. Users who are using an older version of Windows can use the Windows Logo Key + R key combination in order to bring up the Run dialog box. Type in “cmd” in the box and use the Ctrl + Shift + Enter key combination in order to run Command Prompt as an administrator.
  2. Copy and paste the commands shown below and make sure you click the Enter key on your keyboard after each one. Among the first two commands, choose the one according to your operating system (32-bit for the first one and 64-bit for the second one).
cd c:\Windows\Microsoft.NET\Framework\v4.0.30319 cd c:\Windows\Microsoft.NET\Framework64\v4.0.30319ngen.exe executequeueditems
  1. Check to see if the CPU usage of the .NET Runtime Optimization Service has gone back to normal!

Alternative: If you feel uncomfortable running commands by yourself or if you are using an older version of the Windows operating system, you can use the official script made by Microsoft which should do the same thing.

  1. Visit this link in order to open the GitHub page of the script. Navigate down to the code, right-click the Raw button and choose the Save link as… Make sure the file type is Windows Script File (*.wsf).
Fix: High CPU Usage by .NET Runtime Optimization Service (3)
  1. Locate the file right where you have saved it and double-click to run it. If you are confronted with a choice to choose the program to run it with, select Windows Script Host.
  2. Check to see if the problem is resolved now.

Solution 2: Scan Your Computer for Malware

Even though this sounds over the top, malware infections are one of the leading causes of this problem and it’s vital you check your computer for malware. Malicious programs would want to get a hold of your resources and they usually name their processes as something which would resemble files on your computer.

Here, we will show you how to scan your PC with Malwarebytes as it often shows the best results considering the fact that it really has a vast database. Good luck!

  1. Malwarebytes Anti-Malware is an amazing anti-malware tool with a free version you can download from their official website. Hopefully, you won’t need the full suite after you solve this issue (unless you want to buy it and have it ready for other problems) so make sure you download the trial version by clicking here.
Fix: High CPU Usage by .NET Runtime Optimization Service (4)
  1. Locate the executable file you just downloaded from their website in the Downloads folder on your PC and double-click on it in order to open it on your computer.
  2. Select where you want to install Malwarebytes and follow the installation instructions which will appear on the screen in order to complete the installation process.
Fix: High CPU Usage by .NET Runtime Optimization Service (5)
  1. Open Malwarebytes by locating it in the Start menu or on your Desktop­ and select the Scan option available at the home screen of the application.
  2. The tool will probably launch its updating process in order to update its virus database and then it will proceed with the scan. Please be patient until the process finishes which might definitely take a while. If malware is detected on your computer, confirm to have it deleted or quarantined.
Fix: High CPU Usage by .NET Runtime Optimization Service (6)
  1. Restart your computer after the scanning process is over and check to see if you still experience issues with the .NET Runtime Optimization Service!

Note: You should also use other security scanners if you can tell the type of malware you have on your computer (ransomware, junkware, etc.). Apart from that, a single scanner will never be able to recognize and delete all types of malware so we suggest you try other ones as well!

Solution 3: Restarting the Service

Restarting the service will restart the whole process as well but it should complete more quickly this time, especially if a bug was causing it to misbehave. Check it out below.

  1. Open the Run utility by using the Windows Key + R key combination on your keyboard (press these keys at the same time. Type “services.msc” in the newly opened box without the quotation marks and click OK in order to open the Services tool.
    Fix: High CPU Usage by .NET Runtime Optimization Service (7)
  1. Locate the NVIDIA Telemetry Container service on the list, right-click on it and select Properties from the context menu which appears.
  2. If the service is started (you can check that just next to the Service status message), you should stop it by clicking the Stop button in the middle of the window. Anyway, run it again by clicking the Start
Fix: High CPU Usage by .NET Runtime Optimization Service (8)
  1. Make sure that the option under the Startup type menu in the service’s properties window is set to Automatic before you proceed with other steps. Confirm any dialogue boxes which may appear when changing the startup type.

You may receive the following error message when you click on Start:

“Windows could not start the service on Local Computer. Error 1079: The account specified for this service differs from the account specified for other services running in the same process.”

If this happens, follow the instructions below to fix it.

  1. Follow the steps 1-3 from the instructions above in order to open the service’s properties window. Navigate to the Log On tab and click on the Browse… button.
Fix: High CPU Usage by .NET Runtime Optimization Service (9)
  1. Under the “Enter the object name to select” entry box, type in your account’s name, click on Check Names and wait for the name to become available.
  2. Click OK when you are finished and type in the password in the Password box if you are prompted. It should now start without issues!

Solution 4: Performing a Clean Boot

In some cases, a third-party app might be causing the high CPU usage due to required optimization. Therefore, in this step, we will be performing a clean boot to check if there is any third-party influence on the service. Follow our clean boot guide to initiate a clean boot and then check if the CPU usage is as high as it was before. If it wasn’t, it means that there was a third-party app that was causing this issue. Now you can easily troubleshoot the culprit behind this issue by enabling the apps one by one.

By Kevin ArrowsUpdated on November 20, 2022

Kevin is a certified Network Engineer

Fix: High CPU Usage by .NET Runtime Optimization Service (2024)
Top Articles
Latest Posts
Article information

Author: Corie Satterfield

Last Updated:

Views: 6386

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Corie Satterfield

Birthday: 1992-08-19

Address: 850 Benjamin Bridge, Dickinsonchester, CO 68572-0542

Phone: +26813599986666

Job: Sales Manager

Hobby: Table tennis, Soapmaking, Flower arranging, amateur radio, Rock climbing, scrapbook, Horseback riding

Introduction: My name is Corie Satterfield, I am a fancy, perfect, spotless, quaint, fantastic, funny, lucky person who loves writing and wants to share my knowledge and understanding with you.