CPU 使用量 (\%)

Microsoft.SQLServer.2014.DBEngine.CPUUsagePercentMonitor (UnitMonitor)

2014 資料庫引擎的 CPU 使用率 (\%)

Knowledge Base article:

摘要

針對處理器在處理 SQL Server 處理序執行緒上實際花費的時間提供量值。

原因

所有配置的 CPU 都忙於處理 SQL Server 工作。

解決方式

使用效能監視器 SQL Server 計數器以及效能相關的 DMV (例如 sys.dm_exec_query_stats) 來評估 SQL Server 使用較高 CPU 百分比的原因。

疑難排解 SQL Server 2014 中的效能問題

http://technet.microsoft.com/library/dd672789(v=sql.100).aspx

建立擴充事件工作階段

http://technet.microsoft.com/library/hh213147.aspx

可覆寫的參數

名稱

描述

預設值

已啟用

 

產生警示

 

間隔 (秒)

執行工作流程的週期性時間間隔 (秒)。

300

範例數

指出測量值在違反臨界值多少次之後,才會變更狀態。

6

臨界值

收集的值會與此參數相比。

95

逾時 (秒)

指定允許工作流程在關閉且標示為失敗之前執行的時間。

200

Element properties:

TargetMicrosoft.SQLServer.2014.DBEngine
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2014.DBEngine.CPUUsagePercent.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2014: CPU 使用率 (\%) 太高
電腦 "{1}" 上 SQL 執行個體 "{0}" 的 CPU 使用率太高。請參閱 [警示內容] 索引標籤,以取得詳細資料。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2014.DBEngine.CPUUsagePercentMonitor" Accessibility="Public" Enabled="true" Target="SQL2014Core!Microsoft.SQLServer.2014.DBEngine" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2014.DBEngine.CPUUsagePercent.MonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2014.DBEngine.CPUUsagePercentMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.ServerRole"]/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Normal" MonitorTypeStateID="Normal" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<TimeoutSeconds>200</TimeoutSeconds>
<Threshold>95</Threshold>
<NumSamples>6</NumSamples>
</Configuration>
</UnitMonitor>