Forum: NGINX Performance question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E88f834c0785a399b498b6cf70d10223?d=identicon&s=25 Grzegorz Nosek (gnosek)
on 2009-05-19 13:16
(Received via mailing list)
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 Nosek
This topic is locked and can not be replied to.