I migrated my website to a new server recently.
The server administrator mentioned that the website uses a large amount of memory.
I didn't have FTP access at the time, so on my test server version (the original before migration) which was still active, I ran memory_get_usage() in my template to output it to the page. This outputted a value equal to about 27.5M, which is within regulations.
In the meantime, I went through the live version and disabled any modules that I didn't need (installed a few during development that I no longer need) and turned off 'Rebuild Theme Registry on Page Load', but the live server admin still reported it being too high.
After acquiring FTP Access, I copied the memory_get_usage() onto the live version. This now reports 40M.
So the test version is 27.5M and the live version is 40M with a considerable degree less modules and without rebuilding the theme registry.
What could cause this?
UPDATE
I've gone through the website and disabled all modules that are unused, then deleted them from the FTP. Set up caching for anonymous users, then cleared the cache, turned off rebuild theme registry. Opted to optimise and aggregate scripts and I'm still running at 36M on the live server and 27.5M on the test server. Can anybody help?
If you were running under exactly the same conditions, the memory usage would be the same. Most likely the different is caused by server setup, stuff like opcode caching, PHP version, web server etc will all influence memory usage.
Still using 27M or 36M is low for a Drupal site.
Expanding on Googletorp's answer. The extra RAM usage is probably due to different server configurations. You can have a look at some of these variables by making a php file which just contains on both servers navigate to this with your browser and have a look for any differences between the two.
There are so many different things that can cause it, that it may not be worth trying to figure out why and what the cause is. But just to accept that it's going to be different from server to server.