News for hackers. Stuff that matters.
Re:How to handle 1000s of concurrent users on a 360MB VPS by nwmcsween on Saturday May 28, 2011 @04:39AM (#2594158)
nginx is actually pretty bad at all benchmarks I've thrown at it, you can see some here: http://www.webhostingtalk.com/showthread.php?t=918355 this was on an 8 core intel Xeon 5520 server system it maxed 8 cores (18ghz) @ 7500 requests per second for static content.
Re:How to handle 1000s of concurrent users on a 360MB VPS by piotrSikora on Saturday May 28, 2011 @08:06AM (#2594312)
You're doing them wrong. Just check results posted by Leif Hedstrom (Apache Traffic Server developer)... He's getting 100k req/s on far worse hardware: http://www.ogre.com/node/393
Re:How to handle 1000s of concurrent users on a 360MB VPS by stock_toaster on Saturday May 28, 2011 @05:36AM (#2594204)
I found that forum thread quite hard to follow, and there are blobs of ab runs sprinkled all over. I clicked a few pages through, and didn't see any configs posted, sysctl values, etc. Was it more of an ad-hoc test you were running just to get some vague ideas about performance, as apposed to a comprehensive performance comparison?

My personal (anecdotal) experience shows that nginx is amazingly fast. Some nginx configs can impact performance if you aren't careful (I am thinking of try_files vs if-tests[1]), and there are various nginx tunables (worker process count, cpu affinity, etc) as well.

I have personally seen issues with apachebench when there are lots of connections (not to mention linux system tunables such as max file descriptors!), iptables state tracking, etc...

[1]: http://wiki.nginx.org/IfIsEvil

Re:How to handle 1000s of concurrent users on a 360MB VPS by nwmcsween on Saturday May 28, 2011 @01:10PM (#2594773)
This was stock RHEL 5, I tested nginx compiled with gcc -O2, -O3, -O2 -ffast-math epoll was enabled, I even specified the cache line size at build time and tested hard enabling AIO the nginx config consisted of simply serving a simple static html page. I tried every option under the sun at the time tcp_nopush, etc. I spent days testing apache vs nginx vs litespeed, instead of drinking the kool aid.
Re:How to handle 1000s of concurrent users on a 360MB VPS by guylhem on Saturday May 28, 2011 @04:42PM (#2595176)
Did you try others things like thttpd ?
Re:How to handle 1000s of concurrent users on a 360MB VPS by mfjordvald on Saturday May 28, 2011 @05:26AM (#2594201)
I haven't read through the forum thread as there are ten pages and much of it seems off-topic. But the requests per second doesn't even matter here, the fact that you were capable of maxing the CPU at all shows me you did something wrong. I easily get 12k requests on an i7 box and the CPU wasn't even stressed then. Eventually it was IO that limited it.
Re:How to handle 1000s of concurrent users on a 360MB VPS by chopsueyar on Saturday May 28, 2011 @09:03AM (#2594381)
Even though it was eight cores, he only had 1024KB of system RAM.
Re:How to handle 1000s of concurrent users on a 360MB VPS by lamnk on Saturday May 28, 2011 @08:32PM (#2595540)
Ugh, then there is something seriously wrong with your configuration.

This is another interesting benchmark between nginx, lighttpd and varnish: http://nbonvin.wordpress.com/2011/03/24/serving-small-static... Even on a Core i3 laptop nginx can handle 70k req/s

Re:How to handle 1000s of concurrent users on a 360MB VPS by SaltwaterC on Friday June 03, 2011 @10:17AM (#2616398)
First of all, there's no such thing as 18GHz. The GHz don't sum up. It's like saying that if a woman makes a child in 9 months, two women can make a child in 4.5 months. It doesn't work that way.

Moving forward to the actual issue. Something is really broken into your configuration. The first thing is the file AIO. But this is Linux's fault. The file AIO is broken by design. It bypasses the kernel file cache. Which is a pretty large performance hit per se. The second thing is the fact that I can easily get 55k req/s on a Q9400 with nginx, without even touching the sysctl parameters of a Ubuntu 10.04 x86_64. The only actual difference is nginx 1.0.x instead of the ancient 0.7.x you would actually find into the standard repos aka the production version I publish into my company's private repo.