Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Higher CPU Usage After Migrating to Cloud SQL for SQL Server

We recently migrated our SQL Server databases from Google Cloud VMs to Cloud SQL. Despite using the same number of vCPUs and memory, we’re seeing a consistent 20% higher CPU usage on Cloud SQL with the same databases and workload.

Setup Comparison:

  • VM1: N1, 6 vCPUs, 30 GB memory, SQL Server 2016 Standard
    Migrated to Cloud SQL: 6 vCPUs, 30 GB memory, SQL Server 2022 Web
  • VM2: N1, 8 vCPUs, 22.5 GB memory, SQL Server 2016 Standard
    Migrated to Cloud SQL: 8 vCPUs, 22.5 GB memory, SQL Server 2022 Web

I would have expected comparable or lower CPU usage given newer CPU architectures since we created the original VMs.

Is the performance difference between SQL Server on Windows and Linux that significant (Cloud SQL uses Linux).  I assume the newer SQL Server version isn't a factor but might there be Cloud SQL-specific configurations or limitations?  How can I confirm the exact CPU architecture being used in Cloud SQL?

We’ve checked query performance and ensured indexes are optimized, but the utilization remains higher. Any tips or guidance would be greatly appreciated.

0 1 306
1 REPLY 1

Hi @james1776,

It’s likely that the higher CPU usage you're seeing is due to the fact that Cloud SQL runs SQL Server on Linux, which can behave differently from Windows. Even though SQL Server is optimized for both platforms, Linux and Windows handle system resources like memory management, process scheduling, and I/O operations in distinct ways. This could explain the extra CPU load you're noticing.

To help optimize CPU performance, you may refer to the following resources:

If you’re still seeing higher CPU usage after reviewing and adjusting based on these docs, it’s a good idea to reach out to Google Cloud support. They can provide more specific guidance tailored to your environment and help you troubleshoot further.

Hope this helps!