When you create a Cloud SQL instance, you choose whether it stores data on solid-state drives (SSD) or hard disk drives (HDD):
- SSD storage is the most efficient and cost-effective choice for most use cases.
- HDD storage is sometimes appropriate for large datasets (>10 TB) that are not latency-sensitive or are infrequently accessed.
Regardless of which type of storage you choose, your data is stored on a distributed, replicated file system that spans across many physical drives.
The guidelines on this page can help you choose between SSD and HDD.
When in doubt, choose SSD storage
There are several reasons why it's best to use SSD storage for your Cloud SQL instance:
- SSD is faster and has more predictable performance than HDD.
- HDD throughput is much more limited than SSD throughput.
- Individual row reads on HDD are slow. Because of disk seek time, HDD storage supports only 5% of the read rows per second of SSD storage. Large multi-row scans, however, are not as adversely impacted.
- The cost savings from HDD are minimal, unless you're storing large amounts of data. Consider using HDD storage if you're storing at least 10 TB of data.
Use cases for HDD storage
HDD storage is suitable for use cases that meet the following criteria:
- You expect to store at least 10 TB of data.
- You do not use the data to back a user-facing or latency-sensitive application.
Your workload falls into one of the following categories:
- Batch workloads with scans and writes, and no more than occasional random reads of a few rows.
- Data archival, where you write large amounts of data and rarely read that data.
For example, if you plan to store extensive historical data for a large number of remote-sensing devices and then use the data to generate daily reports, the cost savings for HDD storage might justify the performance tradeoff. On the other hand, if you plan to use the data to display a real-time dashboard, it probably would not make sense to use HDD storage—reads would be much more frequent in this case, and reads are much slower with HDD storage.
Switch between SSD and HDD storage
When you create a Cloud SQL instance, your choice of SSD or HDD storage for the instance is permanent.
If you need to convert an existing HDD instance to SSD, or conversely, you can export the data from the existing instance and import the data into a new instance. Keep in mind that migrating an entire instance takes time.
What's next
Create an instance with SSD or HDD storage.