Nginx without access log

Obviously nginx needs a time (even very short) to write access and error
logs upon every request. Thus, theoretically, removing access and error
logs from nginx configuration should speed up the web server.
Surprisingly, when I did so, the load of my website became slower. Is it
normal?

NOTE: I know that logs are useful and needed for real experiences; I
just try to better understand nginx as my beloved web server :slight_smile:

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,219454,219454#msg-219454

As I explored, simply removing access_log and error_log from nginx
configuration makes the process for nginx more complicated; thus, it
takes more time to complete the request. Instead, error_log should be
turned off by
error_log /dev/null crit;

but how to turn off the access log?

And what is the best configuration to force nginx to conduct the main
requests without dealing with side process (like creating logs). I want
to compare the very basic action of nginx.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,219454,219455#msg-219455

On Fri, Dec 02, 2011 at 01:48:21AM -0500, etrader wrote:

As I explored, simply removing access_log and error_log from nginx
configuration makes the process for nginx more complicated; thus, it
takes more time to complete the request. Instead, error_log should be
turned off by
error_log /dev/null crit;

but how to turn off the access log?

access_log off;

On Friday 02 December 2011 09:55:45 etrader wrote:

Obviously nginx needs a time (even very short) to write access and error
logs upon every request. Thus, theoretically, removing access and error
logs from nginx configuration should speed up the web server.
Surprisingly, when I did so, the load of my website became slower. Is it
normal?

How did you bench it? Did you use ab for your tests?

wbr, Valentin V. Bartenev

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs