Prepare and test your skills
Prepare and test your skills
Determining storage and data throughput requirements means matching a workload to the right Google Cloud storage based on IOPS, throughput, latency, durability, and cost. IOPS measures how many small read and write operations a volume can handle per second, while throughput measures how much data moves per second for larger transfers. Latency measures how quickly each operation completes, which depends on both the storage type and the region where data lives relative to users and compute.
Block storage for virtual machines is durable storage attached to a Compute Engine instance that persists even when the instance stops. Persistent Disk (opens in a new tab) provides zonal volumes that live in one zone and regional Persistent Disk volumes (opens in a new tab) that replicate data synchronously across two zones in the same region. Data in Persistent Disk volumes is not replicated across regions, so regional Persistent Disk protects against a zone outage but not a region outage.
Google Cloud Hyperdisk (Hyperdisk) provides better performance, flexibility, and efficiency than Persistent Disk for boot and data volumes. Hyperdisk Balanced lets you provision IOPS and throughput separately and change them dynamically, so you can tune the volume without overprovisioning both together. Hyperdisk Extreme provides higher maximum IOPS and throughput than SSD Persistent Disk, which makes it the choice when a database or high-performance workload needs more headroom. Standard Persistent Disk uses hard-disk technology for low-cost sequential work, while SSD Persistent Disk uses solid-state technology for higher IOPS and lower latency.
Choosing block storage follows durability first, then platform support, then performance tuning. This order matters because temporary storage cannot protect data that must survive, and Hyperdisk cannot be used where the machine series does not support it. The documented decision order is:
Beyond attached disks, you can create a file server on Compute Engine for NFSv3 and SMB3 sharing or mount a RAM disk inside VM memory for high throughput and low latency. Traffic flows from the application to the RAM disk in memory, but the RAM disk loses data when the VM stops, so it fits temporary scratch and caching rather than durable primary storage.
Cloud Storage is consistent, scalable, large-capacity object storage for files, backups, images, and other unstructured data. Data in regional buckets is replicated synchronously across zones in the region, which keeps reads and writes low-latency within that region. Data in dual-region or multi-region buckets is stored redundantly in at least two separate geographic locations, where metadata is written synchronously across regions and data is replicated asynchronously.
For dual-region buckets, turbo replication ensures objects replicate across the region pair with a recovery point objective (RPO) of 15 minutes. This RPO defines how much recent data could be lost if a region fails, so turbo replication fits workloads that need faster cross-region durability than default asynchronous replication. Choose regional buckets when low latency in one region matters most, and choose dual-region or multi-region buckets when replicated storage across locations matters more.
Cloud Storage classes separate data by how often it is accessed:
| Class | Access pattern | Cost and availability profile |
|---|---|---|
| Standard | Frequently accessed data | Maximum availability at standard cost |
| Nearline | Data accessed less than once a month | Low-cost choice for infrequent access |
| Coldline | Data accessed less than once a quarter | Lower-cost choice for rare access |
| Archive | Backup and disaster recovery data | Lowest-cost choice for archiving |
Placing hot data in Archive raises retrieval cost and delay, while placing cold data in Standard wastes money, so match the class to actual access frequency.
Exam tip: Regional Persistent Disk replicates synchronously across two zones but not across regions, while dual-region Cloud Storage replicates data asynchronously across two geographic locations unless turbo replication is enabled for a 15-minute RPO.
Shared file storage for multiple virtual machines is a file system that many Compute Engine VMs can mount at the same time. Filestore is high-performance, fully managed NFS file storage where data in a regional instance is replicated synchronously across three zones in the region. This synchronous replication across three zones keeps the file share available through a zone outage, and you can replicate a Filestore instance to a different region for protection against a region outage.
A Filestore regional instance fits data shared across a web tier or application tier because one mount serves many clients with the same files. Common shared contents include:
Google Cloud NetApp Volumes is fully managed NFS and SMB file storage for workloads with strict availability needs. If a Microsoft SQL Server failover cluster instance needs operating system access, NetApp Volumes provides continuous availability (CA) SMB storage for the database. Choose Filestore when Linux VMs need shared NFS access, and choose NetApp Volumes when Windows failover clustering needs continuously available SMB storage.
Evaluating compute and memory configurations is the process of matching virtual machine size to workload needs for performance, scalability, and cost-efficiency. In Compute Engine (opens in a new tab), this means selecting a predefined machine type or building a custom machine type, using utilization recommendations to right-size VMs, and choosing a provisioning model such as Spot VMs when savings outweigh availability needs. The VM multithreading setting further tunes how virtual CPUs map to physical cores for specialized workloads.
Choosing a machine type means selecting the balance of virtual CPUs (vCPUs) and memory that fits the performance requirements of a workload tier. Compute Engine offers predefined families for general-purpose, memory-optimized, and compute-optimized profiles, plus customizable sizes for exact needs. For example, a machine type in the C4 machine series from the general-purpose family provides consistently high performance for database workloads, while web and application tiers use types matched to their own throughput and latency needs. The choice also affects networking because the per-VM limit for egress network bandwidth depends on the machine type and whether traffic stays in the same Virtual Private Cloud (VPC) network.
Custom machine types are VMs where vCPUs and memory are sized independently instead of using a fixed predefined ratio. A custom machine type is useful when workload requirements are predictable and fall between predefined sizes, because resources can be tailored to actual needs to avoid paying for unused capacity. Extended memory options allow more memory per core without adding unneeded vCPUs, which also helps control third-party software costs that are licensed per CPU core. Use a custom machine type when monitoring shows steady CPU and memory use that does not align well with any predefined machine type.
Machine type recommendations are automated suggestions in Compute Engine that help optimize resource utilization of existing VM instances. The recommendation engine observes actual CPU and memory use and suggests a machine type that more closely matches the workload compute requirements. Applying these recommendations prevents overprovisioning large VMs that sit idle and underprovisioning small VMs that become bottlenecks. Review recommendations regularly after deployment, then move steady workloads to a better-fitting predefined type or to a custom machine type.
Spot VMs are Compute Engine VMs offered at significantly lower cost than regular VMs in exchange for lower availability. A Spot VM uses the same machine types, options, and performance as a regular VM, but Compute Engine can preemptively stop or delete the Spot VM to reclaim capacity when resources are needed elsewhere. Traffic flows from the managed instance group (MIG) controller to Spot VM instances, so the MIG depends on available spare capacity to create or replace those instances during scale-out.
| VM provisioning model | Cost | Availability and use |
|---|---|---|
| Regular VMs | Standard on-demand price | Remains running until stopped by the owner; choose when the workload needs high availability |
| Spot VMs | Significantly lower than regular VMs | Can be preemptively stopped or deleted; choose when the application is fault tolerant and runs batch jobs |
When zone capacity is limited, a MIG that depends on Spot VMs might not scale out to its target size until capacity becomes available again. Choose Spot VMs for fault-tolerant application and web tiers and for batch processing without high availability requirements.
Exam tip: Spot VMs offer the same machine types, options, and performance as regular VMs — the tradeoff is that they can be preempted, so use them only for fault-tolerant work.
VM multithreading controls how vCPUs map to physical processor cores on the host machine. Each vCPU allocated to a Compute Engine VM is implemented as a single hardware multithread, and by default two vCPUs share one physical CPU core through simultaneous multithreading (SMT). For applications with highly parallel operations or floating-point calculations, such as genetic sequence analysis and financial risk modeling, performance can improve by reducing the threads per core from two to one. Reducing threads per core also changes licensing exposure for some third-party software, so check vendor rules and consider disabling SMT and using custom machine types to provision only the needed cores.
Establishing resource baselines through profiling and scaling policies is the practice of measuring how a workload consumes resources under load and using those measurements to configure automatic scaling. The baseline defines the minimum efficient capacity for normal traffic plus headroom for peaks, while the scaling policy adds and removes capacity as demand changes. In Google Cloud, baselines come from load testing and observability data, and scaling is implemented with Compute Engine managed instance groups (MIGs) (opens in a new tab), Google Kubernetes Engine (GKE), Cloud Run, and data services such as Bigtable.
Workload profiling measures resource efficiency, which is the relationship between application load and the CPU, memory, disk I/O, and network resources the application consumes. Load testing simulates realistic traffic for normal and peak conditions, while stress testing pushes the system to its limits to reveal bottlenecks where efficiency deteriorates. Benchmarks must be repeated at regular intervals because efficiency changes as code, traffic mix, and data volume evolve.
Cloud Monitoring (opens in a new tab) provides real-time visibility into CPU utilization, memory usage, network traffic, disk I/O, application response times, and business-specific metrics. Logs show system events, errors, and warnings, while traces show how requests flow from service to service and where round-trip time grows between tiers. Code profiling identifies functions that consume excessive resources, and the results guide concrete fixes such as adjusting VM or container counts, tuning web server and database configuration, adding caching, and improving indexing and queries.
Capacity estimation translates a load forecast into a specific quantity of Google Cloud resources that can meet performance and reliability objectives. The forecast considers user count, request rate, historical trends, seasonal variations, spikes during special events, and growth from business changes such as expansion to new geographies. The estimate then selects the deployment shape, for example MIG size, VM machine type, and the number, type, and size of persistent disks, and the Google Cloud Pricing Calculator can estimate the cost of that shape.
A reliable estimate builds in redundancy, quotas, and assured capacity before traffic arrives:
This sequence ensures that autoscaling starts from a baseline that supports failover and is permitted by project limits.
An autoscaling policy defines when capacity is added during high load and removed during low load so availability stays consistent without paying for idle redundancy. Horizontal scaling, which adds instances to distribute load, is preferred for most cloud-first applications because failure of one instance does not remove the application and variable load is handled efficiently. For horizontal scaling to work seamlessly, components should be stateless, with session state stored outside the compute instance such as in Memorystore for Redis, so any instance can handle any user request.
Effective policies combine reactive scaling for unpredictable spikes with proactive scheduled scaling for predictable patterns such as daily business hours, weekly reports, and major sales events. Reactive scaling responds to real-time metric changes, while proactive scaling pre-provisions capacity before an anticipated surge to avoid a scramble for resources. Policies should use workload-specific signals instead of CPU alone, such as queue depth, request latency, and custom application metrics, and they must define clear thresholds to prevent frequent unnecessary scaling, known as flapping.
| Service | What scales | Scaling trigger and behavior |
|---|---|---|
| Compute Engine managed instance groups (MIGs) | VMs managed as a single entity | Policy defines minimum and maximum VMs; adds VMs when CPU utilization reaches a threshold and removes VMs when utilization drops |
| Google Kubernetes Engine (GKE) | Nodes and Pods | Cluster Autoscaler adds or removes nodes on Pod demand, Horizontal Pod Autoscaler changes Pod replicas on CPU, memory, or custom metrics, Vertical Pod Autoscaler tunes requests and limits, and Node Auto-Provisioning creates optimized node pools |
| Cloud Run | Container instances | Built-in scaling on incoming traffic; scales out with load and scales in to zero when there is no traffic |
| Bigtable | Cluster nodes | Monitors CPU and storage load and adjusts node count to maintain specified target utilization |
Managed Service for Apache Spark follows the same pattern for batch analytics by dynamically scaling executors and other workload resources for each submitted batch. Together these options let the baseline handle steady load while the policy absorbs fluctuation without manual resizing.
Exam tip: Autoscaling may not catch up with the velocity of a sudden peak, so manually pre-warm VMs, pre-load caches, and pre-warm serverless components to prevent cold starts; Cloud Load Balancing does not require pre-warming.
Continuous right-sizing keeps the baseline aligned with actual demand by matching allocation to observed usage over time. Over-provisioning creates unnecessary cost and energy use, while under-provisioning creates bottlenecks that degrade performance and user experience. Cloud Monitoring tracks usage patterns and Recommender, part of Active Assist, analyzes utilization data to recommend more efficient machine types and sizes. Custom metrics extend right-sizing to application-specific signals, with alerts that notify administrators when thresholds are met so allocation can be adjusted promptly. Dashboards, reports, and cost analysis by tags and labels reveal high-use resources, idle capacity, and spending trends that guide the next baseline revision.
Use Hyperdisk Balanced when you want to provision IOPS and throughput separately and change them dynamically without overprovisioning both together. Use Hyperdisk Extreme when a database or high-performance workload needs higher maximum IOPS and throughput than SSD Persistent Disk can provide.
Regional Persistent Disk replicates data synchronously across two zones in the same region but does not replicate across regions, so it protects against a zone outage but not a region outage. Data in dual-region Cloud Storage buckets is stored redundantly in at least two separate geographic locations, where metadata is written synchronously across regions and data is replicated asynchronously, with turbo replication providing a recovery point objective of 15 minutes.
Use Spot VMs instead of regular VMs when the application is fault tolerant and runs batch jobs or other work without high availability requirements, because Spot VMs offer significantly lower cost. Use regular VMs when the workload needs high availability, because Spot VMs use the same machine types, options, and performance as regular VMs but can be preemptively stopped or deleted to reclaim capacity.
Use Filestore when Linux virtual machines need shared NFS access, because it is high-performance fully managed NFS file storage where a regional instance is replicated synchronously across three zones in the region. Use Google Cloud NetApp Volumes when Windows failover clustering needs continuously available SMB storage, because it is fully managed NFS and SMB file storage that provides continuous availability SMB storage for a Microsoft SQL Server failover cluster instance.
Last updated