5 ms·
From the article "Although Linux provides a kind of asynchronous interface for reading files, it has a couple of significant drawbacks. One of them is alignmen
by taf2 9y ago
From the article
"Although Linux provides a kind of asynchronous interface for reading files, it has a couple of significant drawbacks. One of them is alignment requirements for file access and buffers, but NGINX handles that well. But the second problem is worse. 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. That definitely doesn’t make it optimal for many cases."