<?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/"
	>

<channel>
	<title>The Blog of Rudy Amid &#187; optimization</title>
	<atom:link href="http://www.amid.com/werd/tag/optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amid.com/werd</link>
	<description>My Curiosity, Observation, and Opinion</description>
	<lastBuildDate>Tue, 03 Jan 2012 19:21:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Web Site Tuning &#8211; Web Server and WordPress</title>
		<link>http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/</link>
		<comments>http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 21:31:40 +0000</pubDate>
		<dc:creator>rudyamid</dc:creator>
				<category><![CDATA[This Blog]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/</guid>
		<description><![CDATA[Summary: Apache web server tuning Place images and big files to a different host Use lightweight WP Themes Modify and tidy selected WP Themes Use WP Super Cache Reduce plugin use and remove bad ones. After the hardware refresh and Database tuning, it is now time to look into the applications. For this site, WordPress [...]<p><a href="http://www.amid.com/werd"><img border=0 src="http://www.amid.com/elements/amidcom_logo.jpg" align="center"></a>This article was posted on <a href="http://www.amid.com/werd">Rudy Amid's Blog</a>: <br/><br/><a href="http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/">Web Site Tuning &#8211; Web Server and WordPress</a></p>

<h3>Related posts:</h3><ol>
<li><a href='http://www.amid.com/werd/web-site-tuning-the-database/' rel='bookmark' title='Web Site Tuning &#8211; The Database'>Web Site Tuning &#8211; The Database</a></li>
<li><a href='http://www.amid.com/werd/upgraded-to-wordpress-2-8-4/' rel='bookmark' title='Upgraded to WordPress 2.8.4'>Upgraded to WordPress 2.8.4</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/' rel='bookmark' title='Web Site Tuning &#8211; Let&#8217;s Start from The Bottom'>Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/58368129@N00/505098112/" title="Photo by Eggy Boil"><img src="http://farm1.static.flickr.com/218/505098112_8e7b408966_m.jpg" alt="Jet Plane" align="right" border="0" height="171" hspace="3" vspace="0" width="240" /></a>Summary:</p>
<ul>
<li>Apache web server tuning</li>
<li>Place images and big files to a different host</li>
<li>Use lightweight WP Themes</li>
<li>Modify and tidy selected WP Themes</li>
<li>Use WP Super Cache</li>
<li>Reduce plugin use and remove bad ones.</li>
</ul>
<p>After the <a href="http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/" title="my hardware tuning">hardware refresh</a> and <a href="http://www.amid.com/werd/web-site-tuning-the-database/" title="my database tuning">Database tuning</a>,  it is now time to look into the applications. For this site, WordPress and Apache HTTPD are the main components for the presentation layer.  <a href="http://www.wordpress.org" title="Wordpress Content Management System">WordPress</a> is the Content Management System written in PHP.  <a href="http://httpd.apache.org" title="Apache HTTPD Web server">Apache HTTPD</a> is the web server.  Both programs are Open Source and widely supported by their respective communities.   Both programs also offer flexible configurations, enabling many optimization opportunities.</p>
<p><strong>Compiling Options for Apache HTTPD </strong></p>
<p>With Apache HTTPD, compiling the program from the source code is the most recommended way to start.  This provides a way to remove any unnecessary modules that are included.  To do this, use the <em>configure</em> script to exclude non-essential built-in modules such as IMAP or user directory support:</p>
<p>./configure &#8211;prefix=/usr/apps/apache2 \<br />
&#8211;disable-imap \<br />
&#8211;disable-userdir</p>
<p>It is also recommended to compile the modules using shared libraries, instead of statically linked, to reduce the memory usage during runtime.  Add this option in the configure script:</p>
<p>&#8211;enable-so</p>
<p>Any additional modules can now use the &#8220;=shared&#8221; suffix  to enable shared library.</p>
<p><strong>Enable Caching on the Client Side</strong></p>
<p>With Apache HTTPD version 2.0, or above, the use <a href="http://httpd.apache.org/docs/2.2/mod/mod_headers.html" title="Headers Module in Apache">mod_headers module</a> and <a href="http://en.wikipedia.org/wiki/HTTP_ETag" title="HTTP ETAGS">ETAGS</a> are recommended.  Etags headers enable caching of static files, such as images or Flash, on the client&#8217;s browser side.   The main advantage is to reduce the web server&#8217;s work to upload the files.  Consequently, it also reduces network bandwidth utilization.  This is an Apache HTTPD extension module.  Run the <em>configure</em> script with the following:</p>
<p>&#8211;enable-headers=shared</p>
<p>Edit the <em>httpd.conf</em> file in Apache to include:</p>
<blockquote><p> ExpiresActive   On<br />
ExpiresByType   image/jpg       &#8220;access plus 7 days&#8221;<br />
ExpiresByType   application/x-shockwave-flash       &#8220;access plus 1 weeks&#8221;<br />
ExpiresByType   application/x-javascript &#8220;access plus 30 days&#8221;<br />
FileETag none</p></blockquote>
<p>Etags headers are especially useful for repeat and frequent visitors.  They are supported in most <a href="http://www.mozilla.com/en-US/firefox/" title="Firefox the modern browser">modern browsers</a>.</p>
<p><strong>Outsourcing Images</strong></p>
<p>To reduce bandwidth consumption on the main blog site, consider the option to move images to a different server, such as Flickr, or a separate web hosting company.  One can expand this further to include Flash or client side Javascript files, if they are used often.   If this is not an option, then the ETags caching procedure above is the best way to speed up pages with a lot of images to download.</p>
<p><strong>WordPress Tuning</strong></p>
<p>WordPress has an awesome set of <a href="http://codex.wordpress.org/Themes/Theme_Compatibility/2.3" title="Wordpress Free Themes">free themes</a> to choose from.  It is best to <a href="http://www.amid.com/werd/a-new-year-a-new-look/" title="simple themes selection">pick a simple theme</a> and build on it.  Once a lightweight theme has been selected, review the included PHP codes and strip out the unnecessary DB lookups to form a file path.  For example,</p>
<blockquote><p> &lt;link rel=&#8221;stylesheet&#8221; href=&#8221;&lt;?php bloginfo(&#8216;stylesheet_url&#8217;); ?&gt;&#8221; type=&#8221;text/css&#8221; media=&#8221;screen&#8221; /&gt;</p></blockquote>
<p>Can be changed to:</p>
<blockquote><p>&lt;link rel=&#8221;stylesheet&#8221; href=&#8221;/opt/apache2/htdocs/wp-content/themes/myTheme/style.css&#8221; type=&#8221;text/css&#8221; media=&#8221;screen&#8221; /&gt;</p></blockquote>
<p>Use an <a href="http://tidy.sourceforge.net/" title="tidy">Open Source tool called <em>tidy</em></a>, to correct and compress style sheets into smaller file size.  Note: backup the original CSS file, in case there is a need to modify the style sheet.</p>
<p>Remove any unnecessary nice-to-have features in the PHP codes, such as rotating headers or <a href="http://cutline.tubetorial.com/different-backgrounds-for-single-categories-in-cutline/" title="different background images">different background images on pages</a>.</p>
<p><strong>Evaluate WordPress Plugins</strong></p>
<p>Rendering a dynamic page for a blog site takes up system resource.  The job of caching plugins, such as <a href="http://wordpress.org/extend/plugins/wp-super-cache/" title="WP Super Cache">WP Super Cache</a>, is to convert a dynamic page into a static page, bypassing the need to execute PHP codes and perform DB lookups.  The installation is not entirely straight forward, but the result is amazing and is worth the effort.  For further explanation of the plugin, visit <a href="http://ocaoimh.ie/wp-super-cache/" title="WP Super Cache docs">Donncha&#8217;s WP Super Cache page</a>.</p>
<p>Not all plugins are created equal.   There are plenty of similar plugins available for the same job.  Pick the ones that are small in size and operates in a simple way.  The ones to avoid are plugins that rely too much on another site&#8217;s access to pick up client-side javascript codes, icons, etc.  An example is the ShareThis plugin that calls it&#8217;s home site all the time.  This plugin is being used on every page, including the home page, so it just adds to the pages loading time.  The alternative is <a href="http://www.joostdevalk.nl/wordpress/sociable/" title="Sociable WP Plugin">Joost De Valk&#8217;s Sociable</a> or <a href="http://www.valent-blog.eu/social-bookmarking-reloaded/" title="Social Bookmarking Reloaded WP Plugin">Valent&#8217;s Social Bookmarking Reloaded</a> plugin, which is much smaller and simpler to use.</p>
<p>Finally, deactivate and remove all unused plugins.</p>
<p>Further readings: <a href="http://www.sitepoint.com/article/web-site-optimization-steps" title="Web Site Optimization - 13 steps">Web Site Optimization &#8211; 13 Simple Steps</a>,  <a href="http://webdesign.about.com/od/speed/Web_Site_Optimization.htm" title="Web Site Optimization - fast downloads">Web Site Optimization &#8211; Fast Downloads</a>, <a href="http://www.networkworld.com/research/2002/0527feat1.html" title="Web Optimization options">Web Optimization Options</a>.</p>
<p><a href="http://www.amid.com/werd"><img border=0 src="http://www.amid.com/elements/amidcom_logo.jpg" align="center"></a>This article was posted on <a href="http://www.amid.com/werd">Rudy Amid's Blog</a>: <br/><br/><a href="http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/">Web Site Tuning &#8211; Web Server and WordPress</a></p>
<p><h3>Related posts:</h3><ol>
<li><a href='http://www.amid.com/werd/web-site-tuning-the-database/' rel='bookmark' title='Web Site Tuning &#8211; The Database'>Web Site Tuning &#8211; The Database</a></li>
<li><a href='http://www.amid.com/werd/upgraded-to-wordpress-2-8-4/' rel='bookmark' title='Upgraded to WordPress 2.8.4'>Upgraded to WordPress 2.8.4</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/' rel='bookmark' title='Web Site Tuning &#8211; Let&#8217;s Start from The Bottom'>Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Web Site Tuning &#8211; The Database</title>
		<link>http://www.amid.com/werd/web-site-tuning-the-database/</link>
		<comments>http://www.amid.com/werd/web-site-tuning-the-database/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 04:00:12 +0000</pubDate>
		<dc:creator>rudyamid</dc:creator>
				<category><![CDATA[This Blog]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.amid.com/werd/web-site-tuning-the-database/</guid>
		<description><![CDATA[Summary: Adjust MySQL&#8217;s system variables. Use tuning-primer.sh script. The most active application of this blog requires the use a database system to store data such as this content, comments, tags, or links. The database of choice here is MySQL. By default, it comes with a default set of system variables, designed for common and light-weight [...]<p><a href="http://www.amid.com/werd"><img border=0 src="http://www.amid.com/elements/amidcom_logo.jpg" align="center"></a>This article was posted on <a href="http://www.amid.com/werd">Rudy Amid's Blog</a>: <br/><br/><a href="http://www.amid.com/werd/web-site-tuning-the-database/">Web Site Tuning &#8211; The Database</a></p>

<h3>Related posts:</h3><ol>
<li><a href='http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/' rel='bookmark' title='Web Site Tuning &#8211; Let&#8217;s Start from The Bottom'>Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/' rel='bookmark' title='Web Site Tuning &#8211; Web Server and WordPress'>Web Site Tuning &#8211; Web Server and WordPress</a></li>
<li><a href='http://www.amid.com/werd/web-site-performance/' rel='bookmark' title='Web Site Performance'>Web Site Performance</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://radix.warped.com/pics/ball_of_yarn.jpg" alt="ball of yarn" align="right" border="0" height="227" width="300" />Summary:</p>
<ul>
<li>Adjust MySQL&#8217;s system variables.</li>
<li>Use <em>tuning-primer.sh</em> script.</li>
</ul>
<p>The most active application of this blog requires the use a database system to store data such as this content, comments, tags, or links.  The database of choice here is <a href="http://www.mysql.com/" title="MySQL site">MySQL</a>. By default, it comes with <a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html" title="MySQL default system variables">a default set of system variables</a>, designed for common and light-weight use.  However, tuning can be performed to make it even more compact and efficient.</p>
<p>Below are the settings in <em>my.cnf</em> file for this low traffic and light weight site:</p>
<ul>
<li><strong>sort_buffer_size = 64K</strong><br />
Default is 2M, reduced to 64K because I&#8217;ll hardly do big complex sorting.</li>
<li><strong>read_buffer_size = 256K</strong><br />
Default is 128K.  WordPress does a lot of sequential scans, and giving it more space is helpful.</li>
<li><strong>net_buffer_length = 2K</strong><br />
Default is 16K.  Apache/PHP client does a lot of quick lookups.  The expectation is the client will not need that much socket buffer to begin with.  The buffer will dynamically enlarge, as needed, to 1M (default for max_allowed_packet).</li>
<li><strong>thread_stack = 64K</strong><br />
Default is 192K.  Connection from this site may only be 1 or 2 clients. Other external clients are not allowed.  A large value, such as the default, is not necessary.  The only sure way to know the limit is to run <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-benchmarks.html" title="sql-bench mysql benchmark suite">MySQL benchmark suite</a>.</li>
</ul>
<p>There is a <a href="http://www.day32.com/MySQL/" title="mysql performance tuning primer">MySQL Performance Tuning Primer script</a> that can be used to provide more tweaking recommendations.  The database must be active for more than 48 hours before using this script.  The following changes are based on the script&#8217;s recommendations:</p>
<ul>
<li><strong>long_query_time = 5</strong><br />
Default is 10 seconds.  When SQL queries usually go fast, it&#8217;s advisable to reduce the threshold.   This is used in conjunction with &#8211;log-slow-queries option to figure out any queries that is out of the ordinary.</li>
<li><strong>max_connections = 10</strong><br />
Default is 100.  When there&#8217;s no external clients and the database only have a handful of local connections from the Apache/PHP, reducing this to a more reasonable number will conserve file descriptors and possibly memory usage.</li>
<li><strong>key_buffer_size = 128K</strong><br />
Default is 128K.  As an experiment, set at 16K, the key cache miss ratio was 1:8 and key buffer was at 50% fill ratio. Getting the right number will help reduce SQL command execution time.  Setting it to default produces miss rate of 1:212 and 100% fill ratio.  That seems like the correct setting for this site.  There is a post on InformIT that mentions how to determine the proper <a href="http://www.informit.com/articles/article.aspx?p=29406&amp;seqNum=2" title="key_buffer_size">key_buffer_size setting</a>.</li>
<li><strong>query_cache_type = 1<br />
query_cache_limit = 256K<br />
query_cache_size = 3M</strong><br />
Defaults are 1, 1M, and 0, respectively.  With frequent querying, it will help to ensure most common queries are cached and ready to run.   The number to watch is the Fragmentation size.  The more fragmentation, the database will have worse performance.  With this setting, fragmentation is currently at 4%.  There is a more in-depth review of <a href="http://www.databasejournal.com/features/mysql/article.php/3110171" title="MySQL Query Cache">MySQL&#8217;s Query Cache</a> (old but still relevant).</li>
<li><strong>max_heap_table_size = 96M<br />
tmp_table_size = 192M</strong><br />
Defaults are 16M and 32M.  This is for the efficiency of doing table lookups in memory.  When there is not enough space allocated in memory, the temp tables will be created on disk.  Lookups on disk is slow.  If there is enough RAM on the server, it is better to move those temp tables to memory.  The tuning-primer will show how many temp tables being used and a percentage of what&#8217;s on disk.  If the machine is a dedicated server, increase until all of temp tables are not created on disk.  Using this setting, this site has 68% temp tables created on disk.  It is possible to allocate more memory but this machine is not a dedicated database server.  Some memory is needed for other applications.</li>
</ul>
<p>Database tuning is a tricky job.  Professional Database Administrators spend a lot of time tweaking and tuning the settings to get their databases perform optimally.  Since there are so many variables, it is almost an educated guess and plenty of experimentation to get it right.  With the proper tools, one must not be afraid to take a risk and try out all of the combination.</p>
<p>Further readings: <a href="http://souptonuts.sourceforge.net/readme_mysql.htm" title="mysql tips and tricks">MySQL tips and tricks list</a>, <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-tuning.html" title="InnoDB Performance Tuning Tip">InnoDB Performance Tuning Tip</a>, and <a href="http://www.f3n.de/doku/mysql/manual_10.html" title="Getting Maximum Performance from MySQL">Getting Maximum Performance from MySQL</a>.</p>
<p><a href="http://www.amid.com/werd"><img border=0 src="http://www.amid.com/elements/amidcom_logo.jpg" align="center"></a>This article was posted on <a href="http://www.amid.com/werd">Rudy Amid's Blog</a>: <br/><br/><a href="http://www.amid.com/werd/web-site-tuning-the-database/">Web Site Tuning &#8211; The Database</a></p>
<p><h3>Related posts:</h3><ol>
<li><a href='http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/' rel='bookmark' title='Web Site Tuning &#8211; Let&#8217;s Start from The Bottom'>Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/' rel='bookmark' title='Web Site Tuning &#8211; Web Server and WordPress'>Web Site Tuning &#8211; Web Server and WordPress</a></li>
<li><a href='http://www.amid.com/werd/web-site-performance/' rel='bookmark' title='Web Site Performance'>Web Site Performance</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.amid.com/werd/web-site-tuning-the-database/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</title>
		<link>http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/</link>
		<comments>http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 18:54:14 +0000</pubDate>
		<dc:creator>rudyamid</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[This Blog]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/</guid>
		<description><![CDATA[Summary: Upgrade the PC hardware. Add more hard disks. Update to the latest OS. This web site seems rather straight forward from a reader&#8217;s point of view. It&#8217;s actually a pretty complex system underneath it. It&#8217;s made up of many different components. It starts from the hardware, operating system, database, all the way to networking [...]<p><a href="http://www.amid.com/werd"><img border=0 src="http://www.amid.com/elements/amidcom_logo.jpg" align="center"></a>This article was posted on <a href="http://www.amid.com/werd">Rudy Amid's Blog</a>: <br/><br/><a href="http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/">Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</a></p>

<h3>Related posts:</h3><ol>
<li><a href='http://www.amid.com/werd/web-site-tuning-the-database/' rel='bookmark' title='Web Site Tuning &#8211; The Database'>Web Site Tuning &#8211; The Database</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/' rel='bookmark' title='Web Site Tuning &#8211; Web Server and WordPress'>Web Site Tuning &#8211; Web Server and WordPress</a></li>
<li><a href='http://www.amid.com/werd/trying-out-fedora-core-10/' rel='bookmark' title='Trying Out Fedora Core 10'>Trying Out Fedora Core 10</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://radix.warped.com/pics/bugati_veyron_2005-s.jpg" alt="2005 Bugati Veyron" align="right" border="0" height="199" hspace="8" width="416" />Summary:</p>
<ul>
<li>Upgrade the PC hardware.</li>
<li>Add more hard disks.</li>
<li>Update to the latest OS.</li>
</ul>
<p>This web site seems rather straight forward from a reader&#8217;s point of view. It&#8217;s actually a pretty complex system underneath it. It&#8217;s made up of many different components.  It starts from the hardware, operating system, database, all the way to networking equipment.  As the first part of my series of web site tuning, I&#8217;m going to start examining the &#8220;bottom&#8221; layer and move all the way up to the web application.</p>
<p>For starters, I have to choose the right hardware to run a server.  Since I&#8217;ll be running a database and web application, I don&#8217;t want to pick too small of CPU with little memory.  I am not running a Windows based machine, so my choice for hardware is more flexible.  Most Linux/Unix based Operating Systems out there don&#8217;t require much in terms of hardware.  I was previously running <a href="http://fedoraproject.org/" title="Fedora Core Linux">Fedora Core Linux</a> on a 650Mhz CPU machine with 320Mb of memory.  I expect the same hardware to be good enough for Ubuntu Linux.  Of course, giving it more CPU and more memory will only help speed up the application&#8217;s performance.  So, upgrading the hardware is always a good first step to improve web site performance.</p>
<p>Also very important is the choice of hard disk to use in the PC.   The web applications (and OS) constantly retrieve from and write to files on the hard disk.  If the disk access is slow, it will impact the performance of the software.  I started with a 5400 <a href="http://en.wikipedia.org/wiki/Hard_disk#Capacity_and_access_speed" title="Revolutions Per Minute RPM">RPM </a>40Gig Maxtor hard drive using <a href="http://en.wikipedia.org/wiki/AT_Attachment" title="ATA IDE Hard Disk Interface">ATA66 IDE interface</a>.  Linux is generally a compact OS (unlike Windows) and server-based applications are generally small in size.  I managed to survive with the old disk for quite some time.</p>
<p>When there&#8217;s a lot of disk activity (aka Disk I/O), such as swapping, database access, or log writing, it is a very good idea to get a second (or third) physical hard disks to separate the data, swap, and OS files.  Sysadmins sometime call this practice &#8220;<a href="http://www.orafaq.com/maillist/oracle-l/2001/09/26/2948.htm" title="putting files on seperate spindle">putting them on a separate spindle</a>&#8220;.  With the invention of faster and smarter RAID controllers, this may not be necessary anymore.  But for old school, true-and-proven results, having multiple disks will only help improve performance of a web site.</p>
<p>As for this site, I&#8217;ve upgraded to a 2.4Ghz CPU with 1 Gigabyte memory.  I&#8217;ve also recently upgraded to 7200RPM Seagate disk drive using SATA100 interface.  Plus I&#8217;ve <a href="http://www.amid.com/werd/linux-and-hardware-upgrade" title="upgrade to the latest fedora core">upgraded to the latest Fedora Core</a> Linux.  The server&#8217;s hardware works so well, I can even start using it as a desktop, a backup machine to browse the internet.</p>
<p><a href="http://www.amid.com/werd"><img border=0 src="http://www.amid.com/elements/amidcom_logo.jpg" align="center"></a>This article was posted on <a href="http://www.amid.com/werd">Rudy Amid's Blog</a>: <br/><br/><a href="http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/">Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</a></p>
<p><h3>Related posts:</h3><ol>
<li><a href='http://www.amid.com/werd/web-site-tuning-the-database/' rel='bookmark' title='Web Site Tuning &#8211; The Database'>Web Site Tuning &#8211; The Database</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/' rel='bookmark' title='Web Site Tuning &#8211; Web Server and WordPress'>Web Site Tuning &#8211; Web Server and WordPress</a></li>
<li><a href='http://www.amid.com/werd/trying-out-fedora-core-10/' rel='bookmark' title='Trying Out Fedora Core 10'>Trying Out Fedora Core 10</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web Site Performance</title>
		<link>http://www.amid.com/werd/web-site-performance/</link>
		<comments>http://www.amid.com/werd/web-site-performance/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 20:35:53 +0000</pubDate>
		<dc:creator>rudyamid</dc:creator>
				<category><![CDATA[This Blog]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.amid.com/werd/web-site-performance/</guid>
		<description><![CDATA[It&#8217;s often too easy for me to just sit here, and be happy that I have a blog site up and running. I write, network with my circle of friends, and churn out content on a daily basis. Sometimes I take for granted how my blog is perceived by others. Earlier this year, I started [...]<p><a href="http://www.amid.com/werd"><img border=0 src="http://www.amid.com/elements/amidcom_logo.jpg" align="center"></a>This article was posted on <a href="http://www.amid.com/werd">Rudy Amid's Blog</a>: <br/><br/><a href="http://www.amid.com/werd/web-site-performance/">Web Site Performance</a></p>

<h3>Related posts:</h3><ol>
<li><a href='http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/' rel='bookmark' title='Web Site Tuning &#8211; Web Server and WordPress'>Web Site Tuning &#8211; Web Server and WordPress</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/' rel='bookmark' title='Web Site Tuning &#8211; Let&#8217;s Start from The Bottom'>Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-the-database/' rel='bookmark' title='Web Site Tuning &#8211; The Database'>Web Site Tuning &#8211; The Database</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://radix.warped.com/pics/wooden_hourglass.jpg" alt="Wooden Hourglass" align="right" border="0" height="200" hspace="0" vspace="0" width="200" />It&#8217;s often too easy for me to just sit here, and be happy that I have a blog site up and running.  I write, network with my circle of friends, and churn out content on a daily basis.  Sometimes I take for granted how my blog is perceived by others.   Earlier this year, I started to update the look &amp; feel with a <a href="http://www.amid.com/werd/a-new-year-a-new-look/" title="new wordpress theme">new WordPress theme</a>. Now, I&#8217;ll be looking at the web site loading time, or it&#8217;s system and network performance.</p>
<p>Using the tools available at my disposable, I&#8217;m going to scrutinize my web site.  I&#8217;ll start with a <a href="http://tools.pingdom.com/fpt/" title="free full page test tool from pingdom">free Full Page Test tool from Pingdom</a>. Testing <a href="http://tools.pingdom.com/fpt/?url=www.amid.com/werd&amp;treeview=0&amp;column=objectID&amp;order=1&amp;type=0&amp;save=true" title="amid.com blog site">my site</a> with it reveals the main blog page loads rather slowly: averaging 6-7 seconds.  I&#8217;ve noticed the pieces affecting the load times are <a href="http://www.sharethis.com/" title="ShareThis button plugin">ShareThis button plugin</a>, graphics, and CSS files.</p>
<p>To confirm, I&#8217;m going to use a commercial software from <a href="http://keynote.com/" title="Keynote Systems Inc.">Keynote Systems</a> to provide the numbers from sites all over the world:</p>
<ul>
<li>From <a href="http://radix.warped.com/pics/amid.com-load_time-toronto.png" title="amid.com blog site load time performance from Bell Canada in Toronto" rel="lightbox">Toronto (Bell Canada)</a>, the average response time is 5-6 seconds.</li>
<li><a href="http://radix.warped.com/pics/amid.com-load_time-singapore.png" title="amid.com blog site load time performance from SingTel in Singapore" rel="lightbox">Singapore (SingTel)</a>, averaging 13-14 seconds.</li>
<li><a href="http://radix.warped.com/pics/amid.com-load_time-london.png" title="amid.com blog site load time performance from British Telecom in London" rel="lightbox">London (British Telecom)</a>, averaging 7-8 seconds.</li>
</ul>
<p>There are possible caveats to these simple performance snapshots:</p>
<ul>
<li><strong>Time of the Day</strong><br />
Network traffic varies at different times of day.  North America can be very active during work day, saturating the bandwidth on the network backbones to my site&#8217;s downstream ISPs such as AT&amp;T.</li>
<li><strong>Local Bandwidth</strong><br />
I share my server connection with my outgoing DSL broadband connection.  Whenever I use it to browse from home, network response time is going to degrade.</li>
<li><strong>Load Testing</strong><br />
The numbers above are averages from loading the page 5 times.  In a real performance test, it has to be scripted to hit various pages (not just one), ramp up with multiple users (depending on requirements), and run continuously over a period of 30-60 minutes.  However, since I run a light-traffic site, load testing is not necessary.</li>
</ul>
<p>In summary, it looks like my blog&#8217;s main page is not loading very well.  Without changing my server&#8217;s network bandwidth, obviously some things on this page have to be changed or eliminated.  There are things I can do to optimize this page, which I&#8217;ll cover in the next few weeks.  It&#8217;s going to be an interesting challenge.</p>
<p>How slow is my page loading in your browser?</p>
<p><a href="http://www.amid.com/werd"><img border=0 src="http://www.amid.com/elements/amidcom_logo.jpg" align="center"></a>This article was posted on <a href="http://www.amid.com/werd">Rudy Amid's Blog</a>: <br/><br/><a href="http://www.amid.com/werd/web-site-performance/">Web Site Performance</a></p>
<p><h3>Related posts:</h3><ol>
<li><a href='http://www.amid.com/werd/web-site-tuning-web-server-and-wordpress/' rel='bookmark' title='Web Site Tuning &#8211; Web Server and WordPress'>Web Site Tuning &#8211; Web Server and WordPress</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-lets-start-from-the-bottom/' rel='bookmark' title='Web Site Tuning &#8211; Let&#8217;s Start from The Bottom'>Web Site Tuning &#8211; Let&#8217;s Start from The Bottom</a></li>
<li><a href='http://www.amid.com/werd/web-site-tuning-the-database/' rel='bookmark' title='Web Site Tuning &#8211; The Database'>Web Site Tuning &#8211; The Database</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.amid.com/werd/web-site-performance/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

