Welcome! Log In Create A New Profile


Static Files

September 27, 2011 07:38AM

I am intend to use NGINX (LINUX) for serving static files with high
concurrency and bandwidth.
Some of the files is served from the disk and some from cache.
I am trying to find the configuration for best performance.

I have some questions regarding NGINX configuration.

1. *output_buffers 1 32k*
This directive excepts 2 inputs
can someone explain me the meaning of each input
I can see that 32K is size of data (per fetch) when reading from a DIsk -
what else it influences?
When serving big files, best Disk utilization is in blocks of 1MB, is it OK
to change this directive to 1024k?

2. *aio*
**I read in Wiki the following
*" This directive is usable as of Linux kernel 2.6.22. For Linux it is
required to use directio, this automatically disables sendfile support."*
when using AIO I must use *directio on*? (when testing I could see the file
is served from the cache - which means it is not using O_DIRECT)

3. *sendfile
Is NGINX try to send a file using 1 sendfile call (count = file size)?
If so when trying to send file residing only on the Disk, the server is
blocked till end of transmition?
In this model serving multiple files some on the disk and some cached is

Will be happy to get any answer or opinion



*Hagai Avrahami*
Qwilt | Work: +972-72-2221644| Mobile: +972-54-4895656 |
nginx mailing list
Subject Author Posted

Static Files

hagaizzz September 27, 2011 07:38AM

Re: Static Files

Simon Liu September 27, 2011 11:50PM

RE: Static files

Reinis Rozitis May 11, 2020 01:04PM

Re: Static files

Francis Daly May 12, 2020 10:56AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 48
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready