Visual Studio CPU 高使用率 [英] Visual Studio CPU High Usage

查看:31
本文介绍了Visual Studio CPU 高使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我拥有任何 Visual Studio(2010 专业版、2012 专业版和 2015 社区版)的一周,几分钟后我开始了一个项目,甚至是空的,没有触及任何东西,启动一个线程,它完全消耗一个核心,100%用法.从任务管理器中我看到 devenv.exe 消耗了 25% 的 CPU,我有 4 个内核,所以 100/4=25.

通过使用 Process Explorer,我看到 clr.dll (clr.dll!GetCLRFunction+10793) 持续运行.

这里是线程的堆栈跟踪:

ntoskrnl.exe!KeWaitForMultipleObjects+0xc0antoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0x712ntoskrnl.exe!KeWaitForSingleObject+0x19fntoskrnl.exe!PoStartNextPowerIrp+0xba0ntoskrnl.exe!PoStartNextPowerIrp+0x183dntoskrnl.exe!IoFreeErrorLogEntry+0x297System.ni.dll+0x19ab70System.ni.dll+0x1de979System.ni.dll+0x19ab70System.ni.dll+0x199d42System.ni.dll+0x1ded86System.ni.dll+0x1de5faSystem.ni.dll+0x1de397System.ni.dll+0x1da636System.ni.dll+0x1c755eSystem.ni.dll+0x19ebfbSystem.ni.dll+0x19eccfclr.dll+0x1396clr.dll+0x291fclr.dll!PreBindAssemblyEx+0x1822cclr.dll!PreBindAssemblyEx+0x183afmscorlib.ni.dll+0x2f1213mscorlib.ni.dll+0x2f103emscorlib.ni.dll+0x2ffb72mscorlib.ni.dll+0x30a366mscorlib.ni.dll+0x2ffd30mscorlib.ni.dll+0x3aebefmscorlib.ni.dll+0x3aeabaclr.dll+0x291fclr.dll+0x9affclr.dll!PreBindAssembly+0xb165clr.dll!PreBindAssembly+0x9653clr.dll!PreBindAssembly+0x96bdclr.dll!PreBindAssembly+0x978aclr.dll!PreBindAssembly+0x9805clr.dll!PreBindAssembly+0xb0f9clr.dll!PreBindAssembly+0xa166clr.dll!GetCLRFunction+0x107dcntdll.dll!RtlInitializeExceptionChain+0x63ntdll.dll!RtlInitializeExceptionChain+0x36

有没有人从上面的几行中理解一些东西??

在 Internet 上,我发现了一些建议禁用 Visual Studio 的一个或另一个插件/扩展,但没有一个解决了问题,而且我在所有 VS 版本上都有问题(具有不同的扩展,并且发生在同时)

我认为这与我最近更新的 .net framework 4.5 ~4.6 相关.我如何理解问题出在哪里以及如何解决?

解决方案

要了解为什么 Visual Studio 会导致如此高的 CPU 使用率,您需要安装 Windows Performance Toolkit,它是 (所有其他条目都可以取消选择)

运行WPRUI.exe,选择第一级CPU 使用率,然后点击开始.捕获 1 分钟的 CPU 使用率,现在单击保存将数据保存到 ETL 文件中.

现在双击生成的 ETL 文件以在 Windows Performance Analyzer (WPA.exe) 中打开 ETL,拖放 CPU Usage (Sampled) to analysis 窗格:

现在

就我而言,Telerik 扩展会导致 Visual Studio 中的 CPU 使用率.

It's a week that I have any Visual Studio (2010 professional, 2012 professional and 2015 community edition) that, after few minutes I started a project even empty, without touching anything, start a thread that consumes entirely one core, 100% usage. From task manager I've seen that devenv.exe is consuming 25% of CPU, I have 4 cores so 100/4=25.

By using Process Explorer I've seen that is clr.dll (clr.dll!GetCLRFunction+10793) that is running continuosly.

here is the stack trace of the thread:

ntoskrnl.exe!KeWaitForMultipleObjects+0xc0a 
ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0x712
ntoskrnl.exe!KeWaitForSingleObject+0x19f
ntoskrnl.exe!PoStartNextPowerIrp+0xba0
ntoskrnl.exe!PoStartNextPowerIrp+0x183d
ntoskrnl.exe!IoFreeErrorLogEntry+0x297
System.ni.dll+0x19ab70
System.ni.dll+0x1de979
System.ni.dll+0x19ab70
System.ni.dll+0x199d42
System.ni.dll+0x1ded86
System.ni.dll+0x1de5fa
System.ni.dll+0x1de397
System.ni.dll+0x1da636
System.ni.dll+0x1c755e
System.ni.dll+0x19ebfb
System.ni.dll+0x19eccf
clr.dll+0x1396
clr.dll+0x291f
clr.dll!PreBindAssemblyEx+0x1822c
clr.dll!PreBindAssemblyEx+0x183af
mscorlib.ni.dll+0x2f1213
mscorlib.ni.dll+0x2f103e
mscorlib.ni.dll+0x2ffb72
mscorlib.ni.dll+0x30a366
mscorlib.ni.dll+0x2ffd30
mscorlib.ni.dll+0x3aebef
mscorlib.ni.dll+0x3aeaba
clr.dll+0x291f
clr.dll+0x9aff
clr.dll!PreBindAssembly+0xb165
clr.dll!PreBindAssembly+0x9653
clr.dll!PreBindAssembly+0x96bd
clr.dll!PreBindAssembly+0x978a
clr.dll!PreBindAssembly+0x9805
clr.dll!PreBindAssembly+0xb0f9
clr.dll!PreBindAssembly+0xa166
clr.dll!GetCLRFunction+0x107dc
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36

Does anyone understand something from the above lines??

On Internet I've found several suggestion to disable one or another plugin/extension of visual studio, by none of them solved the problem, and moreover I have the problem on all the VS version (with different extension and happened at the same time)

I think it's something related to the .net framework 4.5 ~4.6 that I have updated recently. How can I understand where is the problem and how to solve it?

解决方案

To see why Visual Studio causes such a high cpu usage you need to install the Windows Performance Toolkit, which is part of the Windows 10 SDK (if you use Windows 7, use the SDK Build 15086, which is the last version that works on Windows 7, for Windows 8,8.1 or Windows 10 use the WPT from latest Windows 10 SDK).

(all other entries can be unselected)

Run WPRUI.exe, select First Level, CPU Usage and click on start. Capture 1 minute of the CPU usage, now click on Save to save the data into a ETL file.

Now make a double click on the generated ETL file to open the ETL in Windows Performance Analyzer (WPA.exe), drag and drop the CPU Usage (Sampled) to analyze pane:

Now load debug symbols in WPA and expand the stack of the devenv.exe

In my case the Telerik Extension causes CPU usage inside Visual Studio.

这篇关于Visual Studio CPU 高使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆