On Mon, 26 Nov 2007 20:59:39 +0100 Bob Br <[EMAIL PROTECTED]> wrote:
> > I'm starting to benchmark my application and was wondering if this is > normal results / degradation when new layers are added. > > Basically I was worried about the ~35% decline when it hits mongrel, and > the following 40% decline when it hits a blank rails app. Getting just > over a third of the theoretical max seems pretty awful when its just a > blank page. What are your performance goals for the application in req/sec and kbytes/sec. Optimize to meet those after the application is working. A working application can be made faster with more hardware, a non-working application doesn't do shit. > Can anyone suggest either some config settings, or where to look to see > what improvements can be made? > > This is from httperf - It was run on my desktop pointed towards a > webserver in another room (2 hops away max). I ran a 5 conn warm-up > prior to running the real test. > > > (apache - gif image) > httperf --server=test --port=80 --uri=/bg.gif --num-conns=10000 > > Reply rate [replies/s]: min 625.1 avg 653.0 max 687.0 stddev 31.4 (3 > avg: 562 This seemes pathetic for an Apache config, and the wide range in your averages says that your box sucks or your testing it over a crappy connection. I'm sorry Bob, but your poor little server just doesn't cut it. If you believe anything Brian McCallister says, he gets 18,0000 req/sec out of his magical Apache stack (riiiiiiiiight). http://programming.reddit.com/info/60pkl/comments/ he gets the following: Apache HTTPD minimal module which mod_hello_world just prints hello world: 18,823.58 Apache HTTPD server-scoped mod_wombat mod_wombat handler: 17,856.76 Apache Tomcat JSP 5.5.20: 17,644.40 Jetty 6.1.1 JSP: 12,449.36 Mongrel HttpHandler, not Rails: 2,378.05 Now, those have to be the most bogus unbelievable numbers ever, but let's assume that they're true and he's getting 18k req/sec out of Apache. What you should be asking (apart from how the fuck did he do that without a giant cluster of machines): * I've *never* seen Apache Tomcat approach a speed that close to a fine tuned Apache server ever. If he's got a Tomcat that goes as fast as Apache, then why bother using Apache? Tomcat is about 75% of the code and only uses like 200% of the RAM. Instead of piling everything through Apache to Tomcat, cut out the middle man. * If he's got Wombat at near Apache Tomcat speeds, then again, why the hell bother with Apache at all? This means you could again cut out the middle man and potentially do your own similar server that'd be much faster even. * Jetty is known as lightning faster than Tomcat, but when did this change? I fired up a Jetty and Tomcat on my laptop and Jetty was about 10% faster. What'd they do to their Tomcat that's so much better? * Consider Mongrel's About 3000 lines of code and Apache is about 3 million I'll take that as a win. :-) But I'm sure Brian still has it stuck in his head that no, Mongrel's speed has nothing to do with Ruby's shitty GC, threads, and IO, but it's all about his pet peeve dumbass feature pipelined requests and keep-alives. 'Cause all those browsers doing only 4 requests max per server per connection are totally using his little magic hack keep-alive bullshit. * Wait a minute, if JSP on Tomcat is that close to Apache, then WHAT THE FUCK is every Java framework in the world doing? I bust out just a simple page that uses a JSP, Hibernate, and Controller and I *maybe* get 10 req/sec without serious tunage. If Brian's got some kickass cluster going, then there's no way he setup mongrel right for this test. He probably put Mongrel on his laptop then put the apache on a 200x200 cluster with 300 gig per node and slapped the Tomcat on a 300 way Azul. Finally, the big question to ask, since I've *never* seen a Tomcat beat a well tuned Apache server on any similar hardware, is how'd they cripple their apache to make it as slow as Tomcat? :-) > > (mongrel - gif image) > httperf --server=test --port=3000 --uri=/images/bg.gif --num-conns=8000 > avg: 363 If that's mongrel serving a file then that could be a good speed. 1/2 of your apache speed is actually rocking fast. It's usually much less. In fact, I'd seriously say that your measurement method is probably wrong. > > % = 64.5% of Potential Max > > > (mongrel - blank controller / index file, no global layout etc.) > httperf --server=test --port=3000 --uri=/test --num-conns=4000 > avg: 210 Mongrel doesn't have "controllers" so if this is a Rails action in a controller then that's not so bad compared to your apache performance. If this is a mongrel handler then I'd say re-test as your measurements are probably wrong. > Posted via http://www.ruby-forum.com/. Why do people post anonymously? Seriously, that's really irritating. I'm sure Bob has a reason, but just come out and say who your are. Nobody cares if Super Secret Microsoft Supported Company.com is using Mongrel. Hell Oracle finally came clean. BTW, they get 400 req/sec on a finely tuned JRuby setup. You should have seen me laugh at that, especially since I can't get a moderately sized test suite to run in less than 10 minutes. -- Zed A. Shaw - Hate: http://savingtheinternetwithhate.com/ - Good: http://www.zedshaw.com/ - Evil: http://yearofevil.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---
