From: Andreas Schwarz Date: 2004-06-22T01:53:13+09:00 Subject: Re: rubys web performance Kirk Haines wrote: > On Mon, 21 Jun 2004 06:03:15 +0900, Andreas Schwarz wrote > >> > however im still wondering why my heavy php app, where >> > classes are not cached, no accelerator is used, etc is even a bit >> > faster than a super simple ruby example where classes are cached.. >> >> I don't know rails, but all the ruby web frameworks I looked at were >> extremely memory and CPU intensive. If you use the relational DB >> like it is supposed to, without a generic OO mapping layer, and a simple >> templating system like Kwartz, you will see that performance is similar >> to PHP. > > The disadvantage to running something as a CGI is that there is a parsing > step every time, and a lot of the Ruby libraries are written in Ruby, not C, > so that is a lot of Ruby lines to parse. I don't think he was talking about parsing speed there; he wrote that "classes are cached". > The advantage to something like Kwartz is that it is written in C, so it > fundamentally pretty fast. No, it generates Ruby code. > Because of the amount of time that threads spend waiting on other resources, > even with the heavy .3 seconds/request pages, though, I can handle 15-20 of > those per second on this hardware while more typical pages end up > benchmarking around 30-35 per second and the really lightweight ones around > 70/second. Sounds not bad, maybe I should have a look at it.