DatabricksCarlota SotoExplainer
Built on object storage, served from cache
Summary
The common argument that Postgres on object storage must be slow assumes queries always read from object storage, but Lakebase Postgres almost never does. Production data shows the compute’s local cache serves 99.46% of page accesses, pageserver NVMe serves 0.54%, and object storage handles only about 39 requests per second. The architecture uses tiered caching: every tier caches what it fetches from the tier below, so the cost of a deeper tier is paid once. Pageservers organize data into image and delta layer files, keeping replay chains short—p90 deltas applied per read is under one. This design gives Lakebase Postgres the durability and cheap storage of object storage while keeping object storage off the critical path for active queries.
Context
The post addresses the common argument that Postgres on object storage must be slow because object storage has higher latency than local storage. It presents production data from Lakebase Postgres showing that 99.46% of page reads are served from the compute node’s local cache, 0.54% from pageserver NVMe, and only about 0.00001% reach object storage. The architecture uses tiered caching and image layers to keep replay chains short, ensuring object storage is not in the critical path for active queries.
Approach / What changed
Lakebase Postgres decouples compute and storage: compute nodes cache hot pages locally; pageservers serve reads from local NVMe using an LSM tree of image and delta layer files; object storage holds immutable history and is only accessed when pageservers lack the required layers, which occurs for roughly 39 requests per second out of over 1.1 billion total page accesses.
Takeaways
In Lakebase Postgres, 99.46% of page reads are served from the compute node’s local cache, at memory or microsecond-level latency, without leaving the compute node.
Only about 1 in 28 million page accesses requires a fetch from object storage; the rest are served from local NVMe on pageservers or compute caches.
Pageservers use image and delta layer files to keep replay chains short; with eager image creation, p90 deltas applied per GetPage read is under one.
FAQ
How often does Lakebase Postgres actually read from object storage?
Only about 1 in 28 million page accesses needs a fetch from object storage. In production, that amounts to roughly 39 requests per second out of over 1.1 billion total page accesses.
How does the pageserver avoid replaying long WAL chains?
The pageserver organizes data into image layers (snapshots of all pages at one LSN) and delta layers (WAL records across a range of LSNs). To answer a read, it finds the nearest image layer and replays only the relevant deltas on top. With eager image creation, p99 deltas applied per read is around 6, and p90 is under 1.
What scenarios cause reads to reach object storage?
The two main cases are branches or restores at old points in time, where history may not be on pageserver NVMe, and inactive databases waking up after scaling to zero for weeks. In both cases, only the first reads pay the cost; subsequent reads are cached in faster tiers.
Source and freshness
- Source
- databricks.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.