Use System Insights to improve system performance

This page describes how you can use the Cloud SQL System Insights dashboard. The System Insights dashboard displays metrics for the resources that your instance uses and helps you detect and analyze system performance problems.

View the System Insights dashboard

To view the System Insights dashboard, do the following:

  1. In the Google Cloud console, go to the Cloud SQL Instances page.

    Go to Cloud SQL Instances

  2. Click the name of an instance.
  3. Select the System insights tab from the SQL navigation panel on the left.

The System Insights dashboard opens.

Dashboard image showing metrics and events timeline.

The System Insights dashboard shows the following information:

  1. Your instance details

  2. Events timeline: shows the system events, in a chronological order. This information helps you evaluate the impact of system events on the health and performance of the instance.

  3. Summary cards: provide an overview of the instance health and performance by displaying the latest and aggregated values for the CPU utilization, disk utilization, and log errors metrics.

  4. Metrics charts: show the information about the operating system and database metrics that help you gain insight into several issues, such as throughput, latency, and cost.

The dashboard offers the following high-level options:

  • To create a customized dashboard, click Mode edit.
  • To keep the dashboard up to date, enable the Auto Refresh option. When you enable Auto Refresh, the dashboard data updates every minute. This feature isn't compatible with customized time periods.

  • The time selector shows 1 day selected by default. To change the period, select one of the other predefined periods or click Custom and define a start and end time. Data is available for the last 30 days.

  • To create an absolute link to the dashboard, click the Copy Link button. You can share this link with other Cloud SQL users who have the same permissions.

Summary cards

The following table describes the summary cards displayed at the top of the System Insights dashboard. These cards provide a brief overview of the instance's health and performance during the chosen time period.

Summary cardDescription
CPU utilization - P50 The P50 CPU utilization values.
CPU utilization - P99 The P99 CPU utilization values.
Disk utilization The latest disk utilization value.
Buffer cache hit ratio The percentage of pages found in the buffer cache without having to read from a disk.

Metrics charts

A chart card for a sample metric appears as follows.

Graph showing sample Cloud SQL metric data.

The toolbar on each chart card provides the following set of standard options:

  • To view metric values for a specific moment in the selected period, move the cursor over the chart.
  • To view additional options, click More vert.

    Most charts offer these options:

    • Download a PNG image.

    • View in Metrics Explorer. View the metric in Metrics Explorer. You can view other Cloud SQL metrics in the Metrics Explorer after selecting the Cloud SQL Database resource type.

The following table describes the Cloud SQL metrics that appear by default on the Cloud SQL System Insights dashboard.

The metric type strings follow this prefix: cloudsql.googleapis.com/database/.

Metric name and typeDescription
CPU utilization
database/cpu/utilization

The current CPU utilization represented as a percentage of the reserved CPU that's currently in use.

Memory usage
database/memory/usage

The RAM usage in bytes.

Total memory usage
database/memory/total_usage

The total RAM usage in bytes.

Bytes used
database/disk/bytes_used

The data utilization in bytes.

Disk quota
database/disk/quota

The maximum data disk size in bytes.

Disk read I/O
database/disk/read_ops_count

The change in count of data disk read I/O operations since the preview reported metric. Sampled every 60 seconds.

Disk write I/O
database/disk/write_ops_count

The change in count of data disk write I/O operations since the preview reported metric. Sampled every 60 seconds.

Received bytes
database/network/received_bytes_count

The change in count of bytes received through the network since the preview reported metric. Sampled every 60 seconds.

Sent bytes
database/network/sent_bytes_count

The change in count of bytes sent through the network since the preview reported metric. Sampled every 60 seconds.

Buffer cache hit ratio
database/sqlserver/memory/buffer_cache_hit_ratio

The current percentage of pages found in the buffer cache without having to read from disk. The ratio is the total number of cache hits divided by the total number of cache lookups.

Memory grants pending
database/sqlserver/memory/memory_grants_pending

The current number of processes waiting for a workspace memory grant.

Free list stalls
database/sqlserver/memory/free_list_stall_count

The total number of requests that waited for a free page.

Pages Swapped In Count
database/swap/pages_swapped_in_count

The total count of pages swapped in of disk since the system was booted.

Pages Swapped Out Count
database/swap/pages_swapped_out_count

The total count of pages swapped out of disk since the system was booted.

Checkpoint pages
database/sqlserver/memory/checkpoint_page_count

The total number of pages flushed to disk by a checkpoint or other operation that requires all dirty pages to be flushed.

Lazy writes
database/sqlserver/memory/lazy_write_count

The total number of buffers written by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to disk before the buffer can be reused for a different page) and makes them available to user processes.

Page life expectancy
database/sqlserver/memory/page_life_expectancy

The current number of seconds a page will stay in the buffer pool without references.

Page operations
database/sqlserver/memory/page_operation_count

The total number of physical database page reads or writes. This statistic counts physical page reads or writes across all databases.

Page splits
database/sqlserver/transaction/page_split_count

The total number of page splits that occur as the result of overflowing index pages.

Deadlocks
database/sqlserver/transaction/deadlock_count

The total number of lock requests that resulted in a deadlock.

Transactions started
database/sqlserver/transaction/transaction_count

The total number of transactions started.

Batch requests
database/sqlserver/transaction/batch_request_count

The total number of Transact-SQL command batches received.

SQL compilations
database/sqlserver/transaction/sql_compilation_count

The total number of SQL compilations.

SQL recompilations
database/sqlserver/transaction/sql_recompilation_count

The total number of SQL recompilations.

Processes blocked
database/sqlserver/connections/processes_blocked

The current number of blocked processes.

Lock wait time
database/sqlserver/transactions/lock_wait_time

The total time lock requests were waiting for locks.

Lock waits
database/sqlserver/transactions/lock_wait_count

The total number of lock requests that required the caller to wait.

Cloud SQL connections
database/network/connections

The number of connections to databases on the Cloud SQL instance.

Login attempts
database/sqlserver/connections/login_attempt_count

The total number of login attempts since the last restart of SQL Server service. This does not include pooled connections.

Logouts
database/sqlserver/connections/logout_count

The total number of logout operations since the last restart of SQL Server service.

Connection resets
database/sqlserver/connections/connection_reset_count

The total number of logins started from the connection pool since the last restart of SQL Server service.

Log entries
log_entry_count

The number of log entries, either written directly or routed to this project via project-sink, that are stored in at least one log bucket. By default, log entries are stored for 30 days. Excluded logs are not counted.

Full scans
database/sqlserver/transactions/full_scan_count

The total number of unrestricted full scans. These can be either base-table or full-index scans.

For more information, see Cloud SQL metrics.

Events timeline

The dashboard provides the details of the following events:

Event nameDescriptionOperation type
Instance restart Restarts the Cloud SQL instance RESTART
Instance failover Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. FAILOVER
Instance maintenance Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1 to 3 minutes. MAINTENANCE
Instance backup Performs an instance backup. BACKUP_VOLUME
Instance update Updates the settings of a Cloud SQL instance. UPDATE
Promote replica Promotes a Cloud SQL replica instance. PROMOTE_REPLICA
Start replica Starts replication on a Cloud SQL read replica instance. START_REPLICA
Stop replica Stops replication on a Cloud SQL read replica instance. STOP_REPLICA

What's next