3 ms·
Linux has POSIX aio syscalls which seems to work. At least Informix and Oracle rely on them.
by dschiptsov 11y ago
Linux has POSIX aio syscalls which seems to work. At least Informix and Oracle rely on them.
- daurnimator 11y ago> 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.
- phs2501 11y agoLinux 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.
- dschiptsov 11y agoYes, 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.