| ▲ | duped 3 days ago | ||||||||||||||||
I shudder to think about the impact of concurrent data structures fsync'ing on every write because the programmer can't reason about whether the data is in memory where a handful of atomic fences/barriers are enough to reason about the correctness of the operations, or on disk where those operations simply do not exist. Also linear regions make a ton of sense for disk, and not just for performance. WAL-based systems are the cornerstone of many databases and require the ability to reserve linear regions. | |||||||||||||||||
| ▲ | inkyoto 3 days ago | parent | next [-] | ||||||||||||||||
Linear regions are mostly a figment of imagination in real life, but they are a convenient abstraction and a concept. Linear regions are nearly impossible to guarantee, unless the underlying hardware has specific, controller-level provisions.
The only practical way I can think of to ensure the guaranteed contiguous allocation of blocks unfortunately involves a conventional hard drive that has a dedicated partition created just for the WAL. In fact, this is how Oracle installation worked – it required a dedicated raw device to bypass both the VMM and the file system.When RAM and disk(s) are logically the same concept, WAL can be treated as an object of the «WAL» type with certain properties specific to this object type only to support WAL peculiarities. | |||||||||||||||||
| |||||||||||||||||
| ▲ | adgjlsfhk1 3 days ago | parent | prev [-] | ||||||||||||||||
otoh, WAL systems are only necessary because storage devices present an interface of linear regions. the WAL system could move into the hardware. | |||||||||||||||||