https://bugs.kde.org/show_bug.cgi?id=187172
--- Comment #47 from Kai Krakow <k...@kaishome.de> --- (In reply to Martin Steigerwald from comment #46) > Nowadays where Ext3 should not be in wide use anymore, if at all, and > nowadays where many people use flash based storage, I am strongly for just > making sure to sync where needed. > > That written, I did not see any truncated config file since ages. I still > have "KDE_EXTRA_FSYNC=1" set, but whether this actually really makes a > difference, given some of the comments above, I do not know. Anyway, I'd > just sync by default. It really can't be a performance issue anymore – > except maybe on embedded device with some slow SD card –, especially as > unchanged files are not rewritten anymore. If I remember correctly, you may be using btrfs. On btrfs, this is actually not needed, it works fine without fsync and is actually faster that way no matter the storage technology. I'm running with `KDE_EXTRA_FSYNC=0` since years on btrfs and never had a problem. I suggest that the behavior is kept to optionally disable fsync/fdatasync, but it should befault to "on". The problem is with file systems which do not commit metadata and data properly in a single transaction or in expected order, e.g. xfs does this and writes data lazily or delayed. In that case, xfs ensures that you do not see stale or old data after a crash by zeroing or truncating the affected files. I think ext3/ext4 does something similar unless you use its full journal mode (which is a lot slower, ofc), where xfs probably behaves like ext4 with "journal=writeback". Especially with btrfs, the argument is not whether it's on flash or spinning disks: fsync/fdatasync can significantly slow the system down because btrfs may have a rather long list of outstanding transactions it would have to write then (blocking) until reaching the transaction affected by the sync. This can take a long time and blocks the system even on flash disks. So if this discussion is about whether we should remove `KDE_EXTRA_FSYNC`, I'd rather not have it force-enabled, especially because KDE seems to be very busy with its config files and reads and writes them a lot (similar to the cache directory). IMHO, the variable could be changed to require `KDE_DISABLE_EXTRA_FSYNC=this_is_dangerous_and_I_know_what_I_am_doing`. This may make it more obvious to people who blindly follow some internet guides to "make things faster" that they may be doing something harmful. -- You are receiving this mail because: You are watching all bug changes.