Mehdi Akiki

Posts tagged "databases"

  • Published on

    Investigation · Part 20 of 20 · What survives a crash

    Testing Crash Recovery: What kill -9, Fault Injection and Simulation Each Catch

    I tested my key-value store and four versions with one bug each, using kill -9, fault injection, crash simulation and damaged files. Each method found some bugs and missed others, and one bug was invisible to all three crash methods. The table, the real tools, and a look back.
  • Published on

    Investigation · Part 18 of 20 · What survives a crash

    Checksums: Catching Corruption the Disk Did Not Report

    I flipped one bit in four files. My log's CRC caught it and then threw away nine good records, SQLite returned the changed value and its integrity check said ok, gzip reported a CRC error, and the text file changed silently. Where checksums belong, and what ext4 checks itself.
  • Published on

    Investigation · Part 17 of 20 · What survives a crash

    Writing Through mmap: Who Decides When Data Reaches the Disk

    I changed 64 MiB of a file without one write call, through a shared memory mapping. The pages became dirty like in the first part, kill -9 kept them, msync or fsync made them durable, and a truncated file killed my program with SIGBUS. The kernel decides the rest.
  • Published on

    Investigation · Part 16 of 20 · What survives a crash

    Group Commit: How Databases Make fsync Cheaper

    With every writer syncing alone, my laptop made about 1,800 records per second durable, with 1 or 16 writers. With group commit, one fdatasync for all waiting records, 16 writers reached 15,822. A small delay before the sync helped 16 writers and hurt one, as PostgreSQL documents.