Compute Engine offers several types of storage options for your instances. Each of the following storage options has unique price and performance characteristics: Show
If you are not sure which option to use, the most common solution is to add a persistent disk to your instance. IntroductionBy default, each Compute Engine instance has a single boot persistent disk (PD) that contains the operating system. When your apps require additional storage space, you can add one or more additional storage options to your instance. For cost comparisons, see disk pricing.
* If you are considering creating a logical volume larger than 64 TB, see logical volume size to know how a larger volume size impacts performance. ** The capacity increment for local SSDs depends on the number of SSD disks (partitions) allowed per VM, which varies for each machine type. For more
information, see Local SSDs and machine types. In addition to the storage options that Google Cloud provides, you can deploy alternative storage solutions on your instances.
Block storage resources have different performance characteristics. Consider your storage size and performance requirements to help you determine the correct block storage type for your instances.
Persistent disks created in multi-writer mode have specific IOPS and throughput limits. See performance of persistent disks in multi-writer mode for details. Persistent disksPersistent disks are durable network storage devices that your instances can access like physical disks in a desktop or a server. The data on each persistent disk is distributed across several physical disks. Compute Engine manages the physical disks and the data distribution for you to ensure redundancy and optimal performance. Persistent disks are located independently from your virtual machine (VM) instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements. Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics. Add a persistent disk to your instance Disk typesWhen you configure a persistent disk, you can select one of the following disk types.
If you
create a disk in the Google Cloud console, the default disk type is The following table shows disk type and machine type support for zonal persistent disks.
The following table shows disk type and machine type support for regional persistent disks:
DurabilityDisk durability represents the probability of data loss, by design, for a typical disk in a typical year, using a set of assumptions about hardware failures, the likelihood of catastrophic events, isolation practices and engineering processes in Google data centers, and the internal encodings used by each disk type. Persistent disk data loss events are extremely rare and have historically been the result of coordinated hardware failures, software bugs, or a combination of the two. Google also takes many steps to mitigate the industry-wide risk of silent data corruption. Human error by a Google Cloud customer, such as when a customer accidentally deletes a disk, is outside the scope of persistent disk durability. There is a very small risk of data loss occurring with a regional persistent disk due to its internal data encodings and replication. Regional persistent disks provide twice as many replicas as zonal persistent disks, with their replicas distributed between two zones in the same region, so they provide high availability and can be used for disaster recovery if an entire data center is lost and cannot be recovered (although that has never happened). The additional replicas in a second zone can be accessed immediately if a primary zone becomes unavailable during a long outage. Note that durability is in the aggregate for each disk type, and does not represent a financially-backed service level agreement (SLA). The table below shows durability for each disk type's design. 99.999% durability means that with 1,000 disks, you would likely go a hundred years without losing a single one.
Zonal persistent disksEase of useCompute Engine handles most disk management tasks for you so that you do not need to deal with partitioning, redundant disk arrays, or subvolume management. Generally, you don't need to create larger logical volumes, but you can extend your secondary attached persistent disk capacity to 257 TB per instance and apply these practices to your persistent disks if you want. You can save time and get the best performance if you format your persistent disks with a single file system and no partition tables. If you need to separate your data into multiple unique volumes, create additional disks rather than dividing your existing disks into multiple partitions. When you require additional space on your persistent disks, resize your disks rather than repartitioning and formatting. PerformancePersistent disk performance is predictable and scales linearly with provisioned capacity until the limits for an instance's provisioned vCPUs are reached. For more information about performance scaling limits and optimization, see Configure disks to meet performance requirements. Standard persistent disks are efficient and economical for handling sequential read/write operations, but they aren't optimized to handle high rates of random input/output operations per second (IOPS). If your apps require high rates of random IOPS, use SSD or extreme persistent disks. SSD persistent disks are designed for single-digit millisecond latencies. Observed latency is application specific. Compute Engine optimizes performance and scaling on persistent disks automatically. You don't need to stripe multiple disks together or pre-warm disks to get the best performance. When you need more disk space or better performance, resize your disks and possibly add more vCPUs to add more storage space, throughput, and IOPS. Persistent disk performance is based on the total persistent disk capacity attached to an instance and the number of vCPUs that the instance has. For boot devices, you can reduce costs by using a standard persistent disk. Small, 10 GB persistent disks can work for basic boot and package management use cases. However, to ensure consistent performance for more general use of the boot device, use a balanced persistent disk as your boot disk. Each persistent disk write operation contributes to the cumulative network egress traffic for your instance. This means that persistent disk write operations are capped by the network egress cap for your instance. ReliabilityPersistent disks have built-in redundancy to protect your data against equipment failure and to ensure data availability through datacenter maintenance events. Checksums are calculated for all persistent disk operations, so we can ensure that what you read is what you wrote. Additionally, you can create snapshots of persistent disks to protect against data loss due to user error. Snapshots are incremental, and take only minutes to create even if you snapshot disks that are attached to running instances. Multi-writer modeYou can attach an SSD persistent disk in multi-writer mode to up to two N2 VMs simultaneously so that both VMs can read and write to the disk. Persistent disks in multi-writer mode provide a shared block storage capability and present an infrastructural foundation for building distributed Network File System (NFS) and similar highly available services. However, persistent disks with multi-writer mode require specialized file systems such as GlusterFS or GFS2. Many file systems such as EXT4, XFS, and NTFS are not designed to be used with shared block storage. For more information about the best practices when sharing persistent disks between VMs, see Best practices. If you require a fully managed file storage, you can mount a Filestore file share on your Compute Engine VMs. To enable multi-writer mode for new persistent disks, create a new persistent disk and specify the Persistent disk encryptionCompute Engine automatically encrypts your data before it travels outside of your instance to persistent disk storage space. Each persistent disk remains encrypted either with system-defined keys or with customer-supplied keys. Google distributes persistent disk data across multiple physical disks in a manner that users do not control. When you delete a persistent disk, Google discards the cipher keys, rendering the data irretrievable. This process is irreversible. If you want to control the encryption keys that are used to encrypt your data, create your disks with your own encryption keys. Restrictions
Regional persistent disksRegional persistent disks have storage qualities that are similar to zonal persistent disks. However, regional persistent disks provide durable storage and replication of data between two zones in the same region. If you are designing robust systems or high availability services on Compute Engine, use regional persistent disks combined with other best practices such as backing up your data using snapshots. Regional persistent disks are also designed to work with regional managed instance groups. In the unlikely event of a zonal outage, you can usually failover your workload running on regional persistent disks to another zone by using the PerformanceRegional persistent disks are designed for workloads that require a lower Recovery Point Objective (RPO) and Recovery Time Objective (RTO) compared to using persistent disk snapshots. Regional persistent disks are an option when write performance is less critical than data redundancy across multiple zones. Like zonal persistent disks, regional persistent disks can achieve greater IOPS and throughput performance on instances with a greater number of vCPUs. For more information about this and other limitations, see Configure disks to meet performance requirements. When you need more disk space or better performance, you can resize your regional disks to add more storage space, throughput, and IOPS. ReliabilityCompute Engine replicates data of your regional persistent disk to the zones you selected when you created your disks. The data of each replica is spread across multiple physical machines within the zone to ensure redundancy. Similar to zonal persistent disks, you can create snapshots of persistent disks to protect against data loss due to user error. Snapshots are incremental, and take only minutes to create even if you snapshot disks that are attached to running instances. Restrictions
Local SSDsLocal SSDs are physically attached to the server that hosts your VM instance. Local SSDs have higher throughput and lower latency than standard persistent disks or SSD persistent disks. The data that you store on a local SSD persists only until the instance is stopped or deleted. Each local SSD is 375 GB in size, but you can attach a maximum of 24 local SSD partitions for a total of 9 TB per instance. Create an instance with Local SSDs when you need a fast scratch disk or cache and don't want to use instance memory. Create an instance with Local SSDs PerformanceLocal SSDs are designed to offer very high IOPS and low latency. Unlike persistent disks, you must manage the striping on local SSDs yourself. Combine multiple local SSD partitions into a single logical volume to achieve the best local SSD performance per instance, or format local SSD partitions individually. Local SSD performance depends on which interface you select. Local SSDs are available through both SCSI and NVMe interfaces. The following table provides an overview of local SSD capacity and estimated performance using NVMe. To reach maximum performance limits with an N1 machine type, use 32 or more vCPUs. To reach maximum performance limits on an N2 and N2D machine type, use 24 or more vCPUs.
For more information, see Local SSD performance and Optimizing Local SSD performance. Local SSD encryptionCompute Engine automatically encrypts your data when it is written to local SSD storage space. You can't use customer-supplied encryption keys with local SSDs. Data persistence on Local SSDsPlease read Local SSD data persistence to learn what events preserve your Local SSD data and what events can cause your Local SSD data to be unrecoverable. General limitations
Local SSDs and machine typesYou can attach Local SSDs to most machine types available on Compute Engine, unless otherwise noted. However, there are constraints around how many local SSDs you can attach based on each machine type:
Local SSDs and preemptible VM instancesYou can start a preemptible VM instance with a local SSD and Compute Engine charges you discounted spot prices for the local SSD usage . Local SSDs attached to preemptible instances work like normal local SSDs, retain the same data persistence characteristics, and remain attached for the life of the instance. Compute Engine doesn't charge you for local SSDs if their instances are preempted in the first minute after they start running. For more information about local SSDs, see Adding local SSDs. Reserving Local SSDs with committed use discountsTo reserve Local SSD resources in a specific zone, see Reserving zonal resources. Reservations are required for committed-use pricing for Local SSDs. Cloud Storage bucketsCloud Storage buckets are the most flexible, scalable, and durable storage option for your VM instances. If your apps don't require the lower latency of Persistent Disks and local SSDs, you can store your data in a Cloud Storage bucket. Connect your instance to a Cloud Storage bucket when latency and throughput aren't a priority and when you must share data easily between multiple instances or zones. PerformanceThe performance of Cloud Storage buckets depends on the storage class that you select and the location of the bucket relative to your instance. The standard storage class used in the same location as your instance gives performance that is comparable to persistent disks but with higher latency and less consistent throughput characteristics. The standard storage class used in a multiregional location stores your data redundantly across at least two regions within a larger multiregional location. Nearline and coldline storage classes are primarily for long-term data archival. Unlike the standard storage class, these archival classes have minimum storage durations and read charges. Consequently, they are best for long-term storage of data that is accessed infrequently. ReliabilityAll Cloud Storage buckets have built-in redundancy to protect your data against equipment failure and to ensure data availability through datacenter maintenance events. Checksums are calculated for all Cloud Storage operations to help ensure that what you read is what you wrote. FlexibilityUnlike persistent disks, Cloud Storage buckets aren't restricted to the zone where your instance is located. Additionally, you can read and write data to a bucket from multiple instances simultaneously. For example, you can configure instances in multiple zones to read and write data in the same bucket rather than replicate the data to persistent disks in multiple zones. Cloud Storage encryptionCompute Engine automatically encrypts your data before it travels outside of your instance to Cloud Storage buckets. You don't need to encrypt files on your instances before you write them to a bucket. Just like persistent disks, you can encrypt buckets with your own encryption keys. Writing and reading data from Cloud Storage bucketsWrite and read files from Cloud Storage buckets by using the By default, the Connect to an instance. Go to VM instances If you have never used gcloud init Alternatively, if your instance is configured to use a service account with a Cloud Storage scope, you can skip this step. Use the Optionally, you can also stream data to Cloud Storage. APIIf you configured your instance to use a service account with a Cloud Storage scope, you can use the Cloud Storage API to write and read data from Cloud Storage buckets.
What's next
Try it for yourselfIf you're new to Google Cloud, create an account to evaluate how Compute Engine performs in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads. Try Compute Engine free Which of the following is the appropriate cloud service type for a software development environment?PaaS solutions are used mostly by software developers. PaaS provides an environment for developing, testing, and managing applications. PaaS is therefore the perfect choice for software development companies.
Which of the following are characteristics of a VoIP gateway?VoIP gateways include the following features: Call routing, packetization and control signaling management. Voice and fax compression/decompression. External controller interfaces, for example to a softswitch, billing system or network management system.
Which type of DNS record must be created to be able to send and receive Internet email?A DNS 'mail exchange' (MX) record directs email to a mail server. The MX record indicates how email messages should be routed in accordance with the Simple Mail Transfer Protocol (SMTP, the standard protocol for all email). Like CNAME records, an MX record must always point to another domain.
Which network communication characteristics is determined at the transport layer of the OSI model?The fourth layer of the OSI model ensures complete and reliable delivery of data packets. The transport layer provides mechanisms such as error control, flow control, and congestion control to keep track of the data packets, check for errors and duplication, and resend the information that fails delivery.
|