[Mongrel] memory issues -- mongrel part of the problem?

Charles Brian Quinn me at seebq.com
Sat Nov 18 11:45:30 EST 2006


Phillip, thanks for this tip,

We had a customer (www.curbly.com) that made lifehacker and the front
page of digg yesterday and had some Rmagick resizing on account signup
(and other places).  We re-deployed with the GC.start fixes during the
on-slaught (the box hit 30.0+ load) and after that, she performed a
lot better (normally -- load well under 1.0).  The box was running
apache 2.2.2 (mpm-prefork) with mod_proxy_balancer and 3 mongrel
instances (!)

Thanks!
-- 
Charles Brian Quinn
self-promotion: www.seebq.com
highgroove studios: www.highgroove.com
slingshot hosting: www.slingshothosting.com

On 11/15/06, Phillip Kast <phil at unimedia.org> wrote:
>
>  So what's going on here is that RMagick allocates memory in a way that
> isn't visible to the ruby garbage collector. If you don't have 500Mb to
> burn, you can manually start garbage collection more often (as long as your
> RMagick objects are passing out of scope, not still referenced somewhere).
>
>  Tim said it way better:
> http://rubyforge.org/forum/forum.php?thread_id=1374&forum_id=1618
>
>  phil
>
>
>
>  kigsteronline at mac.com wrote:
>  We are using RMagick / mongrel / apache, and recently had to run a
> migration that had to process approximately 7000 images, by
> generating a thumbnail and a JPEG out of a large PNG.
>
> The migration took about 5 minutes to complete, and while it was
> running I was watching the RAM/CPU of the rake process that was
> running it. The process RSS was fluctuating between 200Mb and
> 500Mb... It seems like once the garbage collection kicked in, the RSS
> went down by up to 300Mb, and then slowly climb back up. Clearly,
> this is a very high memory footprint for a web server process, but
> should be acceptable for a dedicated background process.
>
> Thanks
> Konstantin
>
>
> On Nov 15, 2006, at 8:15 AM, Carl Lerche wrote:
>
>
>
>  I've been using RMagick within my rails apps for all my image
> manipulation needs so far. I have been wondering about how the image
> stuff was handled memory wise. Everything has been running smoothly so
> far so I didn't really worry about it. In the future though, what
> would be the better approach?
>
> 1) Using mini_magick within my rails apps
> 2) Using RMagick in a BackgroundRB process
> - 1+2
>
> I'm guessing that if mini_magick doesn't load anything into memory,
> running it inside the rails app should be fine?
>
>  _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
>
>
>
>  --
> Phillip Kast
> (909)630-9562
> phil at unimedia.org
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
>


More information about the Mongrel-users mailing list