Ben Chuanlong Du's Blog

It is never too late to learn.

GCP Compute Engine VM Instances

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

GCP

GCP c2 and c3 VMs are good choices according to performance per price. It's even cheaper than customized VM types with reduced memories! GCP c2 VMs are compute optimized and are ideal for CPU intensive workloads. Note that GCP c2 spot VMs are even cheaper than AWS t2.nano VMs if you can stand your VM being preempted.

gcp-c2-price

gcp-c3-price

Create GCP VMs Using Command Line

gcloud compute instances create instance-20240304-20240304-064337 \
    --project=crested-studio-416206 \
    --zone=northamerica-northeast1-c \
    --machine-type=e2-medium \
    --network-interface=network-tier=PREMIUM,stack-type=IPV4_ONLY,subnet=default \
    --maintenance-policy=MIGRATE \
    --provisioning-model=STANDARD \
    --service-account=170261695503-compute@developer.gserviceaccount.com \
    --scopes=https://www.googleapis.com/auth/cloud-platform \
    --tags=https-server,lb-health-check \
    --create-disk=auto-delete=yes,boot=yes,device-name=instance-20240304-062735,image=projects/ubuntu-os-cloud/global/images/ubuntu-2204-jammy-v20240228,mode=rw,size=10,type=projects/crested-studio-416206/zones/northamerica-northeast1-c/diskTypes/pd-balanced \
    --no-shielded-secure-boot \
    --shielded-vtpm \
    --shielded-integrity-monitoring \
    --labels=goog-ec-src=vm_add-gcloud \
    --reservation-affinity=any
In [ ]:
 

Comments