2 ms·
O_DIRECT + aio on Linux seems okay for preallocated files, no?
by pas 7y ago
O_DIRECT + aio on Linux seems okay for preallocated files, no?
- dmytroi 7y agoIf by aio you mean Posix aio - on Linux it's implemented with user space threads and blocking I/O. Posix aio on BSD systems is implemented as kernel space thread (aio_write/etc are syscalls on BSD, and glibc functions on Linux). If you mean io_submit, then yes, but in vast majority of cases, actual `io_submit` syscall will block, because of metadata updates, unaligned reads, etc ...
- pas 7y agoI initially wrote libaio but then thought it would just confuse people. :) Yes, I mean io_submit, which is what MySQL uses.