AMD EPYC vs. Intel Xeon in the Cloud: A Deep Dive Into MySQL Performance

When you're running a critical database like MySQL in the cloud, every bit of performance counts. And, let's be honest, so does the cost. This is precisely the crossroads many organizations find themselves at, especially when considering upgrades. Recently, a user running MySQL on Google Cloud's N1 machines, powered by Intel Xeon processors, was eyeing a move to the N2D generation, which features AMD EPYC CPUs. The allure? Potential cost savings. But the big question remained: would performance take a hit?

It's a common narrative: benchmarks often show AMD EPYC processors shining in purely CPU-bound tasks, and generally, their platform comes with a more attractive price tag. So, the idea was to put this to the test, side-by-side. The goal wasn't just to see if the EPYC platform could match the Intel Xeon's performance, but if it could do so while potentially allowing a reduction in machine size – moving from a 64-core Intel Haswell (N1) to either a 64-core or even a 48-core AMD Rome (N2D). To add a layer of comparison, the newer Intel Cascade Lake generation (N2) was also brought into the mix.

To get a clear picture, four distinct virtual machines were set up:

  • N1-64: The baseline, running an Intel Xeon Haswell at 2.30GHz.
  • N2-64: The newer Intel generation, with a Cascade Lake Xeon at 2.80GHz.
  • N2D-48: An AMD EPYC Rome, clocking in at 2.25GHz, but with fewer cores.
  • N2D-64: The AMD EPYC Rome, also at 2.25GHz, but matching the core count of the Intel machines.

All these machines were configured with MySQL Community Server 5.7.35 and a robust set of InnoDB parameters designed to push the database hard. Think generous buffer pools, optimized thread handling, and specific settings for log flushing and file management. Crucially, a 1TB balanced persistent drive was attached to each VM. This was to ensure that any performance bottlenecks observed would be primarily CPU-related, rather than being throttled by disk I/O.

The test itself was designed to isolate CPU performance. Using sysbench, a read-only OLTP workload was run against an in-memory dataset. This approach is brilliant because it generates significant CPU load without being held back by storage speed or memory latency. The benchmark was executed with varying thread counts – 16, 32, 64, 128, and 256 – with a brief pause between each run to allow systems to settle.

So, what did the numbers reveal? When looking at the maximum transactions per second (TPS) each instance could handle, a few patterns emerged.

Performance Peaks and Plateaus

Across all configurations, the sweet spot for transactions per second seemed to hit around 64 threads. This is quite logical; once you have enough threads to fully utilize the available CPU cores without excessive context switching, performance tends to plateau. The larger machines, the N2-64 (Intel) and N2D-64 (AMD), naturally led the pack in raw throughput, with the Intel machine hitting an impressive 598k TPS and the AMD machine reaching 444k TPS. Interestingly, in this specific test, the Intel-based N2-64 outperformed the AMD N2D-64 by about 35% at its peak.

Core Count Matters, But So Does Architecture

It was also observed that the smaller instances, the N1-64 (Intel) and the N2D-48 (AMD), started to show signs of strain as the thread count increased beyond their core capacity. The larger 64-core machines, however, handled higher thread counts more gracefully, only showing significant impact when the thread count reached about four times the number of CPU cores. This suggests that while core count is a major factor, the underlying architecture and its efficiency in handling parallel workloads also play a significant role.

Looking at CPU utilization, the N1-64 and N2D-48 machines were hitting 100% utilization quite early, around the 64-thread mark. The N2-64, on the other hand, showed a more sustained, albeit still high, utilization as it pushed towards its peak performance. This detailed comparison provides valuable insight for anyone looking to optimize their cloud database deployments, balancing the compelling economics of AMD EPYC with the proven performance of Intel Xeon, especially within the context of demanding applications like MySQL.

Leave a Reply

Your email address will not be published. Required fields are marked *