On 19 May 2008, at 11:18, Morgan G. wrote:
From what I’ve read elsewhere people generally accept 60M as a good
size for a Mongrel to get to so I’m wondering what they’re doing
different. It’s not possible that the few constants we use (all
defined in environment.rb) would expand in memory to 100M+. I’d like
to think this site isn’t so complicated that it bloats out by so
much. It’s not doing much that is actually complicated (all the
tricky work is in the spam detection).
The memory use depends on the application, 60M is an average, not a
maximum. As you can see in (part of) my “top” dump, some apps are
using substantially less, some substantially more.
We don’t process that many images, relatively speaking, but I’m
currently investigating replacing RMagick (among other things) as I
am aware of it’s leaking-like-a-sieve tendencies.
RMagick doesn’t leak memory like a sieve FYI, I have an app that uses
it extensively and memory use is rock stable. In the past, you had to
start the garbage collection manually, if you didn’t, memory
consumption would rise. However, since the latest release garbage
collection is automatic. You do need to know that because of the size
of the library, RMagick will consume quite a bit of memory. So if
you’re only looking for thumbnailing or simple transformations and
memory is a constraint, other solutions like MiniMagick or
ImageScience might be more appropriate.
How big are the Mongrels you guys are running?
Too bad the server was restarted just a couple of days ago, because I
can honestly tell you you’ll get about the same figure in a month or
three. Also, having 15 mongrels for an application that’s just
released is just way overkill and probably will even slow down your
server. There have been so many articles about this subject, a simple
“how many mongrels” search on Google will turn up quite a few results.
Please read those.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2342 capistra 16 0 70108 51m 4384 S 15.3 7.2 486:47.38
mongrel_rails
2336 capistra 16 0 70140 51m 4380 S 0.0 7.2 491:29.64
mongrel_rails
2339 capistra 16 0 69940 50m 4384 S 0.0 7.1 492:32.39
mongrel_rails
2354 capistra 16 0 49408 26m 3352 S 0.0 3.8 0:03.83
mongrel_rails
2357 capistra 16 0 49420 21m 3352 S 0.0 3.0 0:03.78
mongrel_rails
2361 capistra 16 0 61324 41m 3568 S 0.0 5.8 0:11.49
mongrel_rails
2365 capistra 16 0 67224 33m 3076 S 0.0 4.6 0:09.13
mongrel_rails
2368 capistra 16 0 68024 34m 3028 S 0.0 4.8 0:09.31
mongrel_rails
15881 capistra 16 0 59800 40m 3572 S 0.0 5.7 1:40.15
mongrel_rails
22270 capistra 16 0 61536 42m 3604 S 0.0 5.9 0:31.68
mongrel_rails
Best regards
Peter De Berdt