News for hackers. Stuff that matters.
Re:Building blobd: single-machine object store with sub-ms r... by rockwotj on Wednesday November 05, 2025 @03:18AM (#45820653)
> Direct I/O means no more fsync: no more complexity via background flushes and optimal scheduling of syncs. There's no kernel overhead from copying and coalescing. It essentially provides the performance, control, and simplicity of issuing raw 1:1 I/O requests.

Not true, you still need fsync in direct I/O to ensure durability in power loss situations. Some drives have write caches that means acknowledged writes live in non-volatile memory. So maybe the perf is wildly better because you’re sacrificing durability?

Re:Building blobd: single-machine object store with sub-ms r... by actionfromafar on Wednesday November 05, 2025 @06:24AM (#45821706)
You mean in volatile memory?
Re:Building blobd: single-machine object store with sub-ms r... by rockwotj on Wednesday November 05, 2025 @06:35AM (#45821758)
yes thanks
Re:Building blobd: single-machine object store with sub-ms r... by rrauch on Wednesday November 05, 2025 @06:33AM (#45821742)
Looks like the author is well aware:

  /// Even when using direct I/O, `fsync` is still necessary, as it ensures the device itself has flushed any internal caches.
  async fn sync(&self) {
    let (fut, fut_ctl) = SignalFuture::new();
    self.sender.send(Request::Sync { res: fut_ctl }).unwrap();
    fut.await
  }
Full code here:

https://github.com/wilsonzlin/blobd/blob/master/libblobd-dir...