reducing size of apache instances

Dan Nelson dnelson at
Sat Sep 12 03:25:34 UTC 2009

In the last episode (Sep 11), John Almberg said:
> > In this case you don't want to look at processes with big RES, you
> > want to find processes with a big difference between RES and SIZE
> > and/or the ones with flat-out largest SIZE.  Try sorting top by SIZE
> > and see what bubbles up.  (Ignore rpc.statd if it's running.)
> Huh... okay. That's interesting.
> Well the biggest SIZE process is mysql, followed by three mongrel
> instances (for a ruby on rails app), and then a bunch of httpd processes.
> Mysql is optimized for a small server, there isn't much I can do about the
> size of the Rails app, so the apache instances seemed like the logical
> place to start.
> I'm starting to wonder about the Swap info from top... it never changes. 
> It has said the same thing all day, since I've been watching it.  Does
> that make sense?
> Swap: 2008M Total, 150M Used, 1858M Free, 7% Inuse

If you previously ran some memory-intensive program, the system would have
pushed some unused data out to disk ( login processes for unused VTYs, other
daemons that are rarely used, etc ), but it won't free up that swap space
until those processes exit.  As long as you don't see "###K Out, ###K In" on
that swap line, you're not actively using the swap space and don't have to

	Dan Nelson
	dnelson at

More information about the freebsd-questions mailing list