nginx setup question nginx setup question nginx nginx

nginx setup question


When you reload your nginx (kiil -HUP) you'll get something like this in your error logs

2008/10/01 03:57:26 [notice] 4563#0: signal 1 (SIGHUP) received, reconfiguring2008/10/01 03:57:26 [notice] 4563#0: reconfiguring2008/10/01 03:57:26 [notice] 4563#0: using the "epoll" event method2008/10/01 03:57:26 [notice] 4563#0: start worker processes2008/10/01 03:57:26 [notice] 4563#0: start worker process 3870

What event method is your nginx compiled to use?

Are you doing any access_log'ing ? Consider adding buffer=32k, which will reduce the contention on the write lock for the log file.

Consider reducing the number of workers, it sounds counter intuitive, but the workers need to synchronize with each other for sys calls like accept(). Try reducing the number of workers, ideally I would suggest 1.

You might try explicitly setting the read and write socket buffers on the listening socket, see http://wiki.codemongers.com/NginxHttpCoreModule#listen


Perhaps lighttpd is using some kind of caching? There's a great article here that describes how to set up memcached with nginx for a reported 400% performance boost.

The nginx doc on the memcached module is here.


Suggestions:- Use 1 worker per processor.- Check the various nginx buffer settings