Migration job metrics

Database Migration Service collects and displays migration job metrics that represent the health and progress of your data migration process. This page describes the following areas associated with migration job metrics:

Metrics available on the migration job details page

The migration job details page shows three metrics diagrams: Restore lag, Unprocessed transaction log backups size, and Total destination storage usage. You can filter the information in these diagrams for each database included in your migration job.

Example diagrams for migration job metrics
      Database Migration Service.
Figure 1. Sample observability diagrams in Database Migration Service. (click to enlarge)
Example diagrams for migration job metrics
      Database Migration Service.
Restore lag
The Restore lag diagram uses the max_replica_sec_lag metric to represent the time difference between the backup file epoch (derived from the file name), and the moment when that file is fully restored in your Cloud SQL destination instance. You can use this information to estimate your average data replication speed, or to troubleshoot possible issues with continuous data replication.

This metric is available for each database included in your migration job, and in the aggregated view where it shows restore lag aggregated for all databases in your migration job.

Unprocessed transaction log backups size
The Unprocessed transaction log backups size diagram uses the migration_job/sqlserver/unprocessed_file_bytes metric to show how much data (in bytes) Database Migration Service has detected in your source Cloud Storage bucket but has not yet replicated to your Cloud SQL destination instance. This information updates after a transaction log is fully processed, so the line displayed on the diagram moves in bigger jumps rather than gradual decreases.

You can watch this metric when you want to determine when to finalize your migration job. When the value of Unprocessed transaction log backups size reaches zero, you can promote the migration job.

This metric is available for each database included in your migration job, and in the aggregated view where it shows restore lag aggregated for all databases in your migration job.

Total destination storage usage
The Total destination storage usage diagram uses the Cloud SQL database/disk/bytes_used metric to show how much data (in bytes) is currently stored contained in all the databases in your destination Cloud SQL instance. You can use this information to estimate the progress of your migration job.

This metric is only available in the aggregated view. You can't filter the total disk usage per database.

View metrics on the migration job details page

To view metric diagrams on the migration job details page, perform the following steps:

  1. In the Google Cloud console, go to the Migration jobs page.

    Go to Migration jobs

  2. In the Jobs tab, click the display name of your migration job.

    The migration job details page opens.

  3. In the Databases section, you can view Restore lag and Unprocessed transaction log backups size numerical data for each database included in your migration job.
  4. Click the Monitoring tab to see the metrics diagrams.
    • You can use the View menu to show aggregated data for all databases included in your migration job, or filter the information for specific databases.
    • You can also view each diagram directly in Cloud Monitoring. Click More chart options > View in Metrics Explorer.

Metrics available in Cloud Monitoring

The following table describes all migration job metrics you can use to create charts in Metrics Explorer. Additionally, you can compare the Cloud SQL cloudsql/database/disk/bytes_used metric with the total size of your source databases to estimate the migration job progress.

The "metric type" strings in this table must be prefixed with datamigration.googleapis.com/. That prefix has been omitted from the entries in the table. When querying a label, use the metric.labels. prefix; for example, metric.labels.LABEL="VALUE".

Metric type Launch stage
Display name
Kind, Type, Unit
Monitored resources
Description
Labels
migration_job/initial_sync_complete BETA
Initial replication sync complete
GAUGEBOOL
datamigration.googleapis.com/MigrationJob
Whether all databases on the destination DB instance have completed the initial sync and are replicating changes from the source.
migration_job/max_replica_bytes_lag BETA
Max lag bytes of the migration job data
GAUGEINT64By
datamigration.googleapis.com/MigrationJob
Current replication lag, aggregated across all of the migration job's data. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.
migration_job/max_replica_sec_lag BETA
Max lag in seconds of the migration job data
GAUGEINT64s
datamigration.googleapis.com/MigrationJob
Current replication lag, aggregated across all of the migration job's data. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.
migration_job/sqlserver/processed_file_bytes_count BETA
Processed Files Bytes Count
DELTAINT64By
datamigration.googleapis.com/MigrationJob
Number of bytes uploaded to the destination. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.
phase: The migration job phase.
migration_job/sqlserver/processed_file_count BETA
Processed Files Count
DELTAINT641
datamigration.googleapis.com/MigrationJob
Number of files uploaded to the destination. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.
phase: The migration job phase.
migration_job/sqlserver/transaction_log_upload_sec_lag BETA
Transaction Log Upload Sec Lag
GAUGEINT64s
datamigration.googleapis.com/MigrationJob
The lag in seconds since the last uploaded transaction log. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.
migration_job/sqlserver/unprocessed_file_bytes BETA
Unprocessed File Bytes
GAUGEINT64By
datamigration.googleapis.com/MigrationJob
Unprocessed file bytes waiting to be uploaded to Cloud SQL. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.
phase: The migration job phase.
migration_job/sqlserver/unprocessed_files BETA
Unprocessed Files
GAUGEINT641
datamigration.googleapis.com/MigrationJob
Unprocessed files waiting to be uploaded to Cloud SQL. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.
phase: The migration job phase.
migration_job/write_bytes_count BETA
Write Bytes Count
DELTAINT64By
datamigration.googleapis.com/MigrationJob
Number of bytes written to the destination. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.
migration_job/write_rows_count BETA
Write Rows Count
DELTAINT641
datamigration.googleapis.com/MigrationJob
Number of rows written to the destination. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds.
database: Database name.

Table generated at 2024-04-17 21:38:09 UTC.