[typo] Heavy RAM usage? Instability?

Scott Laird scott at sigkill.org
Sun Jan 22 10:54:21 EST 2006

On Jan 21, 2006, at 10:41 AM, jennyw wrote:

> Justus Pendleton wrote:
>> Typo is the only ruby app I use and the only Rails app I use. I  
>> have no
>> basis to judge which of the three is the real culprit -- ruby,  
>> rails, or
>> typo -- but typo is a huge resource drain. And it has gotten much  
>> huger.
>> I have two instances of typo. One a relatively current SVNish install
>> that I use. That has 3 instances of ruby each using 43MB of virtual
>> memory. A friend is using an older version (2.4? 2.5?) and that  
>> one is
>> using 23MB of virtual memory.
> It's sad to hear that other people are experiencing this, too. I
> originally chose Typo because it was lighter weight than WP.  That's
> still true for LOC, which counts for a lot, but I'm surprised at how
> resource intensive it is.
> I've noticed that Typo takes up 50% more memory than another RoR
> application I have running (which has almost as much code as Typo).  
> I'm
> not sure why Typo is taking up so much memory, especially since it's a
> low-traffic site. In other words, the memory taken up isn't by a  
> lot of
> controller instances existing at the same time. It's the amount of
> memory taken up when there are no pages being served (but after the
> first page has been served).
> I haven't looked through the code thoroughly, but I notice that there
> are a lot of things loaded in environment.rb (using require_dependency
> -- since environment.rb is loaded only once, I'm pretty sure that  
> this 
> is the same as require, per
> http://wiki.rubyonrails.org/rails/pages/RequireDependency).  Is it
> necessary to load everything here? I don't know that everyone is going
> to be using jabber, flickr, tada, etc.  I did try and comment many of
> them out, and noticed only a small decrease in memory (of course, I
> might have missed commenting out the cuplprit(s)).
> I also noticed that when the site first starts up, the memory usage is
> similar to other Rails applications. After loading the first page, the
> size almost doubles, so I thought there might be something in the
> controllers causing the meory usage. And, yet, application.rb and
> articles_controller.rb seem pretty innocent -- neither, at a  
> glance, is
> loading much stuff.
> Any ideas what's taking up all the memory?

A couple questions:

1.  Is the memory usage fairly constant, or is it growing?  There was  
a memory leak in Rails 0.14.2 (I think) that caused Typo to grow  
without bound; that leak has been fixed, but there could be other leaks.
2.  How much memory is Typo using.  I keep hearing numbers like  
"lots", but I've only seen one set of numbers so far.

I'll try to look into this soon, but I need to fix a few bugs first,  
and my schedule has been fairly unpredictable lately.


More information about the Typo-list mailing list