MyISAM テーブルのロック要求数に対する、ロックを得るための待機数の割合です。MySQL では、MyISAM、MEMORY、MERGE テーブルでテーブル レベルのロックが使用されます。このモニターしきい値は、エージェントへのポーリングで返された値の平均値を基準として分析されます。ここで [サンプル数] パラメーターは、平均値の計算に使用されるサンプルの数を制御します。
テーブル ロックの競合の割合が高くなっていることを、異常な状態が示しています。テーブル ロックを取得するまでに要する待機時間が長すぎます。
テーブル ロック競合の割合が高い問題に対処するには、次の使用できるオプションをお試しください。
行レベルのロックのみを使用する InnoDB をテーブル ストレージのメイン エンジンとして使用する
一時テーブル temp_table に行を挿入してから、実テーブルを定期的に更新する
既定の構成
パラメーター | 既定値 |
警告しきい値 | 45 より大きい |
エラーしきい値 | 55 より大きい |
サンプル数 | 3 |
上記で定義されたパラメーター値は、上書きにより、すべてのインスタンスまたは特定のインスタンスやグループに対して変更できます。
Target | Microsoft.MySQLServer.ManagedServer.Unix | ||
Parent Monitor | Microsoft.MySQLServer.TableCachePerformanceRollup | ||
Category | PerformanceHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Oss.WSManEnumeration.GreaterThanThreshold.ThreeState.MonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.MySQLServer.ManagedServer.Unix.TableLockContentionPct.Monitor" Accessibility="Public" Target="Microsoft.MySQLServer.ManagedServer.Unix" TypeID="Oss!Microsoft.Oss.WSManEnumeration.GreaterThanThreshold.ThreeState.MonitorType" Enabled="onStandardMonitoring" ParentMonitorID="Microsoft.MySQLServer.TableCachePerformanceRollup">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.MySQLServer.ManagedServer.Unix.TableLockContentionPct.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="UnderThreshold"/>
<OperationalState HealthState="Warning" MonitorTypeStateID="StatusWarning" ID="OverWarningThreshold"/>
<OperationalState HealthState="Error" MonitorTypeStateID="StatusError" ID="OverErrorThreshold"/>
</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>Table Lock Contention 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(.)='TableLockContentionPct']$</Value>
<WarningThreshold>45</WarningThreshold>
<ErrorThreshold>55</ErrorThreshold>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>