Databases 5 min read

How Google Spanner’s New Hierarchical Storage Cuts Costs with HDD Tiering

Google Cloud Spanner now offers a policy‑driven hierarchical storage tier that moves infrequently accessed data to cheap HDDs, reducing costs by up to 80% while keeping SQL queries seamless across SSD and HDD layers and preserving backup consistency.

21CTO
21CTO
21CTO
How Google Spanner’s New Hierarchical Storage Cuts Costs with HDD Tiering
图片
图片

Google recently added hierarchical storage to its Cloud Spanner distributed SQL database.

This new storage tier uses a cheaper HDD option, about 80% less expensive than SSD, to lower costs for older data while minimizing migration overhead.

While the default SSD tier targets high‑throughput, low‑latency workloads, the HDD tier is intended for infrequently accessed or latency‑insensitive large datasets. The tiering is policy‑driven; an asynchronous background process moves data from SSD to HDD based on user‑defined policies, and SQL queries can access data in both tiers with consistent backup policies.

Google’s team notes that most database records lose operational value over time while their reporting and compliance importance grows, so “cold” data doesn’t need the same high‑performance access as “hot” transactional data, encouraging cost‑effective historical storage.

Engineers Matthew Muckloo and product manager Piyush Mathur explain that migrating data between storage types usually requires complex pipelines and can affect OS performance; manual separation can cause read inconsistencies and add governance overhead.

Spanner now allows storage‑tiering policies at the database, table, column, or secondary‑index level, enabling selective movement of rarely accessed data (e.g., JSON product attributes) to HDD while keeping indexes on SSD.

To enable hierarchical storage, create a locality group with storage options and define ssd_to_hdd_spill_timespan to specify how long data stays on SSD before spilling to HDD.

CREATE LOCALITY GROUP recent_on_ssd OPTIONS (storage = 'ssd', ssd_to_hdd_spill_timespan = '15d');

The spill policy requires data to remain on SSD for at least one hour before moving.

Other cloud databases, such as Amazon DynamoDB, also offer tiered storage classes, though DynamoDB hides the underlying technology.

Spanner’s hierarchical storage supports both GoogleSQL and PostgreSQL dialects and is available in all Google Cloud regions, with HDD usage monitorable via System Insights.

Source: Google Official Blog
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cost OptimizationDistributed SQLGoogle CloudHierarchical StorageSpannerHDD Tiering
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.