Performance question


#1

Hi all,

I encountered a rather severe performance problem with Nginx (a rather
ancient version, 0.5.35, on a completely ancient OS):

built by gcc 2.95.4 20011002 (Debian prerelease)
configure arguments: (paths…) --with-http_stub_status_module
–with-poll_module

Code is 100% vanilla.

The kernel does support epoll, but the stone-age libc does not, so I’m
stuck with select/poll. Everything worked fine up until some 800 req/s
(pure static content, a single file actually), while severely choking
at higher speeds (even the status page timed out). There were no traffic
queues/limits etc. Sorry, no debug logs or straces available. Currently
conntrack is enabled but I’ll try to do some tests without it.

Nginx was running with 6 workers, 1024 connections each. The stub status
page usually showed about 120-150 concurrent requests, keepalive is off.

It looks like decreasing tcp_fin_timeout to 2 helped, but I’d really
want to understand what exactly happened. Nginx did not need any
local ports at all (though the system had a ****load of TIME_WAIT
connections).

The problem isn’t purely Nginx-related, I think, as I remember seeing
easily 2000 req/sec while testing from a single IP. The bottleneck looks
related to the sheer number of clients (as in, IP addresses) connecting
to Nginx.

Has anybody seen similar behaviour?

Best regards,
Grzegorz N.