Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from drupal.stackexchange.com Jan 26 '12 at 13:17

This question came from our site for Drupal developers and administrators.

    
Maybe you have APC in your old server but not in new one. –  Sivaji Jan 26 '12 at 13:10

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
what should I include in the PHP file? –  Dan Hanly Jan 26 '12 at 14:38
    
I think he's talking about phpinfo() –  Safado Jan 26 '12 at 14:58
    
<?php phpinfo(); ?> –  psatek Jan 26 '12 at 15:05

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.

share|improve this answer
    
Thanks for this. Yeah, I understand it's pretty low, but I think the server admin is concerned because the server supports a few websites and they don't want my Drupal installation eating all the memory. As a non-server admin (one with only FTP access), is there anything I can do to identify configuration and perhaps compare the two servers? I'd like to present something to the server admin who may be able to help. –  Dan Hanly Jan 26 '12 at 13:22
    
You could check php settings with phpinfo(); and compare the servers. –  mikkoko Jan 26 '12 at 14:44
    
Also, if the server (or your site in .htaccess) has a sane PHP memory_limit setting, the server admin shouldn't worry about this. –  mikkoko Jan 26 '12 at 14:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.