GCP C3 vs C4 benchmark: Sapphire Rapids TDX and Granite Rapids with and without TDX

GCP C3 vs C4 benchmark: Sapphire Rapids TDX and Granite Rapids with and without TDX

Summary

We benchmarked GCP C3 and C4 configurations to evaluate two questions:

  1. The platform uplift from C3 Sapphire Rapids to C4 Granite Rapids under TDX.

  2. The TDX overhead on C4 by comparing Granite Rapids with and without TDX.

The main findings are:

  • C4 Granite Rapids improved the measured CPU and cryptographic results by approximately 43–51% and single-thread memory throughput by approximately 33% versus C3 Sapphire Rapids.

  • C4 TDX and C4 non-TDX were within 0.4% in the CPU and memory tests. We did not observe a material TDX compute penalty.

  • The disk results are not apples-to-apples. They compare a production-representative 4 TB C3 Persistent Disk with a 250 GB C4 Hyperdisk and must not be attributed to the CPU generation or TDX.

Test environment

VMCPUvCPU / memoryConfidential modeBoot diskData disk used by fio
c3-standard-44Intel Sapphire Rapids44 / 176 GiBTDX50 GB Hyperdisk Balanced4 TB pd-balanced; approximately 27k IOPS / 1,200 MiB/s effective ceiling
c4-standard-48Intel Granite Rapids48 / 180 GiBTDX50 GB Hyperdisk Balanced250 GB Hyperdisk Balanced; default 4,500 IOPS / 515 MiB/s
c4-standard-48-lssdIntel Granite Rapids48 / 180 GiBNone50 GB Hyperdisk Balanced250 GB Hyperdisk Balanced; default 4,500 IOPS / 515 MiB/s

All VMs ran in us-east4-c using image mkosi-benchmark-20260217, Debian 13, Linux 6.16.3-mkosi-cloud, fio 3.39, sysbench 1.0.20, stress-ng 0.19.02 and OpenSSL 3.5.1. Each configuration ran five iterations of the same benchmark script pinned at commit eb673fb.

The data disks used ext4 and were mounted at /var/opt/data. Each VM ran:


ITERATIONS=5 TESTDIR=/var/opt/data/bench/fio-tmp /usr/local/bin/benchmark.sh

Network testing remained disabled in the baked script.

Why the non-TDX VM uses -lssd

GCP rejected min_cpu_platform = "Intel Granite Rapids" on the regular non-TDX c4-standard-48, and the instance we observed there used Emerald Rapids. We therefore used c4-standard-48-lssd to obtain a non-TDX Granite Rapids VM.

The -lssd shape automatically attached eight 375 GB Titanium SSDs. They were not used by the benchmark; fio ran against the same separately attached Hyperdisk configuration as the C4 TDX VM.

CPU and memory results

Values are medians over five runs.

MetricC3 TDXC4 TDXC4 non-TDX
sysbench CPU, events/s274.0394.0 (+43.8%)395.2 (+0.3% vs C4 TDX)
SHA-256 16 KiB, kB/s1,411,2742,014,526 (+42.7%)2,020,307 (+0.3%)
AES-256-CBC 16 KiB, kB/s1,046,5291,486,957 (+42.1%)1,491,051 (+0.3%)
RSA-2048 sign/s2,6974,059 (+50.5%)4,071 (+0.3%)
Memory random write, MiB/s2,2653,005 (+32.7%)3,018 (+0.4%)
stress-ng CPU, bogo ops/s6,5979,484 (+43.8%)9,519 (+0.4%)

Disk results

GCP does not offer Persistent Disk on C4, so we were required to use Hyperdisk. The C3 baseline used a production-representative 4 TB pd-balanced disk, while both C4 machines used 250 GB Hyperdisk Balanced at its default performance. See the GCP C4 machine-series documentation.

The C3 disk derives its performance from its capacity and VM limits. The C4 Hyperdisks were left at their size-derived default of 4,500 IOPS and 515 MiB/s. This difference explains the high-queue-depth performance gap and prevents treating these measurements as a direct C3-versus-C4 storage comparison.

fio write testC3 TDX, 4 TB pd-balancedC4 TDX, 250 GB HyperdiskC4 non-TDX, 250 GB Hyperdisk
Sequential, QD1372 MiB/s516 MiB/s473 MiB/s
Sequential, QD1281,046 MiB/s517 MiB/s511 MiB/s
Random 4 KiB, QD12,945 IOPS2,926 IOPS2,511 IOPS
Random 4 KiB, QD12828.6k IOPS4,527 IOPS4,528 IOPS

Matching the C3 disk’s effective IOPS and throughput would provide a fairer saturation comparison, but it would not guarantee equivalent latency. In this experiment, C3 pd-balanced and C4 TDX Hyperdisk produced nearly identical QD1 random-write results: approximately 2,945 versus 2,926 IOPS, with mean completion latency of approximately 320 versus 322 microseconds. The C4 non-TDX result was slower at approximately 2,511 IOPS and 385 microseconds despite using the same Hyperdisk configuration as C4 TDX.

This dataset therefore does not establish a general latency difference between Persistent Disk and Hyperdisk, nor does it attribute the C4 non-TDX variation to TDX. Latency-sensitive workloads require workload-specific validation before migration.

Conclusion

C4 Granite Rapids is a clear compute improvement over C3 Sapphire Rapids in this benchmark, and the matched C4 comparison did not show a meaningful TDX compute penalty.

Storage remains the migration constraint. C4 requires Hyperdisk, and matching the capacity and effective performance of the current C3 pd-balanced searcher disks is not a cost reduction for the current VM shapes. Production workload validation is required before migrating disk-sensitive workloads.

2 Likes