Diagram of a write‑ahead log buffer being flushed to disk.

Why Write-Ahead Logging Outperforms Direct Disk Updates

Write-Ahead Logging (WAL) dramatically improves performance and durability by turning many small disk writes into sequential batches, while also simplifying crash recovery compared to direct updates.

May 15, 2026 · 7 min · 1399 words · martinuke0
Illustration comparing B‑Tree nodes and LSM Tree levels.

Memory Management Tradeoffs: B‑Trees vs. LSM Trees

A deep dive into the memory management trade‑offs between B‑Trees and LSM Trees, with practical guidance for database developers.

May 14, 2026 · 8 min · 1492 words · martinuke0
Illustration of a B‑tree node being duplicated for a snapshot.

Why Copy-on-Write B-Trees Enable Atomic Database Snapshots

Copy‑on‑write B‑trees let databases capture point‑in‑time snapshots without blocking writers, enabling true atomic reads and fast recovery.

May 13, 2026 · 6 min · 1215 words · martinuke0
Diagram of an LSM‑Tree with multiple levels and compaction.

Implementing Log-Structured Merge-Trees for High-Throughput Write-Intensive Distributed Storage Systems

A deep dive into LSM‑Tree design for write‑heavy distributed storage, covering data flow, compaction strategies, consistency, and real‑world deployment tips.

May 13, 2026 · 6 min · 1178 words · martinuke0

Understanding Delayed Allocation: Theory, Practice, and Performance

Table of Contents Introduction What Is Delayed Allocation? 2.1 Historical Context 2.2 Core Principle How Modern Filesystems Implement Delayed Allocation 3.1 ext4 3.2 XFS 3.3 btrfs & ZFS Benefits of Delayed Allocation 4.1 Write Aggregation & Throughput 4.2 Reduced Fragmentation 4.3 Improved SSD Longevity Risks, Edge Cases, and Data‑Loss Scenarios Tuning Delayed Allocation on Linux 6.1 Mount Options 6.2 sysctl Parameters 6.3 Application‑Level Strategies Practical Examples 7.1 Benchmarking Write Patterns with dd 7.2 C Program Demonstrating posix_fallocate vs. Delayed Allocation 7.3 Monitoring with iostat and blktrace Real‑World Use Cases 8.1 Databases (MySQL, PostgreSQL) 8.2 Virtual Machines & Containers 8.3 Log‑Heavy Applications Comparing Delayed Allocation to Other Allocation Strategies Debugging & Troubleshooting 11 Best Practices Checklist 12 Future Directions and Emerging Trends 13 Conclusion 14 Resources Introduction When a program writes data to a file, the operating system must decide where on the storage medium to place those bytes. Historically, the kernel performed this decision immediately, allocating disk blocks as soon as the first write() call arrived. While simple, that approach often leads to sub‑optimal performance: many tiny allocations, fragmented files, and excessive I/O traffic. ...

April 1, 2026 · 16 min · 3235 words · martinuke0
Feedback