Suspend to preserve the guest OS memory, device state, and application state.
Commands to know:
free: Check disk
sudo dmidecode -t 17 check ram
cproc: check processors
lscpu: check cpu details
To schedule regular backup:
cd home/folder
create a new file for back up sudo nano backup.sh
Make script exucutable: sudo chmod 755 /home/folder/backup.sh??
Tells the VM to update every few hours:
sudo crontab -e
add 0 */4 * * * /home/minecraft/backup.sh?
1. Instances
Labels:
Use labels to indicate different environments, services, teams, and so on.
Key/value pair
Tags
Can have multiple tags
Regions and zone
Machine config:
Order by machine type → series → type
Machine family:
general: best price-performance with most flexible vCPU-memory ratio
E2 is cheapest and fit for most
Also have shared core with other people by context-switching
N-series support commited use and sustained use
T-series:
T2D: supported by GKE to help optimize price-performance
Can add T2D nodes to your GKE clusters by specifying the T2D machine type in your GKE node pools.
vCPU optimize
Memory optimize:
M-series: up to 30% sustained use discounts and are also eligible for committed use discounts, bringing additional savings of greater than 60% for three-year commitments.
GPUs optimize:
For ML.
Can use custom to specify exact amount of vCPU and vRAM but a bit more expensive
Must be multiple of 256mb for memory
vCPU
1 vCPU is 1 hardware hyper-thread (so usually half a core)
The network will scale at 2 gigabits per second for each CPU core, except for instances with 2 or 4 CPUs which receive up to 10 gigabits per second of bandwidth.
…
Availability policies
Can set for machine to stop or delete after a set amount of hour or at a time
Choose what happens when vm shut down by accident or hazard
Sustained usage:
It is billed by: second of the usage of vCPU and memory but count for at least 1 min when it starts
Discount if used >25% (-10% price)a month new minute will count for cheaper price bracket
Up to 30% when use 100% of the month
Commit use:
Commit to use it for 1 year or 3 year to get discount
Preemptible Vm:
for Fault-tolerant workload
Discount up to 60-91% discount
Compute Engine might terminate preemptible instances at any time due to system events with 30 seconds warning (for shutdown script)
To keep your instances physically separated from instances in other projects, or to group your instances together on the same node.
if you have existing operating system licenses, you can bring them to Compute Engine using sole-tenant nodes while minimizing the physical core usage with the in-place restart feature.