What is the principal difference between N2 and C2 machine types?

1,483 views
Skip to first unread message

Kirill Katsnelson

unread,
Oct 23, 2019, 3:09:01 PM10/23/19
to gce-discussion
My workloads are batch and compute-intensive, and I am looking at the upgrade path from N1 machines I currently use. I'm lingering because I'm benefiting from preemptible instances a lot, and I suppose the very new N2 and C2 machines are still scarce, and demand is presumably higher.

Both N2 and C2 machine types are based on Cascade Lake Xeons, and the CPU frequency specs are quite similar.

There are some not very essential differences that I could see:
 - N2 machines can be started in a custom configuration, C2 only come predefined.
 - N2 accept GPUs, C2 do not.
 - c2-standard-4 costs 7.3% more than n2-standard-4, with the same 16GB of RAM.
 - number of vCPUs is capped at 60 for C2, 80 for N2.

Looks like there have been some tradeoffs accepted by the GCE design team, as the C2 line seems to be less flexible on all points. I'm assuming there should be a substantial benefit in using C2 machines for certain (CPU-bound? memory-bound?) workloads, given the concessions.

What is the principal difference between these 2 machine types? There is apparently the same silicon at the bottom of the virtual stack, and still, C2 are somehow specialized for compute load, and N2 are of a general type.

And, if anyone has already have their hands wet working with both the two new families, please share your experiences how much more performant the C2 were compared to N2 (and what is your workload type -- e.g. on a rough 3-point scale {100% CPU-bound, 50/50, 100% memory-bound}, or on well-known synthetic tests, like LINPACK)?

Very grateful for any insights,

 -kkm

Alexandre Duval-Cid

unread,
Oct 24, 2019, 7:11:36 PM10/24/19
to gce-dis...@googlegroups.com
I will admit there's a lot of assumptions in what I am about to say but I believe the main difference is the CPU grade, type and binning.

looking through the descriptions here [1] [2], I am going to assume that the CPU's you are using when comparing boost clocks are as such:

for the N2 machines you are using the Intel Xeon Cascade Lake gold 5215 CPU
for the C2 machines you are using the Intel Xeon Cascade lake Platinum 9282.

I compared both boost clocks using this article [3].
If my assumption is correct I would expect not much difference in performance at the low end and a much higher performance at the high end due to having less parallelisation of the cores when being assigned a high core count. I would also expect smaller more numerous jobs and high memory machines to get a lot of performance increase at the high end on C2 because of the almost 4 times difference in L3 cache for the Platinum CPU.


I was however unable to find benchmarks to confirm this.

Kirill Katsnelson

unread,
Oct 25, 2019, 8:36:45 AM10/25/19
to gce-discussion
Super, thank you Alexandre! The anandtech link is a very good starting point, and I'll be reading other articles comparing the two lines for a good start.

So it's not exactly the same silicon on which the virtual stack sits, so my assumption was wrong. That can make a difference, really, if you tune your computation load correctly. We have physical Cascade Lake Golds in-house, but no Platinums, these guys are quite expensive.

I am currently crunching numbers in us-west1 (a region lacking both N2 and C2--hopefully, they should be coming some day), because it gave me less preemption churn than us-central1 some time back when I tested throughput. But I have enough quota in both regions to run perf tests, and I'll do just that, time allowing.

Cheers,

 -kkm

Digil (Google Cloud Platform Support)

unread,
Oct 25, 2019, 1:57:44 PM10/25/19
to gce-discussion
You might need to regularly check this help center article about various Compute Engine resource availability such as N2 and C2 'Machine Types'. As per the table, one of the adjacent region ie us-west2 have C2 machine types, which I think you might need consider for your use case scenario.  

Kirill Katsnelson

unread,
Oct 25, 2019, 2:50:03 PM10/25/19
to gce-discussion
Thank you Digil for reminding me to check the tables once in a while. Yeah, I noticed that N2/C2 are rolling out to more regions, and that's cool! We're in LA, so us-west2 is in fact in town. But it's not the cheapest. :)

The two major factors I optimize are cost and average preemption rate (which also affects cost a bit, and the total batch time), under the constrains of availability of both P100 GPUs and AVX512-capable CPUs in the zone. But since I only run batch jobs, and egress is minuscule, the physical location is hardly important, and latency not at all. Even running the pipelines across the pond would not be a big deal. But assuming that the GCP pricing reflects demand, it would also be ungoogly toward other GCP customers to hog resources where they are apparently scarcer, in addition to their higher price.

 -kkm

Ahmad P - Cloud Platform Support

unread,
Oct 28, 2019, 2:31:22 PM10/28/19
to gce-discussion

Please note that the price is not reflected by demand and pricing varies by location. 

AVX512-capable CPUs are supported by Sandy Bridge, Ivy Bridge, Haswell, Broadwell, then you can work on any of those platforms depending on your needs. 

If you desire to work on us-west2 (although you mentions that location isn't important), you can additionally look at the Regions and zones for us-west2 if needed. 

If scarcity of resources is an issue, you can create reserving GCE resources.


Kirill Katsnelson

unread,
Nov 1, 2019, 7:43:00 AM11/1/19
to gce-discussion
Ahmad, thanks for the reference. To be completely fair to facts, of general CPUs (excluding Knights Landing/Knights Mill, aka Xeon Phi),  only Skylake-SP, Skylake-X, Cannon Lake, Cascade Lake, and the upcoming Gen 10 Ice Lake and (Gen 10 or 11?) Tiger Lake architectures do/will support various subsets of AVX-512. Neither of Sandy Bridge, Ivy Bridge, Haswell or Broadwell architectures that you mentioned in fact do, and, more confusingly, Skylake without the X or SP does not have AVX-512 support either (these chips, AFAIK, come only in i[579]-lines, not server-grade Xeon-branded models). All mentioned architectures do have AVX2, with 256-bit vector units; it's not uncommon to confuse AVX2 and AVX512--Intel is not super inventive in naming instruction sets, unlike their codenaming of different architectures. It's a mess, in short. :)

Take care,

 -kkm

Digil (Google Cloud Platform Support)

unread,
Nov 1, 2019, 10:02:41 AM11/1/19
to gce-discussion
The architectural design of the CPU platform is not in the hands of the Google Compute Engine. That's being said if you felt that a specific machine type needs to be introduced with Google Cloud Platform, feel free to raise a feature request mentioning the details of it along with your use-case scenario. 
Reply all
Reply to author
Forward
0 new messages