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

How can I create a compute engine having reserved physical CPU(s)?

Hi,

I'm trying to create and use Compute Engines so that I would be 100% sure that any of the underlying physical CPU(s) would be assigned to my non-preemptible VM.

I am running some very precise performance testing batches (using the getrusage API) and I need to ensure that my workloads are not only scheduled on the same CPU physical node but also using the same memory node.

I understand that when I get the output from "numactl -H" from GCP it's 'made-up' by GCP/KVM. Am I correct in my understanding?
Or is the output of "numactl -H" realistic of the underlying hardware my VM is using?

For example - if I pick a Ice Lake n2-standard-64 in Belgium, I reckon that the underlying physical CPUs are Intel® Xeon® Platinum 8373C Processor ( https://cloud.google.com/compute/docs/cpu-platforms ), and according to https://www.cpu-world.com/CPUs/Xeon/Intel-Xeon%208373C.html those have 36 cores/72 threads, which means that I should be getting a physical core to myself but then share other 4 cores/8 threads with somebody's else VM.

This is potentially bad because I can't quite pin my processes and the clock speed of some cores may vary depending on somebody's else workloads.

Am I wrong?

If so, how could I get my 'own' dedicated single CPU?
Should I setup a VM with 72 threads (or 144 to have 2 physical CPUs, but I don't think this is part of the offering)?

Many thanks!

1 1 446
1 REPLY 1

Hi @EO_01,

Based on my understanding, you want to create a dedicated VM that only hosts your application, or you want your own dedicated CPU. If so, you can consider provisioning sole-tenant VMs.

Sole-tenancy lets you have exclusive access to a sole-tenant node, which is a physical Compute Engine server that is dedicated to hosting only your project's VMs. Use sole-tenant nodes to keep your VMs physically separated from VMs in other projects, or to group your VMs together on the same host hardware as shown in the following diagram. You can also create a sole-tenant node group and specify whether you want to share it with other projects or with the entire organization. 

Kindly review this document for more information - Sole-tenancy overview.

I hope this helps. Thank you.