6

I'm hosting Drupal on Dreamhost shared hosting where I have a maximum of 90 MB RAM and a lot of enabled modules.
Is there a way to see how much memory each module is using?

1
  • Accepting Berdir's answer due to completeness and it seems like the most standard way of doing things.
    – aendra
    Apr 29, 2011 at 6:03

2 Answers 2

10

No, unfortunately, this is not possible. The used memory of a module is scattered among many functions, caches, etc.

There are tools which allow you to display the memory usage per function, how much time a function used, and so on; for example, there are XHProf and Xdebug, but both are PHP extensions and you will not be able to install them on a shared host.

You could, however, create a local installation (if you haven't already) and then check these tools out. Devel integrates nicely with XHProf, so you only need to install the extension, and enable the corresponding checkbox in the configuration settings of Devel.

3
  • devel and xhprof play nicely together on D6 as well. Apr 27, 2011 at 8:14
  • and on Windows!
    – Andy
    Apr 27, 2011 at 12:53
  • and if you have a Dreamhost VPS with root access (like I do) you can pretty much do anything you want, like compiling your own PHP and installing XHProf. Apr 28, 2011 at 20:04
7

Pounard does have an experimental module for that.

I already talk with him, he knows that this is highly experimental and you really should make a backup of your data before trying this module.

Maybe that could help.

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.