Forum: Rails deployment Mongrel CPU Usage

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ca93b7c135564e9eecba37780c0458c5?d=identicon&s=25 glenn (Guest)
on 2007-02-07 05:15
(Received via mailing list)
Hi
Just wondering whats reasonable to expect in terms of mongrels CPU
usage. I've established an app with 1 mongrel instance on a debian
etch box. This process idles (yes idles) on 10% - 20% - this means say
I install 10 apps each with 2 mongrels, I've used twice my cpu
capacity _without_ even accepting a hit!

is this reasonable/typical behvaviour from mongrel? What are the
minimum specs of a cpu people are typically using for mongrel?

heres my /proc/cpuinfo:
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 10
model name      : AMD Athlon(tm)
stepping        : 0
cpu MHz         : 1250.065
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts
bogomips        : 2506.90

Thanks for any hints
Glenn
8eb7bf96dd877adca0cbd29bb2e47e38?d=identicon&s=25 ryandaigle (Guest)
on 2007-02-07 14:57
(Received via mailing list)
I have never seen this kind of behavior before.  You sure they're
idle?

Here's what 'top' looks like on my non-idle site:

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
1115 deploy    16   0 50924  11m 1184 S  0.0  5.3   1:53.27
mongrel_rails
1119 deploy    16   0 61364  44m 1252 S  0.0 20.0 123:45.86
mongrel_rails
...

Note that the CPU column shows 0%.   So I would say that what you're
seeing is not standard.

-Ryan
Ba6b790851c1a7526be27325bb58834b?d=identicon&s=25 Phillip Toland (Guest)
on 2007-02-07 15:07
(Received via mailing list)
glenn wrote:
> Hi
> Just wondering whats reasonable to expect in terms of mongrels CPU
> usage. I've established an app with 1 mongrel instance on a debian
> etch box. This process idles (yes idles) on 10% - 20% - this means say
> I install 10 apps each with 2 mongrels, I've used twice my cpu
> capacity _without_ even accepting a hit!
>
> is this reasonable/typical behvaviour from mongrel? What are the
> minimum specs of a cpu people are typically using for mongrel?

FWIW, I am currently running a Rails app with 3 mongrel instances on 2
Ubuntu Dapper boxes. When I am not getting any traffic the boxes show 0%
  CPU utilization. Even under heavy loads it is unusual for me to see
more than 2-3% utilization. My boxes both have 2 dual core 3.8Ghz Zeons,
but I wouldn't expect to see the kind of utilization you are seeing even
with slower processors.

Phil
6b02afbbbeddc420d7b605e5600aefee?d=identicon&s=25 dagny (Guest)
on 2007-02-07 16:35
(Received via mailing list)
I've got 1 mongrel instance running in development mode on my win32
box. It is idling at 0% cpu, using 96 MB of ram.
The box has a 2 core cpu, 1 GB.
Ec7c0ad770bf562baa67bd7f345116b4?d=identicon&s=25 Vegan Buddy (Guest)
on 2007-02-07 17:33
(Received via mailing list)
If you're checking it with ps u, keep in mind that the %cpu is the
average usage over the time of the process.  So it will be high
initially (process startup is usually cpu intensive) and then slowly
decline and eventually level off.

If it is still 10-20% after a few minutes than there is definitely
something unusual.   Do you see anything in the mognrel3000.log or the
development.log files?


I have similar (lesser) hardware (see below.)

Here's my ps output,  3rd column is %cpu


shawn     2628  1.8  2.2  23772 21452 pts/3    S+   10:16   0:04
/usr/bin/ruby /usr/bin/mongrel_rails start -p 3002
shawn     2686 13.3  2.3  24784 22464 pts/4    S    10:19   0:07
/usr/bin/ruby /usr/bin/mongrel_rails start -p 3009

A few minutes later:

shawn     2628  0.8  2.2  23772 21452 pts/3    S+   10:16   0:04
/usr/bin/ruby /usr/bin/mongrel_rails start -p 3002
shawn     2686  2.3  2.3  24784 22464 pts/4    S    10:19   0:07
/usr/bin/ruby /usr/bin/mongrel_rails start -p 3009




/proc/cpuinfo
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 7
model name      : AMD Duron(tm) Processor
stepping        : 1
cpu MHz         : 1283.896
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips        : 2562.45


Shawn
Ca93b7c135564e9eecba37780c0458c5?d=identicon&s=25 glenn (Guest)
on 2007-02-10 00:46
(Received via mailing list)
hi all - thanks for your replies - sorry i havent been around to
respond to them - ok im feeling much better now, that I know that this
isnt normal - at least now I know that its me with the prob, not just
how mongrel is, or a limitation of my box - now I just have to work
out wtf is going on.... open to any ideas :-) ?

ryandaigle:
> I have never seen this kind of behavior before.  You sure they're
> idle?

All i know is that there are no hits happening in this time, the
server might run for hours without even a hit against apahce, let
alone anything proxied back to mongrel and still it sits >10%. I guess
its clearly not 'idle' but its certainly not serving web pages.


will check mongrel logs as you suggest veganbuddy


thanks again for all replies
Ca93b7c135564e9eecba37780c0458c5?d=identicon&s=25 glenn (Guest)
on 2007-02-10 14:17
(Received via mailing list)
hey there

On Feb 8, 3:32 am, "Vegan Buddy" <veganbu...@gmail.com> wrote:
> If you're checking it with ps u, keep in mind that the %cpu is the
> average usage over the time of the process.  So it will be high
> initially (process startup is usually cpu intensive) and then slowly
> decline and eventually level off.
>
> If it is still 10-20% after a few minutes than there is definitely
> something unusual.   Do you see anything in the mognrel3000.log or the
> development.log files?
>

i've checked the logs - nothing untoward in any logs. no activity for
days, been up for week now, and still sititng on 10%

thanks for the stats below though - al least i know what should be
happening
glenn
2ca97a08df028d4f0e37372e950111af?d=identicon&s=25 chad (Guest)
on 2007-07-03 08:58
i have a new install of mongrel on ubuntu edgy, front-end is apache
2.2.4. i see the same thing and this is the first time i've seen anyone
mention this. there are no hits on the server and mongrel runs at 10-13%
cpu usage, while 'idle'.

nothing unusual in the logs. i ran -B for full debugging and looked at
the threads.log, files.log, objects.log, etc.

so glenn isn't the only one...

glenn wrote:
> hey there
>
> On Feb 8, 3:32 am, "Vegan Buddy" <veganbu...@gmail.com> wrote:
>> If you're checking it with ps u, keep in mind that the %cpu is the
>> average usage over the time of the process.  So it will be high
>> initially (process startup is usually cpu intensive) and then slowly
>> decline and eventually level off.
>>
>> If it is still 10-20% after a few minutes than there is definitely
>> something unusual.   Do you see anything in the mognrel3000.log or the
>> development.log files?
>>
>
> i've checked the logs - nothing untoward in any logs. no activity for
> days, been up for week now, and still sititng on 10%
>
> thanks for the stats below though - al least i know what should be
> happening
> glenn
This topic is locked and can not be replied to.