Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My drupal site on the development machine loads the pages slow. A page takes between 1500ms and 2500ms. The same site in production on the internet loads pages quick.

Using development tools in drupal I can see that for a simple page with some text and a few custom queries the MySql queries takes about 40ms.

Using YSlow I can see that loading the doc takes more than 2 seconds, all the other components like images, js, css about 500ms.

Disabeling virus scanner makes it another 100ms faster.

I have tried to narrow down the problem but cannot find it. I still have about 1.5 seconds delay I cannot explain. My development environment is:

Windows 7 (64bit) Apache/2.2.21 (Win32) mod_fcgid/2.3.6 PHP 5.3.8 MySQL Server 5.5

I would like some advice as where to look for the cause of this problem.

share|improve this question

closed as off topic by Michael Hampton, mdpc, Khaled, splattne Feb 4 '13 at 11:20

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

The first thing I suspect is that youre not running a php opcode cacher.

Is CPU or memory really scarce? What's the hardware in the test machine btw?

Assuming there's no visible spike in cpu, nor scarce memory / heavy paging:

Is phpinfo() loading quickly? (stick <?php phpinfo(); ?> into a file called something like info.php and fetch it). If yes, your drupal might be trying to resolve the clients address, do a geoip lookup or something else which would explain the 1 second delay, and if other php scripts runs quickly then have fun finding the reason.

share|improve this answer
I do not use a php opcode cacher. – Asimov Feb 3 '13 at 22:31
I am also not using a php opcode cacher on my production site (not that I know of). The production site is on a Linux VPC. I could start using an accelerator but still I cannot explain the difference in load times between development and production. – Asimov Feb 3 '13 at 22:40
I can tell you now that using APC with PHP makes no (or very small) difference. There is still a wait of 1 to 1.5 seconds before the page loads. – Asimov Feb 4 '13 at 1:37
Thanks for your help so far. Unfortunately the question is closed for being off topic without motivation. – Asimov Feb 4 '13 at 15:16
So, Michael Hampton sir, please tell me why this question had to be closed? Just stating it is off topic is not very helpful. – Asimov Feb 4 '13 at 17:01

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