Loss of 20ms after migrating from Lighttpd to NGINX
March 14, 2013 09:31AM
Hi everyone,

we want to migrate many many webservers from lighttpd/1.4.28 to NGINX/1.2.7. After migrating some smaller webservers we saw a significant increase of about 20ms (sometimes more, sometimes less) on the response times.

We are using scgi and php5-fpm, we also do only log the response times of scgi, so fpm can also be ignored in this equation.

As there is no "tweaking" of our side for scgi i wanted to ask you if you can imagine any settings we should use.

location ~ ^/($|some|stuff) {
include scgi_params;

#scgi_buffer_size 4K;
#scgi_buffers 512 4k;
scgi_pass our_sockets;
}

upstream our_sockets {
least_conn;

server unix:/tmp/our.socket.for_nginx.1 max_fails=3 fail_timeout=5s;
[..14 times]
}

We think that a part of the problem is the db-query time, because regarding our graphs, after an upgrade the response time of the DB increases, see attachments. For some reason nginx seems to handle this in a completly other way than lighttpd, and i can't find any solution for this. :(


The attached gamestat_queries-daily.png shows you the increase in response time (Thu 11:00) of the db querys, note that the querys per second didn't increased.

The gamestat-daily.png shows you also the response time of Site-Requests, be careful here, the db-time is already included in site-time.



Old Environment is:
Webservers:
Debian Squeeze
Lighttpd/1.4.28 => NGINX/1.2.7
php/5.3.13
Usage of fastcgi/scgi => php-fpm/scgi

DB-Server:
Debian Squeeze
postgresql 9.0.6



regards
Bernhard
Attachments:
open | download - gamestat-daily.png (17 KB)
open | download - gamestat_queries-daily.png (12.2 KB)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 134
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready