Mehdi Akiki

Writing archive

Everything published under Writing, newest first. Each entry is labelled as part of an investigation, an article or reference. Short engineering notes have their own archive.

  • Published on

    Investigation · Part 4 of 20 · When the benchmark lies

    Why the First Run Is Slower

    The first iteration of my loop took 145 microseconds and the steady state 12. I separated the causes I could show on my laptop: page faults, cold caches, a pause of 300 ms, lazy binding in C, and the start of the process itself.
  • Published on

    Investigation · Part 4 of 20 · What survives a crash

    Why the Directory Needs fsync Too

    fsync of a new file does not promise that its name is on the disk. I measured directory fsync on ext4: half a microsecond after a file fsync, about 420 microseconds after a rename, and alone it made the name durable while the data stayed in RAM.
  • Published on

    Article · Interrupted execution

    Cancellation Safety in Async Rust, Explained

    Async cancellation usually means dropping a future after Pending. See how select loops lose partial progress and how to design restartable operations.