Persistence Layer: Data Volumes, Log Volumes, Savepoints & Redo Logs
An architectural deep dive into SAP HANA persistence mechanisms: write-ahead logging (WAL), log buffer flushing to /hana/log, cyclic savepoints flushing dirty memory pages to /hana/data every 5 minutes, and crash recovery mechanics.
Core Learning Objectives
- 1.Master the distinction between synchronous redo logging and asynchronous savepoints.
- 2.Understand how write-ahead logging (WAL) guarantees ACID durability in an in-memory database.
- 3.Trace the savepoint execution cycle and its phases (Prepare, Flush Dirty Pages, Close).
- 4.Learn how crash recovery reconstructs in-memory state after a sudden power loss or kernel panic.
Definition & Architectural Rationale
Technical Definition:
The SAP HANA Persistence Layer is the underlying disk subsystem responsible for ensuring transaction durability (ACID) by maintaining persistent data volumes (/hana/data) updated via periodic savepoints and write-ahead log volumes (/hana/log) updated synchronously on every transaction COMMIT.
Why this component exists:
RAM is volatile memory. If power fails or the operating system crashes, the entire contents of physical RAM vanish. The persistence layer guarantees that committed transactions are never lost (RPO = 0) and enables complete crash recovery upon restart.
Internal Working & Mechanics
Architecture Flow Diagram
Production SQL Diagnostics
Measures savepoint total time, dirty page write size, and critical blocking phase duration.
Key Diagnostic Columns
TOTAL_DURATION_SEC:Time taken to flush all dirty pages to diskCRITICAL_BLOCKING_MS:Brief phase that blocks transactions (should be < 500 ms)WRITE_THROUGHPUT_MB_S:Disk write bandwidth achieved on /hana/dataExpected Diagnostic Output
SAVEPOINT_START_TIME | TOTAL_DURATION_SEC | CRITICAL_BLOCKING_MS | FLUSHED_MB | WRITE_THROUGHPUT_MB_S | STATE --------------------------------------------------------------------------------------------------------- 2026-10-23 08:00:00 | 4.20 | 45.10 | 1240.50 | 295.35 | Done 2026-10-23 07:55:00 | 3.85 | 38.20 | 980.20 | 254.60 | Done
Troubleshooting & Root Cause Analysis
Production Best Practices & Operational Risks
Mandatory Best Practices
- Keep /hana/log on ultra-fast storage (NVMe / Enterprise SSD) with sub-millisecond commit latency.
- Never locate /hana/data and /hana/log on the same physical disks or LUNs; write-ahead logging and savepoint flushes will contend for I/O queues.