3 ms·
The difference is that file systems need a lot of “mechanical sympathy” to account for the many quirks inside syscalls and actual physical disks. There was a n
by fzeindl 3y ago
The difference is that file systems need a lot of “mechanical sympathy” to account for the many quirks inside syscalls and actual physical disks.
There was a nice video about how it is really hard to implement file systems because disks just don’t do what you expect.
Databases are a layer up and assume that they can at least write a blob somewhere and retrieve it with certain guarantees. Those guarantees are a thousand hacks in the file system implementation.
- aeyes 3y agoWhat database are we talking about? Oracle best runs on ASM which is basically it's own filesystem. And most journaling filesystems actually get in the way of databases which try to commit their own changelog to disk.
- jandrewrogers 3y agoMost non-trivial databases run on what is essentially their own purpose-built file system, bypassing many (or all) of the OS file services. Doing so is both higher performance and simpler than just going through the OS file system. Normal OS file systems are messy and complex because they are serving several unrelated and conflicting purposes simultaneously. A database file system has a fairly singular purpose and focused mission, and also doesn't have the massive legacy baggage of general purpose file systems, so there are fewer tradeoffs and edge cases to deal with. The more sophisticated the database kernel, the more the OS is treated like little more than a device driver.
- mr_toad 3y agoUnfortunately those mechanical sympathies related to spinning disks, and now we have SSDs that have to fake like they are spinning disks for file system compatibility and all the software that expects file systems to behave that way.