Poor Rails performance when run on Redhat

Hi,

We have developed a small RoR app that runs fine on a standard IBM
thinkpad (1GB mem) but runsmuch slower when on an IBM x460 Redhat
machine (32GB ram).

The x460 server has hardly any thing running on it at present, so that
not the issue.

We are busy checking the config and permissions of the user account
used to run the app., but I was wondering if you guys have heard
anything about redhat and RoR, that maybe causing this issue?

Cheers

Andrew

[email protected] wrote:

We have developed a small RoR app that runs fine on a standard IBM
thinkpad (1GB mem) but runsmuch slower when on an IBM x460 Redhat
machine (32GB ram).

The x460 server has hardly any thing running on it at present, so that
not the issue.

We are busy checking the config and permissions of the user account
used to run the app., but I was wondering if you guys have heard
anything about redhat and RoR, that maybe causing this issue?

Not really enough detail to go off of. What web server are you using?
Are you using Mongrel? Etc.

I have Rails up and running on Fedora Core 5 using LightSpeed’s LSAPI
web server. Haven’t had issues yet.

Charles Lamper wrote:

[email protected] wrote:

snipped

Posted via http://www.ruby-forum.com/.
Yes its ruby 1.3.4, mongrel-0.3.13.3 with Apache 2.2.

These have been compiled onthe 64bit redhat machine and work fine
(albiet slow)

Andrew

[email protected] wrote:

Yes its ruby 1.3.4, mongrel-0.3.13.3 with Apache 2.2.

Ruby 1.3.4? Or 1.8.4?

[email protected] wrote:

Jes’s too much coffee for me today !

yep 1.8.4

The performance problems seem to be in the rendering of the pages
(takes around 5 seconds for 10 fields whereas the db call takes less
than a second) and then their posting to the user browser. Network
latency is ok (not brilliant,but ok)

[email protected] wrote:

yep 1.8.4

You have Mongrel Cluster installed as well, correct? If so, how many
mongrel clusters have you setup initially?

I would try using lighttpd just for the sake of verifying if its
webserver
or an OS issue.

Charles Lamper wrote:

[email protected] wrote:

Yes its ruby 1.3.4, mongrel-0.3.13.3 with Apache 2.2.

Ruby 1.3.4? Or 1.8.4?


Posted via http://www.ruby-forum.com/.

Jes’s too much coffee for me today !

yep 1.8.4

You might be forwarding static cotent requests to the Mongrel servers
(which handle those slowly) check your apache conf file relating to the
mod_proxy redirects

On Wed, 04 Oct 2006 15:30:53 -0000
[email protected][email protected] wrote:


Posted via http://www.ruby-forum.com/.

Jes’s too much coffee for me today !

yep 1.8.4

The performance problems seem to be in the rendering of the pages
(takes around 5 seconds for 10 fields whereas the db call takes less
than a second) and then their posting to the user browser. Network
latency is ok (not brilliant,but ok)

This sounds like a config problem for sure. Your best approach at this
point is to breakdown the performance of each deployed component and
compare them to what your little thinkpad has.

I’d test them in this order:

  1. mongrel in production mode running a testapp with one
    controller/action that just renders “test”
  2. same as #1 but add in a single simple DB query.
  3. Then, test your fronting web server only.
  4. Next the connection between front and mongrel servers by actually
    hitting the #1 and #2 tests so that you test the proxy server
    connection.

I’m thinking you’ll find your perf for #1 and #3 are great, then #2 is
pathetic which means your DB config isn’t right.


Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu

http://mongrel.rubyforge.org/
http://www.lingr.com/room/3yXhqKbfPy8 – Come get help.

Charles Lamper wrote:


Posted via http://www.ruby-forum.com/.

No I haven’t bothered to cluster yet - its a small app with around 10
users a few times a day.

marklennox wrote:

You might be forwarding static cotent requests to the Mongrel servers
(which handle those slowly) check your apache conf file relating to the
mod_proxy redirects

Yeah I thought that might be an issue, luckily I’ve already confirmed
thats not happening

Andrew

Don Miguel de los Platanos wrote:

I would try using lighttpd just for the sake of verifying if its webserver
or an OS issue.

Yeah along those lines, we have installed our app on a desktop fedora
box running webrick. It fly’s

Tomorrow we’ll install mongrel and apache on it to see if its ok. If
it is, then there’s somethign up with the server’s config .

Can you try running webrick to see what its performance is like? --just
curious

Zed A. Shaw wrote:

(takes around 5 seconds for 10 fields whereas the db call takes less

  1. Next the connection between front and mongrel servers by actually hitting the #1 and #2 tests so that you test the proxy server connection.

I’m thinking you’ll find your perf for #1 and #3 are great, then #2 is pathetic which means your DB config isn’t right.

Cheers for tips, we’ll try this tomorrow after we install and run
apache and mongrel on the fedora box.

Andrew

On Fri, 06 Oct 2006 18:22:20 -0000
[email protected][email protected] wrote:

Its when its run onthe 64bit x460 boxes it grinds…

So, it seems the issue is something to do with the config of redhat
itself.

You know, if you have a support license with redhat you should start
using it. Especially since you can show Fedora running fast and their
setup running slow as dirt. Should be a slam dunk and if they can’t fix
it send the damn thing back and just buy a box yourself to put Fedora
on.


Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu

http://mongrel.rubyforge.org/
http://www.lingr.com/room/3yXhqKbfPy8 – Come get help.

x1 wrote:

Can you try running webrick to see what its performance is like? --just curious

On 10/5/06, [email protected] [email protected] wrote:

We tried this today. Browsing directly to webrick instead of via
apache, the performance is the same. We tried lighttpd too - same
performance.

Later, we found apache we hadn’t configured apache fully, so it was not
serving the static contents, mongrel or webbrick were (depending upon
which of them was running). Once fixed, the difference was minor.

We tested the same app on a fedora box running apache & mongrel, just
mongrel, just webbrick. Each test showed perfect performance.

Its when its run onthe 64bit x460 boxes it grinds…

So, it seems the issue is something to do with the config of redhat
itself.

We are going to install the same setup on a desktop redhat (everything
running the same), to see what performance is like. This way we can
get into the box as root, so we’ll be able to play a bit more with
settings. The current servers are corporate ones which we have limited
leway to change things.

I’ll post an update on monday.

Thanks all for yours suggestions

Andrew

For the speed tests, are you accessing it locally(http://localhost or
from another host?

Ruby and rails are both running from local disk slices correct?
Nothing like an NFS out in california? :slight_smile:

Have you run any pure ruby ( command line ) benchmarks to check the
interpreters performance ?


Into RFID? www.rfidnewsupdate.com Simple, fast, news.