fsync Reliability Issues

Cluster focuses on discussions about fsync's behavior across OSes, particularly how it may not guarantee data durability due to lying caches, filesystem options, drive controllers, and related bugs or workarounds like NCQ and write barriers.

➡️ Stable 0.5x DevOps & Infrastructure
2,504
Comments
20
Years Active
5
Top Authors
#8436
Topic ID

Activity Over Time

2007
2
2008
5
2009
13
2010
30
2011
70
2012
47
2013
71
2014
117
2015
114
2016
185
2017
103
2018
115
2019
238
2020
171
2021
150
2022
331
2023
270
2024
171
2025
282
2026
19

Keywords

e.g FACT FSYNC RAID EDIT NCQ twitter.com TCQ FWIW RDBMS fsync disk filesystem sync flush data file cache nvme buffers

Sample Comments

packetlost Dec 20, 2025 View on HN

fsync on most OSes lie to some degree

jamesaguilar May 23, 2013 View on HN

Not sure, but there are references to proven incidents of fsync bugs in the docs. If you get that wrong, it is not hard to believe that the buffer cache could be wrong too.

acchow Feb 17, 2022 View on HN

Do you mean on Linux that calling fsync might not actually flush to the drive?

mamcx Sep 14, 2025 View on HN

Also, the weird `fsync` behaviors is not part of it?

dang Jul 25, 2025 View on HN

Related:The secret life of fsync - https://news.ycombinator.com/item?id=35399818 - April 2023 (62 comments)

mnd999 Feb 21, 2023 View on HN

Isn’t that only because they cheat and make fsync an noop though?

01HNNWZ0MV43FF Jun 24, 2024 View on HN

If the drive controllers don't lie about fsync, then maybe?

Badfood Jan 30, 2021 View on HN

I didn't realise fsync syncs the whole fs. This explains some write cache issues I've been having writing real-time data streams to sometimes slow SD cards. This change would solve my problems rather than create problems. But hey now I can fix it anyway

lisper Dec 13, 2015 View on HN

FSYNC is not enough. You also have to make sure that NCQ is disabled:https://en.wikipedia.org/wiki/Native_Command_Queuing

koolba Jun 21, 2022 View on HN

Hopefully there’s an fsync as well.