2 ms·
TLDR, the Linux non-blocking filesystem API requires you to bypass the OS file cache (!!!) So the whole webserver serving clients might occasionally block wait
by csense 9y ago
TLDR, the Linux non-blocking filesystem API requires you to bypass the OS file cache (!!!)
So the whole webserver serving clients might occasionally block waiting for disk if you're serving online videos or some other application where your whole website is too big to fit in the OS cache. But if you have multiple threads, then if one of them blocks, it isn't a big deal as the other threads will continue to unqueue requests.
> The asynchronous interface requires the O_DIRECT flag to be set on the file descriptor, which means that any access to the file will bypass the cache in memory and increase load on the hard disks