MySQL Server Buffer Pool Hit Percent 監視器

Microsoft.MySQLServer.ManagedServer.Unix.InnoDB_BufferPool_HitPct.Monitor (UnitMonitor)

Knowledge Base article:

摘要

MySQL 能夠從緩衝區集區與磁碟滿足的命中率比較。innodb 緩衝區集區包含最近最少使用的索引區塊。緩衝區集區大小可使用全域變數 'innodb_buffer_pool_size 加以控制。此監視器閾值會依據輪詢回傳給代理程式的平均值進行分析,其中 [樣本數] 參數控制平均值計算中所含的樣本數。

原因

狀況不良狀態表示從緩衝區集區讀取的數目相較於讀取總數的比率過低。緩衝區集區的空間可能不足,無法存放所有插入的區塊。

解決方法

若要解決緩衝區集區命中率過低的狀況,請嘗試下列選項:

設定

預設設定

參數

預設值

警告閾值

小於 95

錯誤閾值

小於 90

樣本數

3

您可以使用上列定義的覆寫,變更所有執行個體或特定執行個體或群組的參數值。

Element properties:

TargetMicrosoft.MySQLServer.ManagedServer.Unix
Parent MonitorMicrosoft.MySQLServer.InnoDBPerformanceRollup
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Oss.WSManEnumeration.LessThanThreshold.ThreeState.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
MySQL 伺服器的 InnoDB 緩衝區集區命中率
MySQL 伺服器目前的 InnoDB 緩衝區集區命中率 ({0}\%) 低
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.MySQLServer.ManagedServer.Unix.InnoDB_BufferPool_HitPct.Monitor" Accessibility="Public" Target="Microsoft.MySQLServer.ManagedServer.Unix" TypeID="Oss!Microsoft.Oss.WSManEnumeration.LessThanThreshold.ThreeState.MonitorType" Enabled="onStandardMonitoring" ParentMonitorID="Microsoft.MySQLServer.InnoDBPerformanceRollup">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.MySQLServer.ManagedServer.Unix.InnoDB_BufferPool_HitPct.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Value$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState HealthState="Success" MonitorTypeStateID="StatusOK" ID="OverThreshold"/>
<OperationalState HealthState="Warning" MonitorTypeStateID="StatusWarning" ID="UnderWarningThreshold"/>
<OperationalState HealthState="Error" MonitorTypeStateID="StatusError" ID="UnderErrorThreshold"/>
</OperationalStates>
<Configuration>
<Interval>300</Interval>
<TargetSystem>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/MySQL_ServerStatistics?__cimnamespace=root/mysql</Uri>
<WSManFilter/>
<ObjectName>MySQL Server</ObjectName>
<CounterName>InnoDB Buffer Pool Hit Pct</CounterName>
<InstanceXPath>/DataItem/WsManData/*[local-name(.)='MySQL_ServerStatistics']/*[local-name(.)='InstanceID']</InstanceXPath>
<InstanceName>$Target/Property[Type="Microsoft.MySQLServer.Installation"]/InstanceID$</InstanceName>
<Value>$Data/WsManData/*[local-name(.)='MySQL_ServerStatistics']/*[local-name(.)='IDB_BP_HitPct']$</Value>
<WarningThreshold>95</WarningThreshold>
<ErrorThreshold>90</ErrorThreshold>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>