Aren't you essentially writing the same data twice, to the disk? Doesn't this cause a slowdown of a factor of ~2x?What optimizations can be made to minimize the cost of having to write things twice?
Filesystems that use logging: If you're writing the data in the log (on disk), and in the actual locations themselves (also on disk) then...?
logging;file systems
Yes, you are writing the same data twice. That is precisely the point of a journaling file system. They are intended for reliability over performance. By using write-ahead logging, they (virtually) eliminate any risk of data corruption, because if the system crashes in the middle of a data write, they can just replay the log and recover accordingly.The best alternative I'm aware of that offers better performance is copy on write, which is sort of an immutable file system. It never updates in-place; instead, it writes out the new data to a new area of the disk, and only after that's been successful does it update the metadata and point new requests to the new data.  This has better performance characteristics but is also more prone to fragmentation and requires a lot of extra capacity (especially if you're writing a huge file).If there are other techniques that have the same reliability characteristics, then I don't think that any of them are in very common use today. Mostly you just see journaling and COW.