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

Phillip Kast phil at unimedia.org
Wed Nov 15 19:04:07 EST 2006


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061115/70310e26/attachment.html 


More information about the Mongrel-users mailing list