Access_log off impact on Requests/sec

Reinis Rozitis r at roze.lv
Thu Jul 28 15:33:40 UTC 2016


> The results with defaults including ‘access_log /var/log/nginx/access.log;’ 
> show the Requests/sec ramping up to ~24.5K and staying there.

> The results with defaults and access_log changed to ‘access_log off;’ show
the Requests/sec initially ramping up to ~28.5K but then decreasing down to
~20K and staying there.
> The NGINX config is at the bottom.
> Can someone explain possible reasons for this behavior?

First of all you should probably somehow format your benchmark results in 
more readable format (table or something) as looking at them now is 
counterintuitive (also it's better to keep the configuration at minimum and 
no need for default config files like mime.types etc).


Second - against what exactly are you testing?

As your benchmark numbers looked odd (and somewhat low) out of interest I 
did few tests against bare 1.10.3 nginx (the default index.htm) page (on a 
server with 12 cores - nginx runs on 8 workers).

I took your heaviest test -t32 -c1000 -d1m (32 threads and 1000 connections) 
without access_log:

Running 1m test @ http://<ip>/
  32 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    65.40ms  140.79ms   1.96s    92.52%
    Req/Sec     4.06k     1.34k   25.27k    75.02%
  7746479 requests in 1.00m, 6.13GB read
Requests/sec: 128893.40
Transfer/sec:    104.48MB

With access_log:

  32 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    84.17ms  193.73ms   2.00s    92.17%
    Req/Sec     4.05k     1.48k   36.23k    74.44%
  7724438 requests in 1.00m, 6.11GB read
Requests/sec: 128526.82
Transfer/sec:    104.18MB

And I'm bassically limited to the 1Gbit network between servers (I'll try to 
test on some higher core machine later so there is one nginx worker for each 
Wrk thread and/or running on the same box againt 'lo') but I couldn't 
replicate any significant difference of having the log on or off.

rr





More information about the nginx mailing list