Real World Performance Drupal

First ask questions about what is slow and take notes on what they say.

Define goals:

Goal 800 ms latency 50/50 logged in users

Step away from the client, and assume they lied to us and that they have never been to the site.

Step 1 - you need a net console like Firebug

Take some notes on what the page times are like

front page - 8 seconds

gallery - 23 seconds

article - 12 seconds

favorities - 13 seconds

It is temping to turn on devel and see what sql query is slow, but don't stay at the overview level.

Display the query time, 

Display the query log

Go back and display the front page

pt-query-digest

Use the slow log tool kit pt-query-digest just point it to a slow log.  

Set the sloq query time to 1 second

Copy the text of the top 3 slow queries

Viewslightpager module will remove the count for the pager

Seperate a combined view into two seperate views

Xdebug

Now use Xdebug to check PHP

Just add it to web root

Try to connect to memcache with telnet and the port, if you cannot connect.

Check to see if memcache is running, yes.

Is the firewall running, yes but none of the addresses match memcache

http://localhost:888?xdebug_profile

http://localhost:888 my web site

Varnish

The client is happy with authenticated users, but not happy with annonomus users.

Enable Drupal 7 to use varnish

vi sites/default/settings.php

edit the cache from false to true

cd /etc/varnish copy this from 4 kitchens web site

vi default.vcl

look at set req.http.Cookie = regsuball(...)

change apache listen to 8080 

start varish 

varnishlog use this to see if we get hits

 

Subject