<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://guaka.org"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Guaka! - hammerhead</title>
 <link>http://guaka.org/tag/hammerhead</link>
 <description></description>
 <language>en</language>
<item>
 <title>memcache doesn&#039;t necessarily speed up your Drupal sites</title>
 <link>http://guaka.org/2010/01/25/memcache-doesnt-necessarily-speed-up-your-drupal-sites</link>
 <description>&lt;div class=&quot;field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;tag: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot;&gt;&lt;a href=&quot;/tag/hammerhead&quot;&gt;hammerhead&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot;&gt;&lt;a href=&quot;/tag/lullabot&quot;&gt;lullabot&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot;&gt;&lt;a href=&quot;/tag/memcache&quot;&gt;memcache&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-3&quot;&gt;&lt;a href=&quot;/tag/performance&quot;&gt;performance&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-4&quot;&gt;&lt;a href=&quot;/tag/tuning&quot;&gt;tuning&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-5&quot;&gt;&lt;a href=&quot;/tag/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-6&quot;&gt;&lt;a href=&quot;/tag/seo&quot;&gt;seo&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-7&quot;&gt;&lt;a href=&quot;/tag/drupal-planet&quot;&gt;drupal planet&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;Sites that show up quickly on a user&#039;s screen tend to keep the user&#039;s attention for longer and also rank better in Google.  So when listening to the excellent &lt;a href=&quot;http://www.lullabot.com/audiocast/lullabot-podcast-80-top-40-drupal-modules-revisited&quot;&gt;Lullabot Podcast 80: Top 40 Drupal Modules Revisited&lt;/a&gt; I was caught by Drupal experts stating that Memcache would even speed up your site if it&#039;s not a high traffic site. It could off-load the database.  I decided to give it a try on a relatively low traffic &lt;a href=&quot;http://teakhouten-meubelen.nl/&quot;&gt;site of one of my clients&lt;/a&gt;.  The site is already being served by nginx so the load times are already pretty good.

When setting up the experimentation I was a bit confused by the &lt;a href=&quot;http://drupal.org/project/memcache&quot;&gt;thorough but chaotic instruction&lt;/a&gt; to set up memcache.  I ran into a problem setting up PECL memcache:
&lt;pre&gt;$ sudo pecl install memcache
downloading memcache-2.2.5.tgz ...
Starting to download memcache-2.2.5.tgz (35,981 bytes)
..........done: 35,981 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
shtool at &#039;/tmp/pear/temp/memcache/build/shtool&#039; does not exist or is not executable.
Make sure that the file exists and is executable and then rerun this script.

ERROR: `phpize&#039; failed&lt;/pre&gt;
Since I run Debian I solved this by running &lt;code&gt;apt-get install php5-memcache&lt;/code&gt; instead.

I restarted php-fastcgi (needed for nginx) and added &lt;code&gt;$conf[&#039;cache_inc&#039;] =&#039;sites/all/modules/memcache/memcache.db.inc&#039;;&lt;/code&gt; to settings.php.

Then I ran some tests in &lt;a href=&quot;http://stevesouders.com/hammerhead/&quot;&gt;Hammerhead&lt;/a&gt;.  Not on the front page since there is an embedded Youtube video. I chose a page without any external elements. I was a bit confused at first, and ran several short tests. I forgot to log out and the memcache module was adding a lot of extra information in the bottom.  I thought that was the reason that my site was a lot slower with memcache than without it.  So I logged out and tried again:
&lt;table id=&quot;hammerurls&quot; style=&quot;border: 1px solid #bbbbbb;&quot; border=&quot;0&quot; cellspacing=&quot;10&quot; cellpadding=&quot;10&quot;&gt;
&lt;tbody id=&quot;hammerurlsTbody&quot;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;th&gt;count&lt;/th&gt;
&lt;th&gt;latest&lt;/th&gt;
&lt;th&gt;median&lt;/th&gt;
&lt;th&gt;avg&lt;/th&gt;
&lt;/tr&gt;
&lt;tr id=&quot;hhtr_0&quot;&gt;
&lt;th&gt;empty cache with memcache&lt;/th&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1449&lt;/td&gt;
&lt;td&gt;1449&lt;/td&gt;
&lt;td&gt;1759&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;primed cache with memcache&lt;/th&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1277&lt;/td&gt;
&lt;td&gt;1186&lt;/td&gt;
&lt;td&gt;1184&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id=&quot;hhtr_0&quot;&gt;
&lt;th&gt;empty cache without memcache&lt;/th&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1239&lt;/td&gt;
&lt;td&gt;1283&lt;/td&gt;
&lt;td&gt;1483&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;primed cache without memcache&lt;/th&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1014&lt;/td&gt;
&lt;td&gt;900&lt;/td&gt;
&lt;td&gt;950&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
It could be that I&#039;d have to tweak some memcache settings, or run longer tests, but I think these numbers are clear enough: memcache made my site slower instead of faster!&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
<pubDate>Mon, 25 Jan 2010 00:50:31 +0000</pubDate>
<dc:creator>Guaka</dc:creator>
<guid isPermaLink="false">260 at http://guaka.org</guid>
</item>
</channel>
</rss>
