directio sendfile aio

Valentin V. Bartenev vbart at nginx.com
Fri Jan 22 12:14:05 UTC 2016


On Friday 22 January 2016 17:25:42 Anoop Alias wrote:
> My use case is mixed mass hosting environment where some vhost may be
> serving large files and some may be serving small files and where adding
> something like location /video with directio enabled is not practical as I
> being the webhost may not be knowing if the vhost user is serving a video
> etc .
> 
> In such cases ..do you recommend using something like
> 
> sendfile on;
> sendfile_max_chunk 512k;
> aio threads=default;
> directio 100m;
> 
[..]

Something like this can work better, since it reduces usage of Direct IO
only for reading really quite big files.

But a possible side effect of this setting will be slowdown of serving
such files.

  wbr, Valentin V. Bartenev



More information about the nginx mailing list