[HN Gopher] The Secret Life of Fsync
       ___________________________________________________________________
        
       The Secret Life of Fsync
        
       Author : todsacerdoti
       Score  : 19 points
       Date   : 2023-04-01 12:40 UTC (1 days ago)
        
 (HTM) web link (puzpuzpuz.dev)
 (TXT) w3m dump (puzpuzpuz.dev)
        
       | hardwaresofton wrote:
       | Actually ran into this while doing some experiments with ZFS &
       | Postgres, some non-enterprise drives will pretend they wrote data
       | when they didn't and you can corrupt a even a rock-steady
       | database like Postgres.
       | 
       | If you're not afraid to lose some perf, you can disable volatile
       | write cache on your non enterprise drive:
       | 
       | https://vadosware.io/post/everything-ive-seen-on-optimizing-...
        
       | pyrolistical wrote:
       | Feels like this doesn't actually answer the question? The
       | hardware can still lie and say it was flushed so it benchmarks
       | better.
       | 
       | Would need to do real world test and yank the power after fsync.
       | This https://news.ycombinator.com/item?id=10552218 article did
       | just that. But unfortunately we would need this tested against
       | all drive models/manufacturers
        
         | emmelaich wrote:
         | That's all covered in the last sentence.
         | 
         | It addresses the main question well; is there a way to instruct
         | the disk to flush its cache and is it used by fsync? Yes and
         | yes.
        
       ___________________________________________________________________
       (page generated 2023-04-02 23:00 UTC)