Ruby rails performance

Hi-
We just finished our app and I tested for performance with httperf. Our
setup is browser -> apache2.2-> mod_poxy balancer-> mongrel cluster -> 3
mongrel servers.

I have noticed that the total request per second is is about 7.5. When I
increase the no of mongrel to 5, it inches up to 8 req/s.

My question is how bad or good this number is? We are on a old dell 2400
machine with MySQL also runing ony the box. What can I do to increase
the req/sec number higher?

/thanks
thila

On 7/12/06, thila thila [email protected] wrote:

machine with MySQL also runing ony the box. What can I do to increase
the req/sec number higher?

Is the application in “production” mode?

Joe Van D. wrote:

On 7/12/06, thila thila [email protected] wrote:

machine with MySQL also runing ony the box. What can I do to increase
the req/sec number higher?

Is the application in “production” mode?

YES, also httpperf tested only the index page, which is a static page
under public folder. In other words, even ruby is not at all executed.
ie… we tested only how fast mongrel delivers static pages.

YES, also httpperf tested only the index page, which is a static page
under public folder. In other words, even ruby is not at all executed.
ie… we tested only how fast mongrel delivers static pages.

Did you test on the same machine or over the network?

Regards,
Rimantas

http://rimantas.com/

thila thila wrote:

My question is how bad or good this number is? We are on a old dell 2400
machine with MySQL also runing ony the box. What can I do to increase
the req/sec number higher?

Well, my creaky old Netfinity (P3 650, 256MB) manages 27.62 trans/sec in
Siege against a static page, running 2 Mongrels.

Did you install sendfile?

Ian.

/thanks
thila

On Jul 12, 2006, at 8:48 AM, thila thila wrote:

ie… we tested only how fast mongrel delivers static pages.

Yeah I would say that you have some other issues with configuration

then. I am able to get close to 1000 req/sec for static pages with
two or three mongrel servers. ANd around 6-900 req/sec with one
mongrel. What platform are you running? Linux, BSD?

-Ezra

Ezra Z. wrote:

On Jul 12, 2006, at 8:48 AM, thila thila wrote:

ie… we tested only how fast mongrel delivers static pages.

Yeah I would say that you have some other issues with configuration
then. I am able to get close to 1000 req/sec for static pages with
two or three mongrel servers. ANd around 6-900 req/sec with one
mongrel. What platform are you running? Linux, BSD?

-Ezra

Wow 1000 req/sec? Probably my configuration is the issue then. I have
two servers.

  1. the first server has the apache2.2 with mod_proxy_balancer - Old
    dinky pentium 3 server…
  2. The second server has the mongrel clusters and the mqsql database -
    Dell 2400 dual cpu pentium 3 900mhz with 1Gig ram.

My test was within the LAN network. Do I need to have another apache on
the second server for the sendfile to work?

Any suggestions?

Any suggestions?

I think that 1000r/s is more apache than anything else. I get around
300-400 with litespeed/mongrel. But, litespeed has no way to handle
static requests and proxy dynamic ones that I can see, so mongrel is
doing all the crunching.

As for dynamic pages, I’ve seen anywhere up to 100r/s or so. This
really depends on your app naturally.

On 7/12/06, thila thila [email protected] wrote:

machine with MySQL also runing ony the box. What can I do to increase
the req/sec number higher?

/thanks
thila

Have you tried running the load tests with apache and mod_proxy out of
the picture? I would try the tests starting with connecting to a
single mongrel server directly, then the cluster, then apache.

On Wed, 2006-07-12 at 17:48 +0200, thila thila wrote:

Ah, that’s your first problem. Mongrel shouldn’t be serving static
pages, apache should. Make sure you got the apache configured to serve
static pages and not mongrel first.

Then, I think 8 is very low. Low enough that you’ve probably got
something wrong with the config. Start by working backwards and isolate
each component to see what the problem is. First, see what just one
Mongrel does. Then, see how apache does with a static file. Then, see
how apache with one mongrel works. Finally, add a mongrel and see if
it’s just your rails action.

I’ve found that when you start breaking down each piece you run into
some stupid option you set, or some simple config change and your app
magically does really well.


Zed A. Shaw


http://mongrel.rubyforge.org/
http://www.railsmachine.com/ – Need Mongrel support?

On Wed, 2006-07-12 at 18:05 +0200, Ian Webb wrote:

thila thila wrote:

My question is how bad or good this number is? We are on a old dell 2400
machine with MySQL also runing ony the box. What can I do to increase
the req/sec number higher?

Well, my creaky old Netfinity (P3 650, 256MB) manages 27.62 trans/sec in
Siege against a static page, running 2 Mongrels.

Argh, Ian, siege is evil. You are not my friend. :slight_smile: Stop using siege.

Did you install sendfile?

Actually, thalia, don’t install this until you make a stock config
faster, then add it and make sure it doesn’t make things unstable. The
sendfile api is a little flaky on FreeBSD.


Zed A. Shaw


http://mongrel.rubyforge.org/
http://www.railsmachine.com/ – Need Mongrel support?

Well, I installed Apache2.2 on a 2 GHz box with 1 GB RAM, with
mod_proxy_balancer and 3 mongrels, and I get approx 6-7 reqs/sec
(benched from the same box) for uncached dynamic content… I couldn’t
manage to increase it… The config seems correct! But very
disappointing…

How did you compile Apache2.2? Give us the ./configure arguments please!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs