Jump to content

dlublink

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dlublink's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, Can I set the priority on my scripts relating to swap? Something like set_swap(10); would mean that it will be first to go into swap and set_swap(1) means it will go as a last resort and set_swap(5) being the default ? Kind of like the proc_nice() but for memory ? Thanks, David
  2. Hello, So I am trying to reduce my memory footprint to the lowest possible value without sacrificing functionality. I noticed that if I write a comment that is 2kb long, it costs me 2kb more memory to run the script. How can I get PHP to free the memory taken up by comments? It seems like it would be a real pain in the butt to have to run php -w on all my source files each time I update my server. Any ideas? Thanks. David
  3. Having a 64-bit OS would cause PHP's memory consomption to double?!??! 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
  4. 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
×
×
  • 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.