Forum: NGINX directio question

Posted by Stefan Parvu (Guest)
on 2010-03-07 19:08
(Received via mailing list)
Hi,

My name is Stefan Parvu, Im working on http://www.systemdatarecorder.org
and I have started to test and consider replacing for our solution
apache over nginx. Im getting to know nginx and I like the server.

Some question reading over http://wiki.nginx.org/NginxHttpCoreModule
about DirectIO:

"The directive enables use of flags O_DIRECT (FreeBSD, Linux),
F_NOCACHE (Mac OS X) or directio() function (Solaris) for reading
files with size greater than specified. This directive disables
use of sendfile for this request."

DirectIO in Solaris is a feature, when enabled lets you to bypass 
entirely the
OS's page cache and read/write directly from/to disk. This has some
benefits where workloads are database servers and you want to avoid
double caching.

Im a bit curious under what situations would like to have DirectIO 
enabled on
nginx and are we talking about same thing when we refer to directio ?
 http://www.solarisinternals.com/wiki/index.php/Direct_I/O

Usually most applications will benefit of having the OS's page cache 
involved
rather of going to disk.

Thanks,
stefan
Posted by Igor Sysoev (Guest)
on 2010-03-07 19:44
(Received via mailing list)
On Sun, Mar 07, 2010 at 08:07:13PM +0200, Stefan Parvu wrote:

> F_NOCACHE (Mac OS X) or directio() function (Solaris) for reading 
>  http://www.solarisinternals.com/wiki/index.php/Direct_I/O
> 
> Usually most applications will benefit of having the OS's page cache involved 
> rather of going to disk. 

Yes, nginx's directio is what you have said. It may or may not improve
perfomance of serving large files when a server physical memory is much
less than summary size of the files.


--
Igor Sysoev
http://sysoev.ru/en/
Posted by Stefan Parvu (Guest)
on 2010-03-07 20:19
(Received via mailing list)
> 
> Yes, nginx's directio is what you have said. It may or may not improve
> perfomance of serving large files when a server physical memory is much
> less than summary size of the files.
>

aha, cool. Many thanks for clarification.

stefan
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.