Is there a chance to use non-blocking-io with nginx?
AIO is quite broken on Linux, but “O_NONBLOCK” is not.
I know, AIO would be better because you don’t have to wait
until the buffer is copied to the kernel-space, but what should
we do…
The problem, nginx is quite often in “uninterruptible sleep” (D),
so the whole process is blocked.
On Sun, Dec 11, 2011 at 06:58:57PM -0500, double wrote:
Is there a chance to use non-blocking-io with nginx?
AIO is quite broken on Linux, but “O_NONBLOCK” is not.
Does O_NONBLOCK works on Linux for regular files? If yes, where
is sematics defined?
POSIX says behaviour of O_NONBLOCK on regular files is
unspecified, and it’s indeed impossible to use O_NONBLOCK on
regular files with POSIX interfaces: there is no way to schedule
read operation and there is no way to find out if I/O possible
(select()/poll() always return regular files as ready for
reading/writing as per POSIX).