<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mudy's Blog</title>
	<atom:link href="http://mudy.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mudy.wordpress.com</link>
	<description>Just another Wordpress.com weblog</description>
	<lastBuildDate>Sun, 25 Sep 2011 18:54:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mudy.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mudy's Blog</title>
		<link>http://mudy.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mudy.wordpress.com/osd.xml" title="Mudy&#039;s Blog" />
	<atom:link rel='hub' href='http://mudy.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Please use my new blog address</title>
		<link>http://mudy.wordpress.com/2009/02/24/please-use-my-new-blog-address/</link>
		<comments>http://mudy.wordpress.com/2009/02/24/please-use-my-new-blog-address/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 18:08:29 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mudy.wordpress.com/?p=156</guid>
		<description><![CDATA[I no longer update here. Please vist my new address Mudy&#8217;s Blog.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=156&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I no longer update here.</p>
<p>Please vist my new address <a href="http://blog.mudy.info/">Mudy&#8217;s Blog</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=156&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/24/please-use-my-new-blog-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>A lot Cloud buzz today</title>
		<link>http://mudy.wordpress.com/2009/02/23/a-lot-cloud-buzz-today/</link>
		<comments>http://mudy.wordpress.com/2009/02/23/a-lot-cloud-buzz-today/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 19:16:10 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[stock]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/?p=155</guid>
		<description><![CDATA[Cloud is going to NASDAQ Ubuntu closed cloud Free XenServer Above the cloud I have used ubuntu 8.1 ec2 release for a while. I am actually very impressed by the beta version ubuntu cloud. It is a very lean version of ubuntu server. The default configuration run very fast with minimal number of services comparing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=155&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://aws.typepad.com/aws/2009/02/executive-briefing-on-cloud-computing.html">Cloud is going to NASDAQ</a></li>
<li><a href="http://news.cnet.com/8301-13505_3-10169398-16.html">Ubuntu closed cloud</a></li>
<li><a href="http://news.cnet.com/8301-1001_3-10169695-92.html">Free XenServer</a></li>
<li><a href="http://d1smfj0g31qzek.cloudfront.net/abovetheclouds.pdf">Above the cloud</a></li>
</ul>
<p>I have used ubuntu 8.1 ec2 release for a while. I am actually very impressed by the <a href="http://www.ubuntu.com/products/whatisubuntu/serveredition/features/ec2">beta version ubuntu cloud</a>. It is a very lean version of ubuntu server. The default configuration run very fast with minimal number of services comparing to CentOS or Redhat. It is fast.</p>
<p>Meanwhile stock market indexes fall to <a href="http://www.google.com/hostednews/ap/article/ALeqM5gHs5OM3gFG_DytQQZFbWfgPT08MAD96HF5FG0">1997 levels</a>, and Nasdaq took the lead.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=155&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/23/a-lot-cloud-buzz-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>Generate ShoreWall blacklist from Spamhaus and DShield</title>
		<link>http://mudy.wordpress.com/2009/02/21/shorewall-blacklist-spamhaus-dshield/</link>
		<comments>http://mudy.wordpress.com/2009/02/21/shorewall-blacklist-spamhaus-dshield/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 06:14:13 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[blacklist]]></category>
		<category><![CDATA[dshield]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[shorewall]]></category>
		<category><![CDATA[spamhaus]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/?p=131</guid>
		<description><![CDATA[I wrote a bash script to automatically generate Shorewall blacklist from Spamhaus drop list and dshield.org&#8217;s block list . Do not run this script automatically if ssh is the only mean you connect to your server, because you can accidentally blacklist yourself. And you may not run it more often then once per hour due to spamhaus [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=131&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wrote a bash script to automatically generate <a href="http://www.shorewall.net/">Shorewall </a>blacklist from <a href="http://www.spamhaus.org/drop/index.lasso">Spamhaus drop list</a> and <a href="http://feeds.dshield.org/block.txt">dshield.org&#8217;s block list</a> .</p>
<p>Do not run this script automatically if ssh is the only mean you connect to your server, because you can accidentally blacklist yourself. And you may not run it more often then once per hour due to spamhaus limitation.</p>
<pre>#!/bin/sh

echo "#ADDRESS/SUBNET         PROTOCOL        PORT" &gt; /tmp/blacklist
wget  -q -O - http://feeds.dshield.org/block.txt | awk --posix '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.0\t/ { print $1 "/24";}' &gt;&gt; /tmp/blacklist
wget -q -O - http://www.spamhaus.org/drop/drop.lasso | awk --posix '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\// { print $1;}' &gt;&gt; /tmp/blacklist
echo "#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE" &gt;&gt; /tmp/blacklist
mv /tmp/blacklist /etc/shorewall/blacklist

shorewall refresh &amp;&gt;/dev/null
</pre>
<p>I also use <a href="http://www.fail2ban.org/wiki/index.php/Main_Page">fail2ban </a>to generate dynamic shorewall ban list.</p>
<p>UPDATE: And don&#8217;t forget enable blacklist option in /etc/shorewall/shorewall.conf</p>
<pre>BLACKLIST_DISPOSITION=DROP</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=131&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/21/shorewall-blacklist-spamhaus-dshield/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>Nginx vs Cherokee</title>
		<link>http://mudy.wordpress.com/2009/02/20/nginx-vs-cherokee/</link>
		<comments>http://mudy.wordpress.com/2009/02/20/nginx-vs-cherokee/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 21:51:06 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[cherokee]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/?p=128</guid>
		<description><![CDATA[I did a micro benchmark for quick comparison between nginx and cherokee on Linode 540 VPS. Result may differ on a dedicate server. static file(100MB) Cherokee Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Finished 200 requests Server Software: Cherokee/0.99.0 Server Hostname: localhost Server Port: 80 Document Path: /100mb.test Document Length: 104857600 bytes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=128&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I did a micro benchmark for quick comparison between nginx and cherokee on Linode 540 VPS. Result may differ on a dedicate server.</p>
<p>static file(100MB)</p>
<table border="0">
<tbody>
<tr>
<th>Cherokee</th>
</tr>
<tr>
<td>
<pre>Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests

Server Software:        Cherokee/0.99.0
Server Hostname:        localhost
Server Port:            80

Document Path:          /100mb.test
Document Length:        104857600 bytes

Concurrency Level:      20
Time taken for tests:   30.696 seconds
Complete requests:      200
Failed requests:        0
Write errors:           0
Total transferred:      20971557200 bytes
HTML transferred:       20971520000 bytes
Requests per second:    6.52 [#/sec] (mean)
Time per request:       3069.623 [ms] (mean)
Time per request:       153.481 [ms] (mean, across all concurrent requests)
Transfer rate:          667184.09 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   0.2      1       1
Processing:  3004 3069  73.9   3048    3228
Waiting:        0    1   0.2      1       2
Total:       3004 3069  73.9   3048    3228

Percentage of the requests served within a certain time (ms)
  50%   3048
  66%   3068
  75%   3071
  80%   3191
  90%   3228
  95%   3228
  98%   3228
  99%   3228
 100%   3228 (longest request)</pre>
</td>
</tr>
<tr>
<th>Nginx</th>
</tr>
<tr>
<td>
<pre>Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests

Server Software:        nginx/0.6.35
Server Hostname:        localhost
Server Port:            80

Document Path:          /100mb.test
Document Length:        104857600 bytes

Concurrency Level:      20
Time taken for tests:   30.543 seconds
Complete requests:      200
Failed requests:        0
Write errors:           0
Total transferred:      20971571000 bytes
HTML transferred:       20971520000 bytes
Requests per second:    6.55 [#/sec] (mean)
Time per request:       3054.277 [ms] (mean)
Time per request:       152.714 [ms] (mean, across all concurrent requests)
Transfer rate:          670536.80 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   0.2      0       1
Processing:  3006 3054  32.6   3047    3106
Waiting:        0    1   0.4      1       3
Total:       3006 3054  32.6   3048    3107
ERROR: The median and mean for the initial connection time are more than twice the standard
       deviation apart. These results are NOT reliable.

Percentage of the requests served within a certain time (ms)
  50%   3048
  66%   3069
  75%   3087
  80%   3098
  90%   3107
  95%   3107
  98%   3107
  99%   3107
 100%   3107 (longest request)</pre>
</td>
</tr>
</tbody>
</table>
<p>Small html file (468 bytes)</p>
<table>
<tr>
<th>Nginx</th>
</tr>
<tr>
<td>
<pre>
Server Software:        nginx/0.6.35
Server Hostname:        localhost
Server Port:            80

Document Path:          /
Document Length:        468 bytes

Concurrency Level:      200
Time taken for tests:   0.123 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      737100 bytes
HTML transferred:       491400 bytes
Requests per second:    8150.03 [#/sec] (mean)
Time per request:       24.540 [ms] (mean)
Time per request:       0.123 [ms] (mean, across all concurrent requests)
Transfer rate:          5866.59 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3    8   1.7      9      11
Processing:     6   14   3.3     14      24
Waiting:        3   11   3.3     12      23
Total:         14   22   2.6     22      33

Percentage of the requests served within a certain time (ms)
  50%     22
  66%     23
  75%     23
  80%     24
  90%     25
  95%     26
  98%     29
  99%     30
 100%     33 (longest request)</pre>
</td>
</tr>
<tr>
<th>Cherokee</th>
</tr>
<tr>
<td>
<pre>Server Software:        Cherokee/0.99.0
Server Hostname:        localhost
Server Port:            80

Document Path:          /
Document Length:        468 bytes

Concurrency Level:      200
Time taken for tests:   0.139 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      732224 bytes
HTML transferred:       509184 bytes
Requests per second:    7203.83 [#/sec] (mean)
Time per request:       27.763 [ms] (mean)
Time per request:       0.139 [ms] (mean, across all concurrent requests)
Transfer rate:          5151.19 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        6   11   2.5     12      16
Processing:     7   14   3.9     14      27
Waiting:        3   10   3.9      9      19
Total:         16   25   3.5     25      33

Percentage of the requests served within a certain time (ms)
  50%     25
  66%     27
  75%     27
  80%     28
  90%     29
  95%     31
  98%     32
  99%     32
 100%     33 (longest request)</pre>
</td>
</tr>
<tr>
<th>Varnish</th>
</tr>
<tr>
<td>
<pre>
Server Software:        ----------
Server Hostname:        localhost
Server Port:            80

Document Path:          /
Document Length:        468 bytes

Concurrency Level:      200
Time taken for tests:   0.141 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      879491 bytes
HTML transferred:       528372 bytes
Requests per second:    7067.44 [#/sec] (mean)
Time per request:       28.299 [ms] (mean)
Time per request:       0.141 [ms] (mean, across all concurrent requests)
Transfer rate:          6070.07 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        6   11   2.5     11      16
Processing:     6   14   3.5     13      24
Waiting:        3   10   3.5      9      21
Total:         17   25   3.4     25      38

Percentage of the requests served within a certain time (ms)
  50%     25
  66%     26
  75%     26
  80%     27
  90%     29
  95%     31
  98%     33
  99%     34
 100%     38 (longest request)</pre>
</td>
</tr>
</table>
<p>Small image file (23k bytes)</p>
<table>
<tr>
<th>Nginx</th>
</tr>
<tr>
<td>
<pre>

Server Software:        nginx/0.6.35
Server Hostname:        localhost
Server Port:            80

Document Path:          /cherokee-logo.png
Document Length:        23619 bytes

Concurrency Level:      200
Time taken for tests:   0.139 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      24624128 bytes
HTML transferred:       24379632 bytes
Requests per second:    7171.34 [#/sec] (mean)
Time per request:       27.889 [ms] (mean)
Time per request:       0.139 [ms] (mean, across all concurrent requests)
Transfer rate:          172449.16 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    5   3.6      4      16
Processing:     0   20   6.1     23      29
Waiting:        0   15   5.7     17      26
Total:          6   25   5.5     26      45

Percentage of the requests served within a certain time (ms)
  50%     26
  66%     27
  75%     27
  80%     27
  90%     28
  95%     35
  98%     41
  99%     43
 100%     45 (longest request)
</pre>
</td>
</tr>
<tr>
<th>Cherokee</th>
</tr>
<tr>
<td>
<pre>Server Software:        Cherokee/0.99.0
Server Hostname:        localhost
Server Port:            80

Document Path:          /cherokee-logo.png
Document Length:        23619 bytes

Concurrency Level:      200
Time taken for tests:   0.180 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      26518338 bytes
HTML transferred:       26287947 bytes
Requests per second:    5564.92 [#/sec] (mean)
Time per request:       35.939 [ms] (mean)
Time per request:       0.180 [ms] (mean, across all concurrent requests)
Transfer rate:          144113.78 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4   11   3.4     11      18
Processing:    11   21   5.0     21      36
Waiting:        3    8   3.7      7      24
Total:         21   32   4.7     33      43

Percentage of the requests served within a certain time (ms)
  50%     33
  66%     34
  75%     35
  80%     36
  90%     38
  95%     40
  98%     41
  99%     43
 100%     43 (longest request)</pre>
</td>
</tr>
<tr>
<th>Varnish</th>
</tr>
<tr>
<td>
<pre>Server Software:        --------------
Server Hostname:        localhost
Server Port:            80

Document Path:          /cherokee-logo.png
Document Length:        23619 bytes

Concurrency Level:      200
Time taken for tests:   0.154 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      23933000 bytes
HTML transferred:       23619000 bytes
Requests per second:    6498.44 [#/sec] (mean)
Time per request:       30.777 [ms] (mean)
Time per request:       0.154 [ms] (mean, across all concurrent requests)
Transfer rate:          151882.08 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4   11   3.0     11      17
Processing:    10   18   4.5     17      33
Waiting:        2    6   2.1      5      12
Total:         15   29   4.6     29      48

Percentage of the requests served within a certain time (ms)
  50%     29
  66%     29
  75%     30
  80%     31
  90%     33
  95%     36
  98%     41
  99%     46
 100%     48 (longest request)</pre>
</td>
</tr>
</table>
<p>Nginx is the fastest to serve small static file on my VPS.  No significant difference in serving larging file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=128&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/20/nginx-vs-cherokee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>Speedup Mysql and Webserver with Intel Compiler and tcmalloc</title>
		<link>http://mudy.wordpress.com/2009/02/20/speedup-mysql-and-webserver-with-intel-compiler-and-tcmalloc/</link>
		<comments>http://mudy.wordpress.com/2009/02/20/speedup-mysql-and-webserver-with-intel-compiler-and-tcmalloc/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 20:51:34 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[cherokee]]></category>
		<category><![CDATA[icc]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tcmalloc]]></category>
		<category><![CDATA[varnish]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/?p=121</guid>
		<description><![CDATA[After reading some recent benchmark reguarding tcmalloc  performance on mysql. I decide to rebuild my whole webhosting stack with it. ICC is intel&#8217;s c++ compiler, which has faster performance is also memtioned on mysql website. Most distros should already has google performance tools prepackaged. Installation of ICC is slightly more complicated, you can download it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=121&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After reading some recent <a href="http://mysqlha.blogspot.com/2009/01/double-sysbench-throughput-with_18.html">benchmark </a>reguarding <a href="http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools">tcmalloc  </a>performance on mysql. I decide to rebuild my whole webhosting stack with it.</p>
<p><a href="http://www.intel.com/cd/software/products/asmo-na/eng/compilers/clin/277618.htm">ICC </a>is intel&#8217;s c++ compiler, which has faster performance is also memtioned on <a href="http://dev.mysql.com/downloads/mysql/5.1.html#linux-icc">mysql </a>website.</p>
<p>Most distros should already has google performance tools prepackaged. Installation of ICC is slightly more complicated, you can download it directly from intel&#8217;s website which is free download for non-commercial use. <a href="http://www.archlinux.org/">Archlinux </a>and <a href="http://www.gentoo.org/">Gentoo </a>both have packaged installer. On ubuntu/debian system you probably also need build-essential and apt-build to rebuilt packages. On archlinux you will need base-devel and <a href="http://wiki.archlinux.org/index.php/ABS_-_The_Arch_Build_System">abs</a>.</p>
<p>For most packages, the following bash script can be used before configuration/make step.  Don&#8217;t ommit the dot on first line and change the path of iccvars.sh to your installation directory.</p>
<pre> . /opt/intel/Compiler/11.0/081/bin/iccvars.sh intel64
CC=icc
CFLAGS="-xHOST -O3 -no-prec-div "
LD=xild
AR=xiar
CXX=icpc
CXXFLAGS="-xHOST -O3 -no-prec-div "
LDFLAGS=-ltcmalloc_minimal
export CC CFLAGS LD AR CXX CXXFLAGS LDFLAGS</pre>
<p>These setting seems safe for all packages. Here is a summary of package specific cflags setting.</p>
<table border="0">
<tbody>
<tr>
<th> </th>
<th>Mysql</th>
<th>Cherokee</th>
<th>Nginx</th>
<th>Varnish</th>
<th>PHP</th>
<th>Memcached</th>
</tr>
<tr>
<th> -static</th>
<td>No</td>
<td>No</td>
<td>No</td>
<td>No</td>
<td>N/A</td>
<td>No</td>
</tr>
<tr>
<th> -ipo</th>
<td>No</td>
<td>No</td>
<td>Yes</td>
<td>No</td>
<td>N/A</td>
<td>Yes</td>
</tr>
<tr>
<th>LDFLAGS=-ltcmalloc_minimal</th>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>configure option</td>
<td>&#8211;disable-shared &#8211;with-mysqld-libs=-ltcmalloc_minimal</td>
<td>None</td>
<td>None</td>
<td>&#8211;disable-jemalloc</td>
<td>Failed with ICC</td>
<td>None</td>
</tr>
</tbody>
</table>
<p>This might disappoint you. But the rebuilt software stacks show no improvement whatsoever in my benchmark.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=121&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/20/speedup-mysql-and-webserver-with-intel-compiler-and-tcmalloc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>IPv6 support still lacking</title>
		<link>http://mudy.wordpress.com/2009/02/17/ipv6-support-still-lacking/</link>
		<comments>http://mudy.wordpress.com/2009/02/17/ipv6-support-still-lacking/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 04:26:52 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[1and1]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[mailserver]]></category>
		<category><![CDATA[registrar]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/?p=112</guid>
		<description><![CDATA[I was playing HE.net&#8216;s IPv6 certification test last night. And I got stucked on last step, adding an AAAA tld glue record for my domain. Unfortuantely the domain registrar I am using, 1&#38;1 AG,  does not support AAAA record in their system. Here is the email I got this afternoon, Thank you for contacting us. Unfortunately, our [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=112&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was playing <a href="http://he.net/">HE.net</a>&#8216;s IPv6 <a href="http://ipv6.he.net/certification/">certification </a> test last night.  And I got stucked on last step, adding an AAAA tld <a href="http://en.wikipedia.org/wiki/Domain_name_system#Circular_dependencies_and_glue_records">glue </a>record for my domain. Unfortuantely the domain registrar I am using, <a href="http://www.1und1.de/">1&amp;1 AG</a>,  does not support AAAA record in their system.</p>
<p>Here is the email I got this afternoon,</p>
<blockquote><p>Thank you for contacting us.  Unfortunately, our system does not support AAAA record. Our system only supports modifying the DNS, A-record &amp; Mx-Records as well as CNAME.  If you have any further questions please do not hesitate to contact us.</p>
<p>&#8211; Sincerely,<br />
xxxxxxx xxxxxxx<br />
Technical Support<br />
1&amp;1 Internet</p></blockquote>
<p>The test from he.net is not easy. Here is the list of softwares and services I used last night through trial and error.</p>
<ol>
<li>The first test is browsing an IPv6 website from he.net. I tried many methods. On my local Windows machine, I can ping -6 ipv6 address, I can copy and paste ipv6 into browser. But browser just refused to connect to remote host by ipv6 hostname.  I tried to build ipv6 enabled Lynx on a linux machine, which also failed. Because none of above worked, I had to cheat on this step by using <a href="http://ipv6.he.net.ipv4.sixxs.org/">http://ipv6.he.net.ipv4.sixxs.org/</a>.   </li>
<li>Run a webserver on IPv6 address. Very simple, I added an ipv6 address into my webserver, <a href="http://www.cherokee-project.com/">Cherokee</a>, and everything worked as they should.  </li>
<li>Run a mail server on IPv6 address. Postfix, the mail server I am currently using, supports IPv6 natively. Simply add inet_protocols = all into main.cf, <a href="http://www.postfix.org/">postfix </a>will start listerning on IPv6 socket. First email unfortunately failed due to <a href="http://sourceforge.net/projects/dkim-milter/">dkim-milter</a> refused connection from ipv6 address. After disabling, 2nd email passed through.  </li>
<li>Have a RDNS record for my MX record. I am using <a href="http://www.fefe.de/dns/">ipv6 patched</a> <a href="http://cr.yp.to/djbdns.html">tinydns</a>. NS and SOA record for my /48 prefix to tinydns are required to get response for PTR record. It took me a while to figure that out. Patched tinydns has a utility add-host6 to handle record for both forward and reverse dns but ns and soa need to be added manually.  </li>
<li>Run DNS server natively on IPv6. Even though tinydns is listerning on IPv6 address and my local dig show correct response. But he.net did not accept it for unknown reason. So I installed <a href="http://www.bind9.net/">Bind9</a>, and everything just worked in less than 5 minutes.  </li>
<li>Add an AAAA glue record to TLD nameserver. 1&amp;1 AG does not support it as I said at beginning of the post. I am transferring my domain to <a href="http://gkg.net/">GKG.net</a>, hope they works, and I will update this post once I finish this step.  <a href="http://www.sixxs.net/faq/dns/?faq=ipv6glue">Here </a>is a list of domain registrars supporting ipv6 glue.</li>
</ol>
<p>So <a href="http://ipv6.he.net/certification/scoresheet.php?pass_name=yejun"><strong>here </strong></a>is my test result.   </p>
<p>I am using <a href="http://www.dnsmadeeasy.com/">dnsmadeeasy </a>for my DNS, but they do not support IPv6 in any means. My VPS providor, <a href="http://www.linode.com/index.cfm">Linode LLC</a>, supports AAAA record in nameserver, but no ipv6 PTR record and no native IPv6 connection, no ipv6 dns servers.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=112&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/17/ipv6-support-still-lacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use SimpleCDN with WordPress</title>
		<link>http://mudy.wordpress.com/2009/02/15/how-to-use-simplecdn-with-wordpress/</link>
		<comments>http://mudy.wordpress.com/2009/02/15/how-to-use-simplecdn-with-wordpress/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 19:54:46 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[simplecdn]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/?p=99</guid>
		<description><![CDATA[WordPress is my favorite bloging software, with many builtin features and powerful plugins. WordPress.com, the blogging platform by automattic, has been using CDN for a long time. However there is no public available solution to make self hosted WordPress to use a CDN as well. Fortunately the php code itself is very clean to read, so it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=99&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/">WordPress </a>is my favorite bloging software, with many builtin features and powerful plugins. <a href="http://wordpress.com/">WordPress.com</a>, the blogging platform by <a href="http://automattic.com/">automattic</a>, has been using CDN for a long time. However there is no public available solution to make self hosted WordPress to use a CDN as well. Fortunately the php code itself is very clean to read, so it took me about 5 minutes to find where I should modify to fully integrate my new CDN address.</p>
<p>Before you proceed, please read my previous posts on <a href="http://blog.mudy.info/2009/02/simplecdn-cname-confusion/">how to use CNAME with SimpleCDN</a> and <a href="http://blog.mudy.info/2009/02/one-line-yuicompressor-script/">how to process javascript and css files for WordPress</a>. Make sure your SimpleCDN&#8217;s CNAME and bucket working properly. I used a mirror bucket which points to my blog address, that is probably the simplest way to mirror your static assets. And use &#8216;-s1&#8242; pre-url to insure client side cache working, because SimpleCDN does not use <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes">304 not modified http header</a> at all. I used bucket name &#8216;s.mudy.info&#8217; for my own blog.</p>
<p>Once your DNS full propagated, open your favorite text editor open following 3 files.  &#8216;<strong>wp-includes/class.wp-scripts.php</strong>&#8216;: near line 75, change</p>
<pre>$src = $this-&gt;base_url . $src;</pre>
<p>to</p>
<pre>$src = 'http://yourcdnbucketname' . $src;</pre>
<p>There is no trailing slash after your bucketname.  If you want to make sure client browser always use cached version, you can also comments out the following line.</p>
<pre>// $src = add_query_arg('ver', $ver, $src);</pre>
<p>But this change may break WordPress upgrade.  &#8216;<strong>wp-include/class.wp-styles.php</strong>&#8216;: near line 79, do the same change as above.  &#8216;<strong>wp-include/theme.php</strong>&#8216;: near line 504, change</p>
<pre>return apply_filters('theme_root_uri', content_url('themes'), get_option('siteurl'));</pre>
<p>to</p>
<pre>return 'http://yourcdnbucketname/wp-content/themes';</pre>
<p>That&#8217;s it. Now clean your cache and test your blog.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=99&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/15/how-to-use-simplecdn-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>Optimize WordPress javascript placement</title>
		<link>http://mudy.wordpress.com/2009/02/13/optimize-wordpress-javascript-placement/</link>
		<comments>http://mudy.wordpress.com/2009/02/13/optimize-wordpress-javascript-placement/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 18:37:14 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[yslow]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/2009/02/optimize-wordpress-javascript-placement/</guid>
		<description><![CDATA[YSlow rule 6: Put JS at the bottom. This is a very simple rule, but it has noticeable improvement on actual page loading time. Because javascript in head will block both page elements loading and rendering. The placement of javascript in WordPress 2.7.1 is hard coded to be placed in html head, because most ajax [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=87&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.yahoo.com/performance/rules.html#js_bottom">YSlow rule 6</a>: Put JS at the bottom. This is a very simple rule, but it has noticeable improvement on actual page loading time. Because javascript in head will block both page elements loading and rendering.</p>
<p>The placement of javascript in <a href="http://wordpress.org/">WordPress</a> 2.7.1 is hard coded to be placed in html head, because most ajax plugin would expect javascript library to be fully loaded before page load.</p>
<p>If you use WordPress without any fancy ajax related plugins, it is very possible to load javascript at bottom of every page without breaking any blog function. I also tested it with <a href="http://wordpress.org/extend/plugins/lightbox-2/">Lightbox 2</a> without any noticeable problems. The measurable page loading time difference is near half a second when browser cache is empty.</p>
<p>Before you proceed to make any change to WordPress php files, I would recommend you to do a full backup of database and related php files.</p>
<p>Now open &#8216;<strong>wp-includes/default-filters.php</strong>&#8216;, search wp_print_scripts. Near line 184, you should find,</p>
<pre>add_action('wp_head', 'wp_print_scripts');</pre>
<p>Change this to</p>
<pre>add_action('wp_footer', 'wp_print_scripts');</pre>
<p>Clear your WordPress page cache and test your WordPress.</p>
<p>Ideally one could write a plugin hooking into filter &#8216;print_scripts_array&#8217; to remove plugins from html head conditionally. But I have not found one yet.</p>
<p>There are a lot other methods to safely speedup javascript loading in html header. Unfortunately they are not very easily implemented and cross different browsers. <a href="http://www.stevesouders.com/blog/">Steve</a>, author of Yslow had a <a href="http://sites.google.com/site/io/even-faster-web-sites">talk </a> explaining the whole situation.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=87&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/13/optimize-wordpress-javascript-placement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>One line script to minify js css directory using yuicompressor</title>
		<link>http://mudy.wordpress.com/2009/02/11/one-line-yuicompressor-script/</link>
		<comments>http://mudy.wordpress.com/2009/02/11/one-line-yuicompressor-script/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 19:21:24 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[minify]]></category>
		<category><![CDATA[website optimization]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[yui]]></category>
		<category><![CDATA[yuicompressor]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/?p=76</guid>
		<description><![CDATA[The default installation of WordPress use full version of css and javascript library. In order to minify all of these files, I wrote this bash script to minify all of them. There will be no progress bar while minifying, so be patient. cd wordpress find -H . -type f -writable \( -name \*.css -o -name [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=76&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The default installation of <a href="http://wordpress.org/">WordPress </a> use full version of css and javascript library. In order to minify all of these files, I wrote this bash script to minify all of them. There will be no progress bar while minifying, so be patient.</p>
<pre>
cd wordpress
find -H . -type f -writable  \( -name \*.css -o -name \*.js \)  \
-exec sh -c "yuicompressor {} -o /tmp/yui.tmp &amp;&amp; mv /tmp/yui.tmp {}" \;
</pre>
<p>This will only work under <a href="http://en.wikipedia.org/wiki/POSIX">POSIX </a>system.<br />
<a href="http://www.gnu.org/software/findutils/">Findutils</a> should be included in most popular Linux distros.<br />
<a href="http://developer.yahoo.com/yui/compressor/">Yuicompressor </a>can be downloaded from  <a href="http://www.julienlecomte.net/yuicompressor/">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=76&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/11/one-line-yuicompressor-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
		<item>
		<title>SimpleCDN CNAME Confusion</title>
		<link>http://mudy.wordpress.com/2009/02/09/simplecdn-cname-confusion/</link>
		<comments>http://mudy.wordpress.com/2009/02/09/simplecdn-cname-confusion/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 23:42:59 +0000</pubDate>
		<dc:creator>yejun</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[cname]]></category>
		<category><![CDATA[simplecdn]]></category>

		<guid isPermaLink="false">http://blog.mudy.info/?p=69</guid>
		<description><![CDATA[I am using SimpleCDN to serve some static scripts and images of WordPress on my website. Not like AWS CloudFront, Amazon&#8217;s CDN service, which only allows expiration date carried from S3 file meta. SimpleCDN supports fine tuning Expiration, P3P and gzip encoding through something called Pre-URL. Which look like these http://s.mudy.info.simplecdn.net/ http://s.mudy.info-s1.simplecdn.net/ http://s.mudy.info-e7.simplecdn.net/ Here &#8216;-s1&#8242; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=69&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am using <a href="http://www.simplecdn.com/">SimpleCDN </a>to serve some static scripts and images of <a href="http://wordpress.org/">WordPress </a> on my website.</p>
<p>Not like AWS <a href="http://aws.amazon.com/cloudfront/">CloudFront</a>, Amazon&#8217;s <a href="http://en.wikipedia.org/wiki/Content_Delivery_Network">CDN </a>service, which only allows expiration date carried from <a href="http://aws.amazon.com/s3/">S3 </a>file meta. SimpleCDN supports fine tuning Expiration, P3P and gzip encoding through something called Pre-URL. Which look like these</p>
<blockquote><p>http://s.mudy.info.simplecdn.net/</p>
<p>http://s.mudy.info-s1.simplecdn.net/</p>
<p>http://s.mudy.info-e7.simplecdn.net/</p></blockquote>
<p>Here &#8216;-s1&#8242; means special 1 with expire and gzip; &#8216;-e7&#8242; means 10 years expire without gzip. And a lot more with different combo effects.</p>
<p>SimpleCDN also supports CNAME to any of these urls. Because there is not a lot document on how to use simplecdn. I mistakenly CNAMEed &#8216;s.mudy.info&#8217; to the first URL</p>
<blockquote><p>s.mudy.info.simplecdn.net</p></blockquote>
<p>Run my website through <a href="http://developer.yahoo.com/yslow/">Yslow</a>, I got a lot F score due to lack of expire headers and non-gzip on static files. I realize I have to use these different Pre-URLs in order to get http headers, so I substitute &#8216;s.mudy.info&#8217; in WordPress with &#8216;s.mudy.info-s1.simplecdn.net&#8217; or &#8216;s.mudy.info-e7.simplecdn.net&#8217;. Originally very simple urls&#8217; become long and urgly.</p>
<p>Due to some DNS setting error, I accidentally pinged 2 different SimpleCDN pre-urls. The results are 2 different IPs. I reallized I made another mistake today, these pre-urls are supposed to be used as CNAME to get different http headers and gzip encoding, because these hostname all has their own IPs. A quick testing I CNAME &#8216;s.mudy.info&#8217; to</p>
<blockquote><p>s.mudy.info-s1.simplecdn.net</p></blockquote>
<p>which gives nicely gzipped files with correct expiration settings.</p>
<p>This design is what I initially did not expect. Because traditional CDN usually use HTTP hostname to distinguish objects, so I normally would think I have to use different hostnames. However SimpleCDN use <a href="http://en.wikipedia.org/wiki/Anycast">anycast </a>, so they use same IP block on on all edge servers, which make it possible to use different IP addresses to distinguish requests.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mudy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mudy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mudy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mudy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mudy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mudy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mudy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mudy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mudy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mudy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mudy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mudy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mudy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mudy.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mudy.wordpress.com&amp;blog=174782&amp;post=69&amp;subd=mudy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mudy.wordpress.com/2009/02/09/simplecdn-cname-confusion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cc9d42f680dc1feff5639260f9bfa64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mudy</media:title>
		</media:content>
	</item>
	</channel>
</rss>
