Process Explorer
- Process Explorer是一款Microsoft Sysinternals工具,通过配置正确的Symbols,检查对应应用程序的线程调用的Call Stack,用以定位可能的问题驱动。下载Process Explorer工具链接如下。
- Process Explorer
- 如下是Process Explorer工具使用页面。
性能监视器
- 性能监视器(Performance Monitor)是Microsoft专业收集各个组件性能计数器的工具。对于系统CPU资源消耗,有多个Counter来检查。通过单击 开始 > 运行 > perfmon,打开性能监视器。
- Performance有如下三个核心参数。其中
\Processor(_Total)\% Processor Time
是\Processor(*)\% User Time
与\Processor(*)\% Privileged Time
之和。\Processor(_Total)\% Processor Time
\Processor(*)\% User Time
\Processor(*)\% Privileged Time
\Processor(*)\% Privileged Time
是应用程序在内核中执行系统调用(例如驱动、IRP,上下文切换等)操作的时间。如果操作系统花费多余30%的时间在Privileged Time
,如下图所示,则说明实例正在进行高I/O吞吐相关的操作。- 当
% Privileged Time
很高时,需要进一步检查% DPC Time
、% Interrupt Time
以及Context Switches/sec
的情况。- 高
% DPC Time
、% Interrupt Time
意味着未知设备出现大量的操作或者很差的性能问题,请参考如下文档。- Choose Your Own Adventure: High Deferred Procedure Calls (DPCs) or High Interrupts
- 高
Context Switches/sec
意味着有大量的线程处于Ready状态,需要减少线程的数量解决问题。
- 高
% DPC Time
、% Interrupt Time
很高时,需使用Microsoft Xperf工具进一步分析,请参考如下文档使用XPerf工具。- Windows IT Pro Magazine: Examining xPerf
- Context Switch值很高时,请参考如下文档。
- The Case of the 2 Million Context Switches
- Mark Russinovich’s The Case of the System Process CPU Spikes
\Processor(*)\% User Time
表示处理器用于执行程序代码的时间消耗,可以确定哪个应用程序或函数调用消耗了较多的时间。- 高
User Time
情况如下图所示。
适用于
- 云服务器 ECS