[typo] Heavy RAM usage? Instability?

jennyw jennyw at dangerousideas.com
Sat Jan 21 13:41:58 EST 2006


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?

Jen


More information about the Typo-list mailing list