<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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).<br>
<br>
Tim said it way better:
<a class="moz-txt-link-freetext" href="http://rubyforge.org/forum/forum.php?thread_id=1374&forum_id=1618">http://rubyforge.org/forum/forum.php?thread_id=1374&forum_id=1618</a><br>
<br>
phil<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:kigsteronline@mac.com">kigsteronline@mac.com</a> wrote:
<blockquote cite="midFC0D19DE-6BFC-437F-8B9E-FA4FB4192E94@mac.com"
type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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?
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Mongrel-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Mongrel-users@rubyforge.org">Mongrel-users@rubyforge.org</a>
<a class="moz-txt-link-freetext" href="http://rubyforge.org/mailman/listinfo/mongrel-users">http://rubyforge.org/mailman/listinfo/mongrel-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Phillip Kast
(909)630-9562
<a class="moz-txt-link-abbreviated" href="mailto:phil@unimedia.org">phil@unimedia.org</a></pre>
</body>
</html>