Hi all: New to the list. Im enjoying mongrel. Coming from a background of weblogic clusters this is a dream. However I have a few questions: I have used HTTPerf to analyze metrics for an application ( rails ). My question pertains to the CPU utilization threshold: 1) Test with single mongrel server : sustained cpu util @ 98% 2) Test with 2 mongrel nodes in a mongrel cluster with apache and proxy balancer: Each node sustained cpu util @ app. 45% 3) Test with 3 mongrel nodes in a mongrel cluster with apache and proxy balancer: Each node sustained cpu util @ app 30% As you can see it appears the the mongrel nodes on this server are going for max cpu utilization. My questions are these: 1) Is this normal behavior for mongrel? 2) Is there way to configure mongrel to only go after a threshold or percentage of max cpu utilization? thanks for any help! Ryan
> 1) Is this normal behavior for mongrel?Not really. First of all, it''s hardly about Mongrel, which is rather light on CPU time. More likely than not 95 out of those 98% CPU spends within your app code (that runs on the same ruby process as Mongrel). Normal CPU utilization profile includes significant amount of database work (30 to 70%). Unless your Rails app uses SQLite (an in process database), or doesn''t use database at all, you should see some CPU (20 to 70%) utilized by mysqld. Make sure that you did change Rails environment to production with -e production option.> 2) Is there way to configure mongrel to only go after a threshold orpercentage of max cpu utilization? No, not within Mongrel. You shouldn''t need it. Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070227/bdef7153/attachment.html
Alexey: thanks for the response. Actually we are using sqlite3 for these tests. Also we are simply hitting the index page of the application so no mysql or heavy application processing is taking place. Im sure the hardware specs of the server would play a role. Is there a guideline anywhere a typical performance metric can be compared? thanks Ryan Alexey Verkhovsky wrote:> > 1) Is this normal behavior for mongrel? > Not really. > > First of all, it''s hardly about Mongrel, which is rather light on CPU > time. More likely than not 95 out of those 98% CPU spends within your > app code (that runs on the same ruby process as Mongrel). > > Normal CPU utilization profile includes significant amount of database > work (30 to 70%). Unless your Rails app uses SQLite (an in process > database), or doesn''t use database at all, you should see some CPU (20 > to 70%) utilized by mysqld. > > Make sure that you did change Rails environment to production with -e > production option. > > > 2) Is there way to configure mongrel to only go after a threshold or > percentage of max cpu utilization? > No, not within Mongrel. You shouldn''t need it. > > Alex > ------------------------------------------------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users
On Tue, 27 Feb 2007 01:01:41 -0600 Ryan <abstractryan at gmail.com> wrote:> Hi all: > > New to the list. Im enjoying mongrel. Coming from a background of > weblogic clusters this is a dream. However I have a few questions:<snip>> As you can see it appears the the mongrel nodes on this server are going > for max cpu utilization.Mongrel doesn''t try to manage CPU utilization since that''s the job of the operating system. If you want to reduce the load that Mongrel puts on your servers, then look at the nice command and using your systems firewall mechanism to control the throttling of requests. There are a few parameters that can give you a bit of control, such as -t for a timeout, but that option hasn''t been used much and probably doesn''t work the way it''s expected. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.