Persistent disks are durable network storage devices that the instances can access like physical disks in a desktop or a server.
Data on each persistent disk is distributed across several physical disks.
Compute Engine manages the physical disks and the data distribution to ensure redundancy and optimal performance.
Persistent disks are located independently from the VM instances and can be detached or moved to keep the data even after the instance is deleted
Persistent disk performance scales automatically with size, so they can be resized or additional ones added to meet the performance and storage space requirements.
Persistent Disk Types
Standard persistent disks (pd-standard) are backed by standard hard disk drives (HDD).
Balanced persistent disks (pd-balanced) are backed by solid-state drives (SSD). They are an alternative to SSD persistent disks that balance performance and cost.
SSD persistent disks (pd-ssd) are backed by solid-state drives (SSD).
Zonal Persistent Disks
Zonal persistent disks provide durable storage and replication of data within a single zone in a region.
Persistent disks have built-in redundancy to protect the data against equipment failure and to ensure data availability through datacenter maintenance events.
For additional space on the persistent disks, resize the disks and resize the single file system rather than repartitioning and formatting.
Compute Engine automatically encrypts the data in transit, before it travels outside of the instance to persistent disk storage space.
Zonal persistent disk remains encrypted either with system-defined keys or with customer-supplied keys.
Regional Persistent Disks
Regional persistent disks provide durable storage and replication of data between two zones in the same region.
Regional persistent disks are also designed to work with regional managed instance groups.
Zonal outage can be handled by force attaching the disk to the standby instance, even if the disk can’t be detached from the original VM
Regional persistent disks are designed for
workloads that require a lower RPO and RTO compared to using persistent disk snapshots.
write performance is less critical than data redundancy across multiple zones.
Regional persistent disks cannot be used with memory-optimized machines and compute-optimized machines.
Local SSDs are physically attached to the server that hosts the VM instance.
Local SSDs have higher throughput and lower latency than standard persistent disks or SSD persistent disks.
Data stored on a local SSD persists only until the instance is stopped or deleted.
Local SSDs performance gains require certain trade-offs in availability, durability, and flexibility. Because of these trade-offs, Local SSD storage isn’t automatically replicated and all data on the local SSD might be lost if the instance terminates for any reason.
Each local SSD is 375 GB in size, but a maximum of 24 local SSD partitions can be attached for a total of 9 TB per instance.
Compute Engine automatically encrypts the data when it is written to local SSD storage space. Customer-supplied encryption keys is not supported with local SSDs.
Cloud Storage Buckets
Cloud Storage buckets are the most flexible, scalable, and durable storage option for the VM instances.
Cloud Storage is ideal if you don’t require the lower latency of Persistent Disks and Local SSDs, and can store the data in a Cloud Storage bucket.
Performance of Cloud Storage depends on the selected storage class
Standard storage class used in the same location as the instance gives performance that is comparable to persistent disks but with higher latency and less consistent throughput characteristics.
Cloud Storage buckets have built-in redundancy to protect the data against equipment failure and to ensure data availability through datacenter maintenance events
Cloud Storage buckets aren’t restricted to the zone where the instance is located. Multiregional Cloud Storage buckets stores the data redundantly across at least two regions within a larger multiregional location.
Cloud Storage bucket can be mounted on the instance as file system
Cloud Storage allows read and write data to a bucket from multiple instances simultaneously.
However, Cloud Storage buckets are object stores that don’t have the same write constraints as a POSIX file system and can’t be used as boot disks. Multiple instances working on the same file can lead to overwritten data.
Cloud Storage supports both encryption at rest and in transit.