I'm running several Drupal sites on a single Drupal 6.x installation on a virtual private server service. The service uses separate web (php5) and mysql servers, with a "guaranteed" 300MB RAM for each. The combined sites have very modest traffic (200-400 page views daily, for all sites combined); I can't imagine there should be a need for heavier hardware.
Things have gone well, except for RAM usage creeping upward on the web server over the last few weeks, for no reason I'm aware of – there's no traffic growth, no new modules enabled, etc. For the last couple of days the web server has begun hitting its 300MB RAM limit when starting apache processes, killing processes with the result of connection timeouts and drops. (On the other hand, CPU usage is modest, save for the occasional isolated spike.)
The mysql server, meanwhile, maintains an extremely steady 100MB RAM usage and negligible CPU usage. It has plenty of unused capacity.
The question: What are the most important steps to cutting RAM usage on the web server? Using fewer modules is the obvious one, but in addition, are there recommended steps that would shift some RAM burden from the busy web server to the less-busy mysql server? Or shift some burden from RAM usage to CPU usage?
In particular, I'm uncertain where caching fits in to the scheme. The sites in question all use basic Drupal anonymous page caching, with some also using one or more of Boost, Gzip page compression, Block cache, and CSS/JavaScript optimization. I had thought that all of these would reduce RAM requirements; do I have that backward?
My great thanks for any advice. I'll be happy to follow up here with a report on the outcome.