High CPU Utilization

Last updated: 2019-08-12 12:00:59


If you find the CPU utilization is high when using MongoDB, you can troubleshoot the problem as follows.

  1. Check if your database operates too frequently.
    You can check the monitoring metrics on the console. You may evaluate whether the instance needs to be upgraded if QPS is high. If the QPS is not high, check if there is slow operation log.
  1. Check if there is a slow operation log on MongoDB.
    Log in to the Console of TencentDB for MongoDB and view the slow operation log of the instance by using "Query statistics".
    Please pay attention to keywords such as command, COLLSCAN, IXSCAN, keysExamined and docsExamined.
  • command indicates the operations recorded in a slow operation log.
  • COLLSCAN indicates a full table scan is performed. IXSCAN indicates an index scan is performed. For more information, see MongoDB official website.
  • keysExamined the number of index entries scanned. docsExamined indicates the number of documents scanned. Larger keysExamined and docsExamined values mean that no index is created or the index is less distinctive. Please confirm the fields for which an index is created.

    For more log descriptions, please see MongoDB official website.