Like most, I have a test and a production env. Both are CentOS 5, Ruby
1.8.6, Rails 2.0.2, MySQL 5, and Apache. Both were setup using the
same procedure. Except for the hardware (test: Intel, prod: AMD) and
memory (test: 512M, prod: 1G), both systems are essentially the same
right down to the Rails env. Unfortunately, memory usage is very
different for each.
The test system has 2 mongrel instances running. According to top,
they start at around 50M memory, but within a few pages they are
quickly up to 100M. The production systems have 5 mongrels, and they
start at around 50M as well. However, hit them with thousands of page
views and their memory usage rarely passes 60M. It’s almost as if the
GC isn’t running on the test system. There is still plenty of free
memory on the prod system (148M). The test system will usually use it
all up and often begin swapping.
Any thoughts? Any ideas where I might look? I prefer to not even pay
for the 512M VM for the test system, but it doesn’t seem to want to