Boost logo

Boost Users :

From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2020-09-01 12:25:13


On 31/08/2020 05:08, Gavin Lambert via Boost-users wrote:

> Alternatively, there's another library (that I also haven't used)
> dedicated to async file I/O.  It originally started life based on ASIO
> but I think it's since diverged into something else.  And called
> something different from the last time I saw it as well.
>
> Its current home appears to be: https://ned14.github.io/llfio/

Yes, one part of it should enter the C++ 23 standard, other parts may do so.

LLFIO doesn't export publicly any async file i/o implementation however.
This is because async file i/o usually has worse performance than
synchronous file i/o. So you generally want to use synchronous i/o
tightly integrated with kernel threads, if concurrency is desired (quite
often it is not).

> (The impression I have, which may be mistaken, is that it is possibly
> overkill for general application use, unless you're trying to implement
> some kind of custom database engine rather than just using an
> off-the-shelf DB library.)

Spot on. The only place where async i/o makes a lot of sense is where
i/o latencies are unpredictable most of the time. This is usually the
case with socket i/o latencies, it is rarely the case with file i/o (and
as you mention, only in very high random access use cases across
datasets far exceeding RAM does disabling caching for file i/o make sense).

Niall


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net