CLOUD-DATABASE-ENGINEER practice question 13 of 25

Your organization is running a MySQL workload in Cloud SQL. Suddenly you see a degradation in database performance. You need to identify the root cause of the performance degradation. What should you do?

Full set: 141 questions
Answer options
A: Use Logs Explorer to analyze log data.
B: Use Cloud Monitoring to monitor CPU, memory, and storage utilization metrics. Correct answer
C: Use Error Reporting to count, analyze, and aggregate the data.
D: Use Cloud Debugger to inspect the state of an application.
Correct Answer:
B. Use Cloud Monitoring to monitor CPU, memory, and storage utilization metrics.
Explanation

When a Cloud SQL instance experiences performance degradation, the most direct and fundamental first step is to analyze its resource utilization. Cloud Monitoring provides essential metrics for Cloud SQL, including CPU utilization, memory usage, and storage I/O. A spike or sustained high level in any of these metrics is a primary indicator of a resource bottleneck, which is a common cause of poor performance. By examining these metrics in the Cloud Monitoring dashboard, you can quickly determine if the instance is overloaded or constrained, guiding further investigation into the root cause, such as inefficient queries or insufficient instance sizing.

Why Incorrect

A. Use Logs Explorer to analyze log data. Logs are useful for detailed analysis (e.g., slow queries), but checking high-level resource metrics in Cloud Monitoring is the more immediate and foundational step for diagnosing performance issues.
C. Use Error Reporting to count, analyze, and aggregate the data. Error Reporting is designed to identify and analyze errors and crashes in your application code, not to diagnose the performance of the underlying database instance.
D. Use Cloud Debugger to inspect the state of an application. Cloud Debugger is a tool for inspecting the state of running application code. It cannot be used to diagnose or inspect a managed service like Cloud SQL.

References

1. Google Cloud Documentation - Cloud SQL - Monitoring instances: "Cloud Monitoring provides detailed monitoring of Cloud SQL instances. You can use it to view performance metrics for your instances... Key metrics to monitor [include] CPU utilization, Storage usage, Memory usage..." This source directly supports using Cloud Monitoring and these specific metrics to assess performance.

Source: Google Cloud, "Cloud SQL Documentation," Monitoring instances.

2. Google Cloud Documentation - Cloud SQL - Diagnose Cloud SQL for MySQL issues: "Performance and limits... Check the CPU utilization and Memory usage metrics in the Google Cloud console. If they are high, consider... increasing the number of vCPUs [or] increasing the amount of memory." This explicitly recommends checking CPU and memory metrics as a primary diagnostic step for performance issues.

Source: Google Cloud, "Cloud SQL Documentation," Diagnose Cloud SQL for MySQL issues, Section: "Performance and limits".

3. Google Cloud Documentation - Cloud Logging - View logs for Cloud SQL: "Cloud SQL provides logs that can help you monitor your database and troubleshoot issues... For example, you can view the slow-query log..." This shows that logs are a valid tool, but for more specific issues like query performance, which is often investigated after checking overall system health with Cloud Monitoring.

Source: Google Cloud, "Cloud SQL Documentation," View logs for Cloud SQL.

4. Google Cloud Documentation - Error Reporting - Overview: "Error Reporting counts, analyzes, and aggregates the crashes in your running cloud services. A centralized error management interface displays the results with sorting and filtering capabilities." This confirms Error Reporting is for application crashes, not database performance metrics.

Source: Google Cloud, "Error Reporting Documentation," Overview.

Scroll to Top