Jump to content

Memory consumption - difference between three machines


dlublink

Recommended Posts

Hello,

 

I have three "servers". 2 machines with 64-bit dual processor, 12 cores, 24 threads at 2.80GHz each. 8 gigs of memory each and a bunch of disks. 3 SATA 10,000k disks in raid 1 with hot spare each. We'll call these two "production"

 

I have a third machine P4 2.40GHz with 500 megabytes of memory and a 8gig ide disk. We'll call this one "development"

 

Both are running php5 under lighttpd fast cgi and APC.

 

Here's the mystery, both have exactly the same code ( synched with svn ). On the production machines, the reference page takes 16megabytes of memory. On the development machine, the same reference page takes 8 megabytes.

 

I have run the test several times. I am using the same database ( mysqldump ) on both machines. Why are the production machines taking twice as much memory as the development machine ?

 

Production machines are running cracklib mod and 3rd machine is running xdebug. I disabled both so they'd be the same. Still have the difference.

 

I did an phpinfo() on both machines. The differences were with the xdebug and cracklib libraries ( which I reenabled before the phpinfo()), server name, IP.

 

I disabled apc cache on both machines, thinking this was my problem, the memory consomption stays the same.

 

What is causing such a big difference in memory consomption? Is there a cachegrind for memory usage ? Any ideas where to look?

 

Ubuntu 10.04 LTS is the O/S

 

Thanks,

 

David

Link to comment
Share on other sites

Are both machines using a 64-bit OS?  If your production is 64-bit and your dev is 32-bit, that would do it.

 

Having a 64-bit OS would cause PHP's memory consomption to double?!??!

 

  And you're checking your memory usage with memory_get_peak_usage()?

 

I was using memory_get_usage() not memory_get_peak_usage(). On both machines the difference is about 200,000 bytes ( between memory_get_usage and memory_get_peak_usage ). The production ( 64bit ) machines use about 15 megabytes and the development ( 32bit ) machine is at about 8.5 megabytes.

 

I am convinced there is something else going on, it does not make sense to me that there is such a large difference in memory consomption.

 

David

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.