I believe that one of my websites is running rather slowly. I have done nothing different than I have on other Drupal websites that I have done that are running on different servers and that are running much faster.

Would this "slowness" be somehow described by the fact that the page takes 4 times longer to load than it does to actually execute the SQL queries?

Page execution time was 2251.03 ms. Executed 342 queries in 477.02 milliseconds.

If you see above, you can see that it takes more than 4 times longer to execute the page than it does to actually get the data it needs to show on the page.

I have another site that is nearly identical and I have much faster load times:

Executed 241 queries in 108.32 milliseconds. Page execution time was 1065.35 ms.

What explains the difference between the two sites, and how could I go about fixing the slow site?

  • 1
    Ironically, your 'faster' site has 900% time in CPU compared to the database while the slow site which only has 300%. It may be faster overall, but the massive discrepancy between database access and everything else is still there. Aug 18, 2011 at 14:33

1 Answer 1


Here is an easy calculation:

page_execution_time = query_time + php_time;

So basically you seem to do quite a lot of stuff in php. Same basic stuff you could do

  • Use some opcode cache, for example apc
  • Find out what needs a lot of time using xhprof
  • +1 to use xhprof. It will give very comprehensive picture of page execution bottlenecks. Aug 19, 2011 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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