Forum Moderators: coopster

Message Too Old, No Replies

PHP Memory Usage

         

iwanttobelieve

7:26 pm on Jul 28, 2010 (gmt 0)

10+ Year Member



This is not a question about coding actually, so I am sorry for posting it here since I can't find a better forum.

Basically I have set up a local and a live server to test my website. I put a clean Wordpress installation on each server and check the memory usage by default installation and to my surprise, on my local server, WP uses 13.1MB whereas on the live one it uses 16.1MB.

Could someone please shed some light on this?

Thank you!

eelixduppy

1:29 am on Jul 29, 2010 (gmt 0)



Few questions come to mind when I read this...

1) What are you measuring? File system? Database? How?
2) Are the installations different? Could they be different versions of WP?

iwanttobelieve

1:52 am on Jul 29, 2010 (gmt 0)

10+ Year Member



Thank you for your reply!

I just use a Wordpress template and use memory_get_usage. Yes they are all 3.0. The installations are fresh without any plugins and such.

penders

8:10 am on Jul 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Same OS (Windows/Linux)? Same PHP setup (module/CGI)? Same everything?

iwanttobelieve

1:06 pm on Jul 29, 2010 (gmt 0)

10+ Year Member



Yes of course same OS but might not have the same modules installed since I don't have access to the live server, I am on a shared hosting.

Anyway is there a way to list all the modules installed on the live one?

iwanttobelieve

4:52 pm on Aug 1, 2010 (gmt 0)

10+ Year Member



Bump!

penders

5:34 pm on Aug 1, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What does
memory_get_peak_usage(true)
return in both cases? true - for the actual memory usage, rather than just the amount allocated.

iwanttobelieve

6:09 pm on Aug 2, 2010 (gmt 0)

10+ Year Member



The situation is the same, every PHP package I installed seems to use higher memory usage on live than local. Is there a module that might cause this? (such 3MB difference). If I install phpBB, the memory usage also has this difference (also 3MB).

penders

7:04 pm on Aug 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...is there a way to list all the modules installed on the live one?


I was kinda assuming you'd checked phpinfo? If you create a file called
phpinfo.php
with just:
<?php phpinfo(); ?>


Then that will display a lot of information about the configuration of PHP. Check under 'Loaded Modules' - that might give you an idea as to any differences.

What is the memory_limit? (also reported by phpinfo)

3MB is quite a difference!?

iwanttobelieve

6:11 pm on Aug 4, 2010 (gmt 0)

10+ Year Member



Hmm... in phpinfo I find nothing like "Loaded Modules" on my live server (my host hides it, maybe), I can only find "Additional Module" and ionCube Loader is listed there. This module is not loaded on my local.

I think 3MB does make a difference, I'm on a shared server so I must save memory usage. The hosts allows up to 64MB, and I am already using 30MB. (I use both phpbb and WP together, so the add-up is 6MB not 3 actually).

penders

6:59 pm on Aug 4, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...in phpinfo I find nothing like "Loaded Modules" on my live server


Is your live server IIS/Windows?

iwanttobelieve

3:22 am on Aug 5, 2010 (gmt 0)

10+ Year Member



No it's Linux. Any idea?