I have an project running on a dedicated server:
Debian, P4 CPU 3.00GHz, 1GB RAM,
ruby 1.8.4 (2005-12-24) [x86_64-linux],
rails (1.0.0), activerecord (1.13.2)
lighttpd-1.4.10 + fastcgi + mysql 5.0
The project is a game, so a typical user would visit 100+ pages.
When the server is busiest, it gets 35-40k requests/hour.
For some misterious reason after a number of hours the whole thing
moving slower, typically the server load goes up to 5-8 and I know that
have to either start killing dispatch.fcgi processes, or simply restart
It is definitely not the fact that the server cannot deal the number of
requests. It appears that some of the dispatch.fcgi processes simply
the server to a semihalt. Killing the culprit makes the load go under 1%
the game itself several times faster. The problem is that I never know
one is the one causing the problems.
I have attempted to find and fix memory leaks, I have removed rmagick
file_column since it was said that rmagick was causing leaks;
I have removed the unnecessary services, I am keeping the lighttpd
configuration to a minimum, yet, I pretty much have to restart the
Are there any special tricks that have to be done to have the
behave? And maybe to use less RAM?
Any suggestions are welcome.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
avirtual 8177 0.1 0.2 20124 2232 ? S 13:35 0:11
avirtual 8178 2.2 11.2 147620 115436 ? R 13:35 2:37
avirtual 8179 2.0 14.2 177640 145588 ? S 13:35 2:22
avirtual 8180 2.1 13.6 172560 140140 ? S 13:35 2:31
avirtual 8181 1.4 0.1 178156 1512 ? S 13:35 1:43
avirtual 8182 2.2 9.1 131236 93564 ? R 13:35 2:34
avirtual 8184 2.0 14.1 177920 145164 ? S 13:35 2:23
avirtual 8186 2.7 13.8 173764 141844 ? S 13:35 3:12