From: Ryan Pavlik Date: 2003-09-10T01:53:52+09:00 Subject: Re: Memory consumption of Ruby/mod_ruby combo on Apache On Tue, 9 Sep 2003 23:35:58 +0900 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... > 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 "And I'm 10,000 feet up in the air. Dang it." - 8BT