I don't have the time to be overly helpful, but I thought I'd chime in
with some pointers.
First off, 75 Apache processes? That seems pretty excessive. I've
worked with some high volume installations of Apache that weren't
using that many child processes.
The virtual memory errors you are having could be caused by that
number alone. But I'm also wondering about how many Ruby processes
you are running as well.
Since you are optimizing for memory usage, I would start by scaling
way back. Maybe drop your max Apache children setting to 15, and your
minimum to 8. I'd also run about 5 or 6 mongrel processes.
You should also be using a tool like monit[1], specifically for its
ability to restart processes that are using too much memory. I'd set
a strict cap for those mongrel processes, once they exceed your memory
usage threshold, restart them.
Now, none of the above is considering the podcasts you are serving.
If they are big, I can see them using Apache processes during the file
transfers. I'd make sure that only Apache is involved with the
podcast download, and that Rails wasn't being invoked whatsoever.
You could further optimize by moving the podcasts to another host,
like a cheap Dreamhost account.
Hope this was helpful.
Footnotes:
[1] http://tildeslash.com/monit/
--
Peter Jones, pmade inc.
http://pmade.com
Ward-
I'd guess that adding more Apache processes isn't go to be the
solution. In all likely hood your VPS is getting backed up by latency
and spinning off more Apache processes which is compounding the issue.
Given that 100K page views isn't really that high (you're looking at a
little over two page views a minute -- what's your total
requests/month?), I would guess that you might need to optimize your
application and/or add more caching if possible. It could also be
latency in the database... maybe bad indexes or queries?
I'd be happy to work on helping to diagnose the issue for you, but I
would be able to until this weekend (time constraints from my day
job). Please feel free to contact me if this is issue is still
unresolved.
Good luck,
Ben
bensch...@gmail.com