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?
-
Accepting Berdir's answer due to completeness and it seems like the most standard way of doing things.– aendraCommented Apr 29, 2011 at 6:03
2 Answers
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.
-
-
-
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. Commented Apr 28, 2011 at 20:04
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.