[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Memory consumption of Ruby/mod_ruby combo on Apache

David Heinemeier Hansson

9/9/2003 2:30:00 PM

I'm seeing memory consumption in the area of 30-35mb per Apache process
running mod_ruby with a fairly smallish web-app. I appreciate that it's
hard to generalize about this stuff, but is that normal? Is there any
obvious steps I can take to reduce the footprint? The server in
question is equipped with 256mb RAM, so it doesn't take more than eight
Apache instances to bring it to its knees.

/ David


3 Answers

mgarriss

9/9/2003 2:36:00 PM

0

David Heinemeier Hansson wrote:

> I''m seeing memory consumption in the area of 30-35mb per Apache
> process running mod_ruby with a fairly smallish web-app. I appreciate
> that it''s hard to generalize about this stuff, but is that normal? Is
> there any obvious steps I can take to reduce the footprint? The server
> in question is equipped with 256mb RAM, so it doesn''t take more than
> eight Apache instances to bring it to its knees.
>
> / David


I get about 8-10mb per process. I took no special steps. Anything
unusual about your setup? It doesn''t take a lot of lines of code to use
a lot of ram. Maybe check over what you are doing in the code...

mod_ruby-1.0.6
httpd-2.0.47
ruby 1.8.0 (2003-08-04) [i686-linux]

Michael


Tom Copeland

9/9/2003 2:41:00 PM

0

On Tue, 2003-09-09 at 10:35, mgarriss wrote:
> David Heinemeier Hansson wrote:
>
> > I''m seeing memory consumption in the area of 30-35mb per Apache
> > process running mod_ruby with a fairly smallish web-app. I appreciate
> > that it''s hard to generalize about this stuff, but is that normal? Is
> > there any obvious steps I can take to reduce the footprint? The server
> > in question is equipped with 256mb RAM, so it doesn''t take more than
> > eight Apache instances to bring it to its knees.
> >
> > / David
>
>
> I get about 8-10mb per process. I took no special steps. Anything
> unusual about your setup? It doesn''t take a lot of lines of code to use
> a lot of ram. Maybe check over what you are doing in the code...

Also, what other modules are you loading? Are there some that you can
remove?

Yours,

Tom



Ryan Pavlik

9/9/2003 4:54:00 PM

0

On Tue, 9 Sep 2003 23:35:58 +0900
mgarriss <mgarriss@earthlink.net> wrote:

> David Heinemeier Hansson wrote:
>
> > I''m seeing memory consumption in the area of 30-35mb per Apache
> > process running mod_ruby with a fairly smallish web-app. I appreciate
> > that it''s hard to generalize about this stuff, but is that normal? Is
> > there any obvious steps I can take to reduce the footprint? The server
> > in question is equipped with 256mb RAM, so it doesn''t take more than
> > eight Apache instances to bring it to its knees.
> >
> > / David
>
>
> I get about 8-10mb per process. I took no special steps. Anything
> unusual about your setup? It doesn''t take a lot of lines of code to use
> a lot of ram. Maybe check over what you are doing in the code...
>

These are both because you''re probably running fairly simple scripts and
the GC isn''t getting called a whole lot.

Put GC.start at the bottom of your scripts and I bet your memory
consumption will be fairly normal again. ;-)

Of course, this costs a bit of time, but users may not notice since the
outpt has already been sent.

--
Ryan Pavlik <rpav@mephle.com>

"And I''m 10,000 feet up in the air. Dang it." - 8BT