Help Center/ Document Database Service/ FAQs/ Monitoring and Alarm/ How Do I Clear the Alarm that the Dirty Data in WiredTiger Cache Is Too High
Updated on 2024-04-29 GMT+08:00

How Do I Clear the Alarm that the Dirty Data in WiredTiger Cache Is Too High

Possible Causes

The dirty data in WiredTiger cache is too high in the following scenarios:

  1. After the parameter enableMajorityReadConcern of MongoDB is set to true, the service write rate is too high. As a result, the secondary node cannot synchronize oplogs from the primary node in a timely manner.
  2. After the parameter enableMajorityReadConcern of MongoDB is set to false, the CPU and memory specifications are too small to bear the write rate of the current service.

Fault Locating

  • Check the running parameters of MongoDB. Log in to the console, click the instance name, and choose Parameters to view the value of enableMajorityReadConcern.
    Figure 1 Checking the value of enableMajorityReadConcern
  • Log in to the management console, choose Cloud Eye > Cloud Service Monitoring > Document Database Service, and view the node metrics of WiredTiger Dirty Data Cache Percentage and Tracked Dirty Bytes in WiredTiger Cache.
    Figure 2 Tracked Dirty Bytes in WiredTiger Cache
    Figure 3 WiredTiger Dirty Data Cache Percentage
  • Common scenarios:

    If the primary/standby replication latency keeps increasing, log in to the management console and choose Cloud Eye > Secondary to view the replication latency.

    Figure 4 Replication Lag

Solution

Log in to the DDS console, click the instance name, and choose Parameters to view the value of enableMajorityReadConcern.
  • If enableMajorityReadConcern is set to false, log in to the management console and choose Cloud Eye to view the metrics of Replication Lag, Tracked Dirty Bytes in WiredTiger Cache, WiredTiger Dirty Data Cache Percentage, CPU, and Memory. If the value of WiredTiger Dirty Data Cache Percentage exceeds 20% and keeps increasing, and the values of CPU and Memory exceed 90%, limit the client write rate in a timely manner and evaluate whether the specifications need to be upgraded.
  • enableMajorityReadConcern is set to true.
    • If read consistency is not required, contact Huawei engineers to set this parameter to false.
    • If read consistency is required, the value of WiredTiger Dirty Data Cache Percentage exceeds 20% and keeps increasing, and the values of CPU and Memory exceed 90%, limit the client write rate in a timely manner and evaluate whether the specifications need to be upgraded.