Hacker News new | ask | show | jobs
by dschiptsov 4015 days ago
Linux has POSIX aio syscalls which seems to work. At least Informix and Oracle rely on them.
2 comments

Linux kernel aio will often still block when dealing with the page cache even if you request nonblocking. The workaround for this is to use O_DIRECT, which is okay for databases that do their own cache management but not for something like nginx (which is depending on the OS cache).

Glibc's posix aio (aio_*(3)), on the other hand, does not use Linux's kernel aio AFAIK. It probably uses thread pools. It also uses signals to signal completion. It is not generally considered performant.

Yes, good points about caching, Informix does everything by itself, indeed, on raw devices or direct mapped files, which is the only way to maintain not evenrual, but strong data consistency Thanks for clarifying.
> Linux has POSIX aio syscalls which seems to work. At least Informix and Oracle rely on them.

That only works for read, write and fsync.

There are plenty of other blocking syscalls that people need to use.

e.g. An important missing one is getdents.