[Mongrel] How normal is this memory usage?
zedshaw at zedshaw.com
Fri Jun 16 14:01:02 EDT 2006
On Fri, 2006-06-16 at 11:23 -0400, Wilson Bilkovich wrote:
> The following is from just two invocations of "mongrel_rails". Is
> this normal? 57M x 3 seems a little high to me.
Man, if this was Java you'd be jumping with joy at "just" 57M for three
> This is the latest pre-release, Debian sarge, on my VPS. Two Rails
> apps running against SQLite3, with Pound in front.
Kind of OT, but do you run into problems with the three instances
accessing one SQLite3 db at the same time? There has always been
concurrency problems with the sqlite3 driver (and sqlite2).
> PID %MEM USER PR NI VIRT SHR RES S %CPU TIME+ COMMAND
> 20220 29.7 wilson 16 0 63352 2044 57m S 0.0 0:03.19
> 20222 29.7 wilson 16 0 63352 2044 57m S 0.0 0:00.00
> 20223 29.7 wilson 15 0 63352 2044 57m S 0.0 0:00.00
> 20191 11.0 wilson 16 0 27144 1704 21m S 0.0 0:02.58
> 20193 11.0 wilson 16 0 27144 1704 21m S 0.0 0:00.00
> 20194 11.0 wilson 15 0 27144 1704 21m S 0.0 0:00.00
You're running a total of 6 instances and 3 of them seem to have high
First off your pound setup may be "favoring" those first three, which
isn't so bad but would explain why it's unevenly distributed. If this
is the case then you could probably just get rid of the other three
since it seems like they aren't being used.
Second, make sure you have the very latest pre-release as it fixes a big
socket/thread leak which could very well cause this. One way to verify
that you have the right version is run this comman:
while true; do ab -n 1000 -c 30 http://localhost:3000/ 2>/dev/null |
grep quest.*mean ; echo -- ; done
against one of the intances and see if your speed continually drops. If
it drops then update from the pre-release.
Hit me up on IRC for more help.
Zed A. Shaw
More information about the Mongrel-users