I am running a Drupal 6 site on my server, when I use Linux command top to check the CPU usage, I always get a high figure 80-90% of CPU loading, so my server down frequently.

I have installed over 50 modules,I am going to check which module was caused high CPU usage, could someone suggest how can I check which module was caused high CPU usage(by code or module)?


3 Answers 3


Use Devel module It will give you list of queries run when the page is loaded and the time the query has taken. From there you can check which query is coming from which module. There are many performance improvement module you could try with.
You could use too much of cache if you site has most of the static pages.

  • I have installed devel modules, but which one is used to check the query? Empty cache,Execute PHP Code,Function reference,Hook_elements(),Node_access summary,PHPinfo(),Rebuild menus,Reinstall modules,Session viewer,Theme registry,Variable editor Commented Feb 2, 2012 at 6:51
  • After installing devel module go to 'admin/settings/devel' there you will find the for 'Collect query info' and 'Display query log' and many other option. After configuration go to the page which is getting loaded very slow and check the log of queries.
    – j2r
    Commented Feb 2, 2012 at 7:35

I'd also try a PHP profiler which gives you a lot of metrics. Take a look at the XHProf module. Here is an excerpt about it from the module's project page:

... allows you to profile your Drupal application using the XHProf profiler from facebook.

It also provides a native Drupal UI (as opposed to facebook's original php front end) to view the profiling data. Having this in Drupal provides several advantages:

  • Simpler setup
  • No need to setup extra vhosts
  • Limit access via roles and permissions
  • Use alternative storage backends such as MongoDb
  • I'm using drupal 6, will i test this in production site, because the module is still in dev version.
    – Bala
    Commented Jul 8, 2013 at 5:49

Might not be the answer you're looking for, but I'd look at disabling all modules (in a test environment if you can't do this on the same machine), then enabling them one at a time until the load hits an unacceptable level.

  • I have tried before, but I found that when I disable some of the module, the site was crashed. Maybe some page is depended on some modules, so this method is not good, anyway thanks for the suggestion. Commented Feb 2, 2012 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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