您可能经常会遇到占用异常数量的系统资源的应用程序或后台系统进程。(background system process)进程的高系统资源使用会极大地减慢系统的其他操作,并使您的 PC 变得一团糟。它也可能导致它完全崩溃。我们已经在我们的网站上介绍了过多的进程和高CPU 使用率(CPU usage)问题。此外,今天,我们将讨论偶尔出现的 .NET运行时优化服务(Runtime Optimization service)高CPU 使用率(CPU usage)问题以及如何将其恢复到可接受的水平。
如何修复 .NET 运行时优化服务在 Windows 10 上的高 CPU 使用率(How to Fix .NET Runtime Optimization Service High CPU Usage on Windows 10)
您可能知道,Microsoft和其他第三方使用此.NET 框架(.NET framework)来开发和运行 Windows 应用程序(for developing and running Windows applications)等。该服务的可执行文件名为mscorsvw.exe,是官方的Windows 组件(Windows component),执行优化.NET 框架的任务,(.NET framework)即预(viz pre)编译和重新编译 .NET 库。这有助于应用程序和程序更快地启动。优化服务(optimization service)设计为在您的PC 闲置 5-10 分钟后在后台运行。( designed to run in the background)
为什么 .NET 运行时优化服务会导致 CPU 使用率高?(Why .NET Runtime Optimization Service Results in High CPU Usage?)
有时,该服务可能需要比平时更长的时间来重新编译 .NET 库。这导致
- 您的PC 服务(PC service)运行速度比平时慢。
- 计算机中的故障实例。
- 服务渲染损坏。
- 恶意软件对系统资源的利用。
考虑到该服务对个别应用性能(app performance)的影响,不建议一见不慎立即终止。如果服务似乎需要很长时间才能完成其操作,您可以选择通过执行一些命令或脚本来加快速度。其他修复包括扫描计算机以查找恶意软件和病毒(malware and viruses)、重新启动服务以及执行干净启动,如下一部分所述。
方法 1:执行 PC 的干净启动
(Method 1: Perform Clean Boot of PC
)
该服务很可能很难为特定的第三方应用程序重新编译库,因此要消耗更多的 CPU 功率来完成任务。您可以执行干净启动,其中仅加载必要的驱动程序和启动程序,以检查它是否确实是提示.NET 运行时优化服务的高(.NET Runtime Optimization service)CPU 使用率(CPU usage)问题的第三方程序之一。执行Windows 10干净启动的步骤如下:
1. 同时按Windows + R keys启动运行(Run)对话框。
2.输入msconfig并按Enter键打开System Configuration。
3. 转到服务(Services )选项卡并选中标记为隐藏所有 Microsoft 服务(Hide all Microsoft services)的框。
4. 然后,单击“全部禁用”(Disable All)按钮,突出显示。它将停止所有第三方和不必要的服务在后台运行。
5. 单击Apply > OK按钮保存更改。
6. 会出现一个弹窗,询问是要重启(Restart )还是不重启就退出(Exit without restart ),如图。选择退出而不重新启动(Exit without restart )选项。
7. 再次通过重复步骤 1-2启动(Steps 1-2.)系统配置(System Configuration)窗口。切换到启动(Startup )选项卡。
8. 单击打开任务管理器(Open Task Manager)超链接,如图所示。
注意:(Note: )检查所有列出的应用程序/进程的启动影响(Startup impact)列,并禁用具有高启动影响(High Startup impact)的那些。
9. 右键单击应用程序( application)(例如Steam)并选择禁用(Disable )选项,如下图所示。
10. 最后,关闭(close)所有活动的应用程序窗口并重新启动(restart) 您的 PC(your PC)。它将以干净启动状态启动(boot state)。
11. 现在,在任务管理器中检查(Task Manager).NET 运行时服务(.NET Runtime service) CPU 使用率(CPU usage)。如果正常,请一次启用一个第三方程序( enable third-party programs one at a time)来锁定罪魁祸首应用程序(culprit application)并卸载它(uninstall it),以避免将来出现此类问题。
另请阅读:(Also Read:)如何修复 hkcmd 高 CPU 使用率
方法 2:提升 .NET Framework 进程(Method 2: Boost .NET Framework Processes)
由于终止此服务不是一种选择,因此您可以通过允许它使用额外的CPU内核来稍微提升此服务。默认情况下,该服务仅使用一个核心。
- 您可以自己执行几个命令
- 或者直接从GitHub下载官方的Microsoft 脚本(Microsoft script)并运行它。
选项 I:通过命令提示符(Option I: Via Command Prompt)
1. 点击开始(Start),输入命令提示符(Command Prompt)并点击以管理员身份运行(Run as administrator),如图所示。
2. 键入给定的命令并按(command and press)Enter 键(key)执行。
注意:(Note:)需要执行的命令因系统架构(system architecture)而异。
-
对于 32 位系统:(For 32-bit systems: )cd c:\Windows\Microsoft.NET\Framework\v4.0.30319
-
对于 64 位系统:(For 64-bit systems: )cd c:\Windows\Microsoft.NET\Framework64\v4.0.30319
3. 接下来,执行ngen.exe executequeueditems,如下图所示。
专业提示:确定 Windows PC 是 32 位还是 64 位
(Pro Tip: Determine if Windows PC is 32-bit & 64-bit
)
如果您不确定您的系统架构(system architecture),只需按照给定的步骤操作:
1.同时按Windows + R keys打开运行(Run)对话框。
2.输入msinfo32并点击OK打开系统信息(System Information )窗口。
3. 在这里,检查系统类型(System Type)标签以检查是否相同。
另请阅读:(Also Read:)什么是 HKEY_LOCAL_MACHINE?
选项二:通过 GitHub 脚本(Option II: Via GitHub Script)
1. 前往脚本的(script)GitHub页面。
2. 右键单击 Raw按钮并选择Save link as…选项,如图所示。
3. 将保存类型(Save as type)更改为Windows 脚本文件(Windows Script File),然后单击保存(Save)。
4. 下载后,使用Windows Script Host(Windows Script Host)打开文件。
另请阅读:(Also Read: )修复 DISM 主机服务进程 CPU 使用率过高(Fix DISM Host Servicing Process High CPU Usage)
方法三:重启 .NET 运行时优化服务(Method 3: Restart .NET Runtime Optimization Service)
服务通常会出现故障,然后表现出奇怪的行为,例如使用不必要的大量系统资源或长时间保持活动状态。由于当前Windows 操作系统版本(Windows OS build)中存在的错误,可能会发生故障实例。下面介绍如何通过重启服务来解决.NET运行时优化服务(optimization service)CPU 使用率(CPU usage)过高的问题:
注意(Note):此解决方案仅适用于具有专用 NVIDIA 驱动显卡的系统。
1. 同时按Windows + R 键(keys)启动运行(Run)对话框。
2.输入services.msc并点击OK打开服务(Services)应用程序。
3.滚动(Scroll)列表并找到NVIDIA Telemetry Container服务。
4. 右键单击它并从上下文菜单中选择属性,如图所示。(Properties )
5. 首先点击停止(Stop )按钮。等待(Wait)Service Status显示 Stopped(Stopped),然后单击Start按钮使其再次运行。
6. 确保启动类型:( Startup type:)设置为自动(Automatic)。
7. 服务重新启动后,单击Apply > OK 以保存更改并关闭属性(Properties)窗口。
8. 同时按Ctrl + Shift + Esc keys 打开任务管理器(Task Manager ),检查服务是否仍然占用高CPU资源。
另请阅读:(Also Read:)什么是Google Chrome 提升服务(Google Chrome Elevation Service)
方法 4:检测和删除恶意软件(Method 4: Detect & Remove Malware)
如果服务异常消耗CPU持续存在,请运行病毒/恶意软件扫描以排除感染的可能性。如果您不小心,恶意应用程序可能会潜入您的 PC。这些程序会伪装自己,伪装成官方的Windows组件,并导致CPU 使用率(CPU usage)过高等问题。您可以使用本机Windows Defender扫描您的 PC,也可以使用任何其他派上用场的专用安全程序。请按照以下步骤通过从您的 PC 中删除恶意软件来修复.NET运行时优化服务(optimization service)高CPU 使用率(CPU usage)问题:
1.同时按Windows + I keys打开设置(Settings)。
2. 在这里,点击更新和安全(Update & Security),如图所示。
3. 转到Windows 安全(Windows Security)菜单并单击病毒和威胁防护(Virus & threat protection)
4. 单击快速扫描(Quick scan )以扫描您的 PC 以检查是否存在任何恶意软件。
5. 如果发现任何恶意软件,请单击开始操作(Start actions)以删除(remove)或阻止(block)它们并重新启动您的 PC。
推荐的:(Recommended:)
- 修复触摸板滚动在(Fix Touchpad Scroll)Windows 10上不起作用
- 如何在Windows 10中更改(Windows 10)启动程序(Startup Programs)
- 如何在Windows 10中将(Windows 10)麦克风静音(Microphone)
- 修复计算机不断崩溃(Fix Computer Keeps Crashing)的7种方法(Ways)
希望上述解决方案之一已修复。NET 运行时优化服务(NET runtime optimization service high CPU)在您的 PC 上出现高 CPU 问题。如果以后同样的问题再次困扰您,请检查可用的Windows 更新(Windows update)或重新安装最新版本的.NET 框架(.NET framework)。此外,如果您对本文有任何疑问/建议,请随时将它们放在评论部分。
Fix .NET Runtime Optimization Service High CPU Usage
You maу often, come acrosѕ an application or a background system process hogging an abnormal amount of system resoυrces. The high system resource usage of a process can tremendously slow down other operations of the system and can turn your PC into a laggу mess. It may also cause it to crash entirеly. We have already covered a plethora of proсesses and high CPU usage iѕsues on our website. In addition, today, we will be diѕcussing thе оccasional .NET Runtime Optimization service high CPU usage problem and how to bring it back to an acceptable level.
How to Fix .NET Runtime Optimization Service High CPU Usage on Windows 10
As you might be aware, this .NET framework is used by Microsoft and other third parties for developing and running Windows applications among other things. The executable file for this service, named mscorsvw.exe, is an official Windows component and performs the task of optimizing .NET framework viz pre and re-compiling .NET libraries. This helps applications and programs launch faster. The optimization service is designed to run in the background when your PC is sitting idle for a brief period of 5-10 minutes.
Why .NET Runtime Optimization Service Results in High CPU Usage?
Sometimes the service can take longer than usual to re-compile .NET libraries. This results in
- Your PC service running slower than usual.
- Glitch instances in your computer.
- The service rendering corrupt.
- Utilization of system resources by malware.
Considering the impact of this service on individual app performance, its immediate termination at the first sight of mischief is not recommended. If the service seems to be taking too long to finish its operation, you have the option to speed things up by executing a few commands or a script. Other fixes include scanning the computer for malware and viruses, restarting the service, and performing a clean boot, as explained in the next segment.
Method 1: Perform Clean Boot of PC
It is quite possible that the service is having a hard time recompiling the libraries for a particular third-party application and is therefore, consuming more CPU power to finish the task. You can perform a clean boot wherein only essential drivers and startup programs are loaded, to examine if it is indeed one of the third-party programs prompting the high CPU usage issue for the .NET Runtime Optimization service. The steps to perform Windows 10 clean boot are as follows:
1. Press Windows + R keys simultaneously to launch Run dialog box.
2. Type msconfig and hit the Enter key to open System Configuration.
3. Go to the Services tab and check the box marked Hide all Microsoft services.
4. Then, click on the Disable All button, shown highlighted. It will stop all the third-party and unnecessary services from running in the background.
5. Save the changes by clicking on Apply > OK buttons.
6. A pop-up enquiring whether you would like to Restart or Exit without restart will appear, as shown. choose the Exit without restart option.
7. Again, launch the System Configuration window by repeating Steps 1-2. Switch to the Startup tab.
8. Click on the Open Task Manager hyperlink, as shown.
Note: Check the Startup impact column for all the listed applications/processes and disable those with a High Startup impact.
9. Right-click on the application (e.g. Steam) and choose Disable option, as depicted below.
10. Finally, close down all the active application windows and restart your PC. It will start in a clean boot state.
11. Now, check the .NET Runtime service CPU usage in the Task Manager. If it is normal, enable third-party programs one at a time to pin down the culprit application and uninstall it to avoid such issues in the future.
Also Read: How to Fix hkcmd High CPU Usage
Method 2: Boost .NET Framework Processes
Since terminating this service is not an option, you can instead give this service a little boost by allowing it to use additional CPU cores. By default, the service only uses one core.
- You can either execute a couple of commands yourself
- or simply download an official Microsoft script from GitHub and run it.
Option I: Via Command Prompt
1. Click on Start, type Command Prompt and click Run as administrator, as shown.
2. Type the given command and press the Enter key to execute.
Note: The commands that need to be executed differ based on system architecture.
-
For 32-bit systems: cd c:\Windows\Microsoft.NET\Framework\v4.0.30319
-
For 64-bit systems: cd c:\Windows\Microsoft.NET\Framework64\v4.0.30319
3. Next, execute ngen.exe executequeueditems, as depicted below.
Pro Tip: Determine if Windows PC is 32-bit & 64-bit
If you are not sure about your system architecture, simply follow the given steps:
1. Hit Windows + R keys together to open Run dialog box.
2. Type msinfo32 and click on OK to open System Information window.
3. Here, check the System Type label to check for the same.
Also Read: What is HKEY_LOCAL_MACHINE?
Option II: Via GitHub Script
1. Go to the GitHub page for the script.
2. Right-click on the Raw button and choose the Save link as… option, as shown.
3. Change the Save as type to Windows Script File and click on Save.
4. Once downloaded, open the file with Windows Script Host.
Also Read: Fix DISM Host Servicing Process High CPU Usage
Method 3: Restart .NET Runtime Optimization Service
Services can often glitch and then, exhibit strange behavior such as utilizing unnecessarily high amounts of system resources or staying active for a prolonged period of time. The glitched instance can happen due to the bugs present in the current Windows OS build. Here’s how to solve .NET runtime optimization service high CPU usage by restarting the service:
Note: This solution only works for systems with a dedicated NVIDIA-powered graphics card.
1. Press Windows + R keys simultaneously to launch Run dialog box.
2. Type services.msc and click on OK to open Services application.
3. Scroll through the list and locate the NVIDIA Telemetry Container service.
4. Right-click on it and choose Properties from the context menu, as shown.
5. Click on the Stop button first. Wait for the Service Status to read Stopped, and then click on the Start button to get it going again.
6. Make sure the Startup type: is set to Automatic.
7. Once the service restarts, click on Apply > OK to save the changes and close the Properties window.
8. Press Ctrl + Shift + Esc keys together to open Task Manager and check if the service still utilizes high CPU resources.
Also Read: What is Google Chrome Elevation Service
Method 4: Detect & Remove Malware
If the service abnormal consumption of CPU persists, run a virus/malware scan to rule out the possibility of infections. Malicious applications can sneak onto your PC if you are not careful. These programs will disguise themselves and pretend to be official Windows components, and cause several issues such as high CPU usage. You can employ the native Windows Defender to scan your PC or you can use any other specialized security programs that come in handy. Follow these steps to fix .NET runtime optimization service high CPU usage issue by removing the malware from your PC:
1. Hit Windows + I keys simultaneously to open Settings.
2. Here, click on Update & Security, as shown.
3. Go to the Windows Security menu and click on Virus & threat protection
4. Click Quick scan to scan your PC to check if there is any malware present or not.
5. If there is any malware found then, click on Start actions to remove or block them and restart your PC.
Recommended:
Hopefully, one of the above solutions has fixed .NET runtime optimization service high CPU issue on your PC. If the same issue comes back to haunt you later, check for available Windows update or reinstall the latest version of .NET framework. Also, if you have any queries/suggestions regarding this article, then feel free to drop them in the comments section.