[edit] aio

Syntax: aio on | off | sendfile
Default: off
Context: http
server
location
Appeared in: 0.8.11
Reference: aio


This directive is usable as of Linux kernel 2.6.22. For Linux it is required to use directio, this automatically disables sendfile support.

location /video {
    aio on; 
    directio 512; 
    output_buffers 1 128k;
}

In FreeBSD before 5.2.1 and Nginx 0.8.12 you must disable sendfile support.

location /video {
    aio on; 
    sendfile off;
    output_buffers 1 128k;
}

As of FreeBSD 5.2.1 and Nginx 0.8.12 you can use it along with sendfile.

location /video {
    aio sendfile; 
    sendfile on;
    tcp_nopush on;
}

Module: HttpCoreModule