Performance is a consideration, but it is only one of many. I switched to
Ruby because of tangible reasons -- for web work I could do it under Ruby and
the framework of my choice faster than I could with anything I had experience
in Perl 3 years ago -- and also for intangibles -- as a long time Perl user
at that time, I found Ruby's syntax to be tremendously more enjoyable to work
with than Perl 5's.
But performance is still a factor. I originally had some concern that Ruby
seemed to be slower than Perl. However, as many people have said,
performance only becomes important when it becomes a problem, and it just
isn't a problem with Ruby, for me.
Web benchmarks are notoriously hard, as they are extremely context sensitive.
How much data is being pushed? How much of it is dynamic? What sort of
manipulations have to be done, and how much database interaction must occur?
The answers to these and other questions all affect the results. However, I
have a web app in production right now, written in Ruby, running on a single
processor midrange linux server (no 3.4Ghz P4's here), with a database
backend, being used by a Fortune 500 company. The design spec called for it
to be able to handle 30 requests per second.
In real world usage they have not come anywhere close to that yet, so time
will tell what happens when there is real data in it, but in testing with
current versions of the framework, I am getting as many as 285 requests per
second for a typical 9k HTML page, served through https, with some modest
dynamic content, when feeding it as many requests as I can (.0035 seconds or
less per page).
In real usage, with larger amounts of user data causing long pages with more
dynamic content, this will go down, but I estimate that it will still average
80-100 requests per second, and I did nothing in particular to enhance
performance. In fact, I coded some sections in ways that improved
readability and maintainability at the cost of performance.
Ruby is plenty fast.
Kirk Haines
···
On Friday 12 August 2005 9:39 am, Bradley Kite wrote:
Compared with - say - slashdot?
On 12/08/05, Julian Leviston <julian@coretech.net.au> wrote:
> The bottleneck is usually the database, tho... no? 
>
> Read the ruby on rails book - and then you'll get some real-world-
> applications... take a look at basecamp - that's running with
> THOUSANDS of users... not sure how many concurrent... and it's all of
> one to two machines...