GCP VM - ghdrako/doc_snipets GitHub Wiki
Architektura
- https://cloud.google.com/compute/docs/machine-resource
- https://cloud.google.com/compute/docs/cpu-platforms
- https://cloud.google.com/compute/docs/coremark-scores-of-vm-instances
- https://cloud.google.com/compute/docs/general-purpose-machines
Rodzina | CPU | Cena | Wydajność | Idealne zastosowania |
---|---|---|---|---|
E2 | Intel/AMD (automatycznie) | $ | 🌗 średnia | uniwersalne, tanie |
N2 | Intel Cascade Lake | $$ | 🌕 dobra | web, app servers |
N2D | AMD EPYC Rome | $$ | 🌕 dobra | wydajne CPU, więcej RAM |
C2 | Intel Cascade Lake | $$$ | 🌕🌕 bardzo wysoka | CPU-intensive |
C3 | Intel Sapphire Rapids | $$$$ | 🌕🌕🌕 top | najnowsze, HPC |
T2A | ARM (Ampere Altra) | $ | 🌗-🌕 | tanie, lekkie, skalowalne |
M3 | Intel Ice Lake | $$$$ | 🌕🌕🌕 | maszyny z dużą ilością RAM |
Jeśli zależy Ci na kosztach i skalowalności, rozważ też:
- Preemptible/Spot VMs (tańsze nawet o 80%)
- Autoscaling z Managed Instance Groups
- ARM (T2A) – np. serwisy webowe, kontenery
Resource:
- https://www.youtube.com/watch?v=xTiyKYZJ3c0 Feature:
- Confidential computing - encrypt data in-use while's being processed
- Sole Tenancy - exclusive access to physic Compute Engine server dedicated to your project
Backup disk
####Snapshot Snapshots incrementally back up data from your persistent disks. After you create a snapshot to capture the current state of the disk, you can use it to restore that data to a new disk. You can create snapshots from disks even while they are attached to running virtual machine (VM) instances.
gcloud compute snapshots create SNAPSHOT_NAME \
--source-disk SOURCE_DISK \
--source-disk-zone SOURCE_DISK_ZONE
gcloud compute snapshots delete SNAPSHOT_NAME
gcloud compute snapshots list --project PROJECT_ID
gcloud compute snapshots describe SNAPSHOT_NAME
# create snapshot disk in different project
gcloud compute snapshots create SNAPSHOT_NAME \
--source-disk https://www.googleapis.com/compute/v1/projects/SOURCE_PROJECT_ID/zones/ZONE/disks/SOURCE_DISK_NAME \
--project DESTINATION_PROJECT_ID
Creating scheduled snapshots for persistent disk
1 create snapshot schedule
2 Attach schedule to disk