Workload Manager best practices for MySQL

This document lists the best practices that Workload Manager supports for evaluating MySQL workloads running on Google Cloud. To learn about Workload Manager, see Product overview.

Best practices for MySQL workloads

The following table shows the Workload Manager best practices for evaluating MySQL workloads that run on Google Cloud.

Note that to enable Workload Manager for evaluating your MySQL workloads, you must set up Google Cloud's Agent for Compute Workloads on the host VMs.

Select one or more rule categories to filter the following table.

Category Best practice name and description Severity Last updated
MySQL General Check that the Google Cloud Agent for Compute Workloads is set up correctly on all instances in the evaluation scope

Instances in the evaluation scope must have the Google Cloud Agent for Compute Workloads configured to run Workload Manager evaluations. If you have not configured the agent correctly, evaluation results can be incomplete or inaccurate. The minimum recommended version is 1.2.

Severity: Critical Critical
August 27, 2025
MySQL General Enable automatic restart for VMs running MySQL workloads

To ensure that the VM restarts automatically in the event of a failure, enable the Compute Engine automatic restart policy for any VM that is running a MySQL workload.

Severity: Critical Critical
August 27, 2025
MySQL General Provision Hyperdisk with minimum IOPS and throughput

The default provisioned IOPS and throughput values for small Hyperdisks can be too low to guarantee proper performance. We recommend that you raise these values to a minimum of 10,000 IOPS and 1 GiB/s throughput.

For more information, see Default performance.

Severity: Medium Medium
August 27, 2025
MySQL General Set VM maintenance policy to MIGRATE for MySQL workloads

To prevent any platform maintenance events from stopping or restarting a VM that is running MySQL workloads, the onHostMaintenance parameter for the VM must be set to the recommended option MIGRATE.

For more information, see Set VM host maintenance policy.

Severity: Critical Critical
August 27, 2025
MySQL General Do not run MySQL workloads on PD Standard or Hyperdisk Throughput disk types

Google Cloud recommends that you do not run MySQL workloads on PD Standard and Hyperdisk Throughput disk types, because these are hard disk-based disks and might lead to degraded performance.

For more information, see Persistent disk types, Hyperdisks, and Hyperdisk Throughput.

Severity: Medium Medium
August 27, 2025
MySQL General Ensure replication is sent to a machine in a different zone or region

To maintain proper high availability, we strongly recommend that you send your replication to a machine in a different zone or region from the primary location.

For more information, see Well-Architected Framework: Reliability pillar.

Severity: Medium Medium
August 27, 2025
MySQL General Ensure innodb_buffer_pool_size occupies a majority of the memory for the machine

For optimized performance, Google Cloud recommends allocating the innodb_buffer_pool_size parameter a 50% or greater share of the machine's memory. This ensures that the buffer pool has enough memory to store data and improve performance. This guideline doesn't apply to smaller VMs with less than 4 GB of total memory where such an allocation might not be possible.

Severity: Medium Medium
August 27, 2025