High cpu load

Hi all,

My mongrel server (1.0.3), with a very low usage, is taking more than
10% of
cpu usage all the time (no background tasks were defined by me). This is
very annoying and it is preventing me from being able to thing about
good
cluster configuration. Any idea on why this is happening?

cheers and regards,
Danilo

How is it possible for us to offer any insight at all without knowing
your application, your server config, database, your logs, your
hardware etc…

people are pretty darn helpful on this list but by no means that means
they are psychics.

try to be as verbose as possible when posting questions to any list if
you expect to get help.

On 10/28/07, Danilo C. [email protected] wrote:


Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users


Michael S.
Linux Admin/Developer
AIM: mikesteinfeld
GTALK: [email protected]

Ok, let me clarify the terms I have used and add more information to the
question.

Very low usage = no user accessing it. Plus, my application doesn’t have
any
“background” operations. Thus, the log is empty. The rails version is
1.2.5
and ruby is 1.8.6.

Other than that, my server is running on a linux box, this is the uname
-a
command for it:

Linux localhost 2.6.9-42.0.3.ELsmp #1 SMP Mon Sep 25 17:28:02 EDT 2006
i686
i686 i386 GNU/Linux

Moreover, I am running a mongrel cluster (1.0.2) with 1 (one) instance,
so
it is almost the same as running mongrel alone. This instance is not
proxied, balanced or accessed thru any other software (apache, for
example).
My server configuration is pretty standard, the only plugins I have are
redcloth and WhiteListHelper.

My app database is Mysql (4.1), where I use an UTF-8 database.

I hope this is enough info to start a discussion.

Thanks and regards,
Danilo.

Manu issues with load and mysql 4 and rails, i can’t emphasize enough
that you should upgrade to mysql 5 asap from personal experience.

Sent from my iPhone

M: 941.504.6344
Aim: mikesteinfeld

On Oct 28, 2007, at 9:55 PM, “Danilo C.” [email protected]

On 10/28/07, Danilo C. [email protected] wrote:

Hi all,

My mongrel server (1.0.3), with a very low usage, is taking more than 10% of
cpu usage all the time (no background tasks were defined by me). This is
very annoying and it is preventing me from being able to thing about good
cluster configuration. Any idea on why this is happening?

Danilo,

did you checked with ps that Mongrel is the service eating your CPU?

Also, what happens if you run plain mongrel_rails without daemonize or
cluster options?

is the rails application run on production or development mode?

Asking this because sometimes a lot of users (including myself) miss
it in the global picture.

Which patchlevel of ruby you’re using?
Also, what is the result if you revert to 1.0.1 version?

Did this happens with a clean, empty rails application too?

We should try other options to see what could be creating the high CPU
use you’re getting.


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

I would try pointing strace and/or gdb at it to see where it’s looping.

Luis,

Yes, I monitor the cpu usage using ps aux, since my host doesn’t have
“top”.
My server runs on production mode and I am using ruby 1.8.6. Everything
started using 1.0.1 (mongrel) and the cpu usage improved a little bit
when I
upgraded to 1.0.3.

But I think I´ve found the major problem. When I changed my
mongrel_cluster
config file to include the fullpath for the pid and log files, the cpu
usage
dropped to less than 1%. I don’t understand exactly why, because somehow
those files were generated before, using the relative path.

I will continue to monitor the cpu usage and let you guys know if this
have
really solved my problem.

Thanks,
Danilo.