4 ms·
> it's theoretically possible to linearize a random write workload In fact OSes have been doing this for years now. Over a decade. There is a drawback howeve
by jandrese 7y ago
> it's theoretically possible to linearize a random write workload
In fact OSes have been doing this for years now. Over a decade. There is a drawback however. To make this work you need to buffer your writes in a cache, typically in volatile memory, so they can be sorted before being written to the drive. The larger the cache the more improvement you see (although there are diminishing returns on this), but also the more data you lose in the event of power loss or kernel crash. So it is a tradeoff between speed and resilience.
Interesting thought about how this changes for SSDs. While you don't have seek times to consider anymore, if you have two writes that happen to fall on the same block in the SSD it is a big win to combine them, so SSDs still want to buffer data and have to make the speed/resilience tradeoff.
- londons_explore 7y agoYou're talking about something else here. Linearized writes means write the data immediately, but rather than write the data to the 'correct' location on disk, just write the data immediately after the last bit of data you wrote. Then keep some accounting information elsewhere to map the real location of data to the place it would have been written had linearization not been done.
- jandrese 7y agoThat sounds awful from a fragmentation standpoint, but I guess it would be ok for write-mostly data. That metadata map would get pretty gnarly if you have a lot of interleaved writes though.