4 ms·
I didn't get the impression that the author was suggesting to throw out the old APIs. It seems to me like the article is a proof of concept of new approaches th
by cahooon 6y ago
I didn't get the impression that the author was suggesting to throw out the old APIs. It seems to me like the article is a proof of concept of new approaches that could be added as new APIs, only expected to be used by people who need them, using an approach that takes advantage of modern storage technology.
> "Random access may have to wastefully read larger blocks of the data than are actually requested by the application. The unused data gets cached, but if it's not going to be accessed any time soon, it means that something else got wastefully bumped out of the cache. Sequential access is likely to make use of an entire block."
I may have misread it, but I thought he addressed this in the article.
> "Random access files take a position as an argument, meaning there is no need to maintain a seek cursor. But more importantly: they don’t take a buffer as a parameter. Instead, they use io_uring’s pre-registered buffer area to allocate a buffer and return to the user. That means no memory mapping, no copying to the user buffer — there is only a copy from the device to the glommio buffer and the user get a reference counted pointer to that. And because we know this is random I/O, there is no need to read more data than what was requested."