views:

44

answers:

1

On my development machine my application used up about 4-6MB of memory per request. After switching to a production machine those numbers went as high as 21+MB per request, without any speed improvement (0.30 - 1.2 seconds, which I really hoped to improve on my production machine). Some portions of application (like database bootstrapping) used up 271KB on a development machine and 2.5MB on the production one, so I'm wondering what could be the reason for this. My application uses Zend Framework 1.10.8 (MVC) and Doctrine 2.0beta4 ORM and PDO_MySQL as a database adapter.

My development machine: Windows 7 32bit, 1.8GHz Dual Core, 2GB RAM, PHP 5.3.2, Apache 2.2.15, MySQLnd 5.0.7-dev (Zend Server CE)

My production machine: CentOS 5.5 64bit, 2.66GHz Quad Core, 8GB RAM, PHP 5.3.3, Apache 2.2.16, MySQL 5.1.48

Also, I wasn't really able to find a bottleneck, it's like it's application-wide. Please tell me if I should provide any additional info.

Update:
Zend Server, which I use on my dev machine, has Zend Optimizer+ and APC enabled, and my sysadmin recommended me that I should use eAccelerator, so I followed his advice. However, on phpinfo() I see this:

eAccelerator 0.9.6.1
Caching Enabled  true
Optimizer Enabled    true
Check mtime Enabled  true
Memory Size          16,777,144 Bytes
Memory Available     16,772,976 Bytes
Memory Allocated     4,168 Bytes
Cached Scripts       0
Removed Scripts      0

Does that mean it's not properly configured?

A: 

Windows 7 32bit,

CentOS 5.5 64bit,

Col. Shrapnel
Is it really that much of a difference? I mean, 4-6MB -> 21MB is more than 100% increase
Robus
I was actually wondering the same thing. Does this mean I should switch to a 32bit OS for a better performance, or am I missing something?
Gray Fox
@Gray i believe so. But your opening question is unclear to me. Do you mean only memory consumption or timings too? Why don't you profile your app? 1 second is a shitload of time, I can't beieve there are no certain bottlenecks. Anyway, for the monstrous frameworks and ORMS an opcode cacher is obligatory, check here: http://stackoverflow.com/questions/28716/
Col. Shrapnel
Thanks for your response, I updated my original post.
Gray Fox