MySQL 能夠從緩衝區集區與磁碟滿足的命中率比較。innodb 緩衝區集區包含最近最少使用的索引區塊。緩衝區集區大小可使用全域變數 'innodb_buffer_pool_size 加以控制。此監視器閾值會依據輪詢回傳給代理程式的平均值進行分析,其中 [樣本數] 參數控制平均值計算中所含的樣本數。
狀況不良狀態表示從緩衝區集區讀取的數目相較於讀取總數的比率過低。緩衝區集區的空間可能不足,無法存放所有插入的區塊。
若要解決緩衝區集區命中率過低的狀況,請嘗試下列選項:
修改設定檔中的變數 'innodb_buffer_pool_size',增加 InnoDB 緩衝區集區的大小。
修改設定檔中的變數 'innodb_buffer_pool_instances',將緩衝區集區分開,供並行記憶體讀取與寫入作業的執行個體各自使用。
預設設定
參數 | 預設值 |
警告閾值 | 小於 95 |
錯誤閾值 | 小於 90 |
樣本數 | 3 |
您可以使用上列定義的覆寫,變更所有執行個體或特定執行個體或群組的參數值。
Target | Microsoft.MySQLServer.ManagedServer.Unix | ||
Parent Monitor | Microsoft.MySQLServer.InnoDBPerformanceRollup | ||
Category | PerformanceHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Oss.WSManEnumeration.LessThanThreshold.ThreeState.MonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<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>