On my local dev machine (Ubuntu 10.10) a web application seems to consume approximately 10Mb of memory (according to top). This is Apache2, pre fork, php5.3
On my server which is the same basic setup as my local dev machine, apache is consuming approximately 30Mb per processes (via top).
I cant think of any modules that production has that my local copy doesn't (php or apache). The only difference is that production is a lot busier than local (obviously) but I didn't think that would really make such a difference.
My question is, what can I do to troubleshoot this and work out why apache2/php is using so much ram on production per apache process?
You could start by running phpinfo() on both machines, which will list all Apache modules and PHP extensions installed on both, as well as possibly relevant PHP or Apache configuration options.
You also didn't mention which OS your server uses. Could PHP or Apache be statically compiled there instead or something? Or could you be misinterpreting the columns - including memory that is shared or something?