Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would agree that calling ext3 obsolete is odd, but I don't know enough about the particulars of file system performance to understand why data=ordered is or is not problematic. This leads to the interesting problem of judging the opinion of several contradicting, but apparently similarly qualified people. I'm sure someone on HN is able to decisively explain: can someone do so?


Originally, ext3 filesystems maintained journals of all metadata and data changes. This substantially decreases the likelihood of the filesystem ending up in an irrecoverably inconsistent state, but it also has major performance implications.

Relatively early on ext3 was extended with "data=ordered" and "data=writeback" modes (with "data=ordered" being the default and recommended mode, as "data=writeback" is marginally faster but offers few consistency guarantees). In these modes only metadata changes are committed to the journal.

In "data=ordered" mode the filesystem attempts to guarantee that data will actually be written to the disk (not merely cached) before any related metadata writes occur, as opposed to caching and writing all data according to an outside schedule. Obviously, this also has certain implications for write performance.

I would say that Firefox was incontrovertibly broken in this case, but my views on the adoption of ext4 would probably be considered rather conservative. Regardless, ext3 isn't going away any time soon so this fix will be appreciated.


Ah, I gather firefox assumed that it could write to a given file repeatedly and it would just stay in the cache. Thanks for the explanation.


Not quite, though that's part of what the problem was. There's a mechanism (fsync) for forcing the changes in a particular file to be written to disk. As a result of the consistency guarantees made by the "data=ordered" mode, synchronizing a single file often forces the filesystem to make other, unrelated writes to the disk as well. In the worst case the entire cache can be forced to disk. The end result is substantially more disk activity than would be expected.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: