dergachev / vagrant_drupal

Deploy a local Drupal development stack with Vagrant.
9 stars 2 forks source link

Document xhprof and mysql usage #8

Open dergachev opened 11 years ago

dergachev commented 11 years ago

For the third time, I've forgotten how to get xhprof up and running. Here's how to do it:

After that, drupal will inject the correct link at the bottom of every web page. Disable that checkbox to get rid of it.

Adding the "-d" (debug) flag to any drush command will produce an xhprof link, eg drush cc all -d

dergachev commented 11 years ago

On a somewhat related note, my xhprof shows that DB cache is killing performance. So to get memcache going, we follow the instructions for installing memcached.module (http://drupal.org/node/1131468)

# sudo is required until the permissions issue is resolved
sudo drush dl memcache
sudo drush en -y memache memcache_admin
sudo vim sites/default/settings.php 

sudo tee -a sites/default/settings.php << 'EOF' 
$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['memcache_key_prefix'] = 'drupal_k2j4k32j'; #something unique and random
EOF

This did the trick!