HACKER Q&A
📣 efdwefwfwerf

Linux: Controlling files spans on a HDD/SDD


I'm reading a paper on LSM (log structured merge files) and related LDS files. The paper makes the point that while applications may logically append only to a file with the desire for contiguous append-writes, the file system and/or need to make new files for overflow in fact may cause the HDD/SDD to incur random or at least non-sequential writes in or across those files. Consequently some throughput is lost.

Question: under Linux is it possible to reserve a block of the hard-disk such that the application can definitely append only write in that block? Oracle, for example, may do this. This scheme by-passes some of the typical filesystem APIs and allows applications to better control where the writes go.


  👤 jdc Accepted Answer ✓
Question: under Linux is it possible to reserve a block of the hard-disk such that the application can definitely append only write in that block?

My understanding is if you're developing a filesystem or working with persistent memory, assuming this kind of control may be necessary; otherwise you're probably just confused.

That being said, it may well be that only appending helps the filesystem (eg. ext4) to keep the file contiguous. So if that's your angle, you probably want to learn more about your filesystem of choice.

-

https://en.wikipedia.org/wiki/Extent_(file_systems)

https://en.wikipedia.org/wiki/Allocate-on-flush

https://unix.stackexchange.com/questions/349769/linux-dax-di...