<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Webapper Blog</title>
	
	<link>http://www.webapper.com/blog</link>
	<description>Web Application Engineers</description>
	<lastBuildDate>Thu, 05 Nov 2009 15:40:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/WebapperBlog" type="application/rss+xml" /><feedburner:emailServiceId>WebapperBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>1-Day ColdFusion TNT Audit</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/VZOtrYUoFOk/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/10/19/1-day-coldfusion-tnt-audit/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 19:37:24 +0000</pubDate>
		<dc:creator>Patrick Quinn</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[JVM & Java]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SeeFusion]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1193</guid>
		<description><![CDATA[One of the advantages of our decades of combined experience is speed&#8212;we identify, prioritize and fix the causes of performance and stability problems as quickly and effectively as humanly possible. If you&#8217;ve got ColdFusion performance and/or stability problems, and you haven&#8217;t yet hired us for consulting, then I&#8217;d like to invite you to try our [...]]]></description>
			<content:encoded><![CDATA[<p>One of the advantages of our decades of combined experience is speed&mdash;we identify, prioritize and fix the causes of performance and stability problems as quickly and effectively as humanly possible. If you&#8217;ve got ColdFusion performance and/or stability problems, and you haven&#8217;t yet hired us for consulting, then I&#8217;d like to invite you to try our 1-Day ColdFusion TNT Audit. This is an abbreviated version of our more in-depth <a href="http://www.webapper.com/index.cfm/consulting-services#coldfusion-tuning-troubleshooting">TNT engagement</a>.</p>
<div id="attachment_1194" class="wp-caption aligncenter" style="width: 310px"><img src="http://www.webapper.com/enclosures/2009/10/SF-Chart_small.gif" alt="ColdFusion TNT Engagement Report" title="ColdFusion TNT Engagement Report" width="300" height="163" class="size-full wp-image-1194" /><p class="wp-caption-text">ColdFusion TNT</p></div>
<p>The 1-Day ColdFusion TNT Audit is the fastest possible way to begin to identify, prioritze and fix the causes of ColdFusion performance and stability problems. Here&#8217;s what we deliver in just one day of effort:</p>
<ul>
<li>A review of your SeeFusion configuration, in particular query monitoring and database logging settings.</li>
<li>A review of your JVM configuration, in particular memory utilization settings.</li>
<li>A review of your ColdFusion log files, stack traces, and any other diagnostic information you&#8217;ve gathered.</li>
<li>A review of your ColdFusion Administrator settings.</li>
<li>An analysis of your SeeFusion metrics.</li>
<li>A written report detailing and prioritizing your system&#8217;s bottlenecks, complete with extensive data in tables and charts sorted by a variety of methods.</li>
<li>Fixes for the most severe causes of performance/stability problems (time permitting).</li>
</ul>
<div id="attachment_1195" class="wp-caption aligncenter" style="width: 310px"><img src="http://www.webapper.com/enclosures/2009/10/SF-Table_small.gif" alt="ColdFusion TNT Engagement Report" title="ColdFusion TNT Engagement Report" width="300" height="211" class="size-full wp-image-1195" /><p class="wp-caption-text">ColdFusion TNT</p></div>
<p>If your ColdFusion systems are experiencing performance or stability problems, <a href="http://www.webapper.com/index.cfm/contact-us">contact us</a> today.</p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/VZOtrYUoFOk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/10/19/1-day-coldfusion-tnt-audit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/10/19/1-day-coldfusion-tnt-audit/</feedburner:origLink></item>
		<item>
		<title>MS SQL Maintenance Plans</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/TtheoERVHZ0/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/09/10/ms-sql-maintenance-plans/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 20:51:51 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1182</guid>
		<description><![CDATA[Maintenance Plans in MS SQL 2005 are a powerful and easy way to manage and backup your databases. In this article, I’m going to walk through 4 basic tasks that we run weekly on a client’s database. You’ll learn how to reorganize indexes, create a full backup (*.bak), shrink your database (shrinks both data and [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">Maintenance Plans in MS SQL 2005 are a powerful and easy way to manage and backup your databases. In this article, I’m going to walk through 4 basic tasks that we run weekly on a client’s database. You’ll learn how to reorganize indexes, create a full backup (*.bak), shrink your database (shrinks both data and log files), and cleanup the backup directory.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Creating a Maintenance Plan</span></strong></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">In SQL Server Management Studio, expand the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Management</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> folder, right-click </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Maintenance Plans</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> and select </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">New Maintenance Plan&#8230;</span></strong></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><img src="https://docs.google.com/a/webapper.com/File?id=ddtnjnzc_4g572g4fz_b" border="0" alt="" width="447" height="299" /></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">Give the Maintenance Plan a name and click </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">OK</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">. The new empty Maintenance Plan will open in Design Mode. All of the available tasks are in the left hand column </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Toolbox</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> under </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Maintenance Plan Tasks</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><img src="https://docs.google.com/a/webapper.com/File?id=ddtnjnzc_5s98g6whc_b" border="0" alt="" width="447" height="397" /></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">To add any task to the maintenance plan, simply drag the task from the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Toolbox</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> into the design frame. Once the task is in the design frame, double-click to edit.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Reorganize Index Task</span></strong></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">The reorganize index task updates table and view indexes so the search order is more efficient. The task dialogue is pretty simple. Use the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Database(s)</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> drop down to select one or more databases. Then use the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Object</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> drop down to select whether Tables, Views, or Both should have their indexes reorganized. For this example, I’m going to reorganize both </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Tables and Views</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">. When done, click </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">OK</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><img src="https://docs.google.com/a/webapper.com/File?id=ddtnjnzc_6ckc4sxct_b" border="0" alt="" width="624" height="315" /></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Back Up Database Task</span></strong></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">The Back Up Database Task creates a Full, Differential, or Transaction Log backup. In this example, I’m going to create a Full backup which will create a *.bak file.  This task dialogue is also pretty simple. Set the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Backup type</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> to </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Full</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> and then select the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Database(s)</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> to backup. Jump down to the bottom third of the dialogue and select the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Create a backup file for every database</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> radio button. Then browse to the folder where the backup files are to be saved. When done, click </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">OK</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><img src="https://docs.google.com/a/webapper.com/File?id=ddtnjnzc_7fbtvcfg3_b" border="0" alt="" width="624" height="725" /></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">Join the Reorganize Index Task to the Backup Database Task by dragging the green arrow between the two. Once the two tasks are joined, right-click the arrow and select </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Completion</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><img src="https://docs.google.com/a/webapper.com/File?id=ddtnjnzc_8rb999whn_b" border="0" alt="" width="624" height="224" /></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Shrink Database Task</span></strong></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">The Shrink Database Task should come after the back up task because the shrink cannot be executed on a database until a Full backup has been created. In the task dialogue, select the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Database(s)</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> and just accept the defaults. When done, click </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">OK</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">. If you’ve noticed your log files getting out of hand, the shrink task will bring the file size down. In a recent test, my active log file went from over 2GB to just over 200MB.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><img src="https://docs.google.com/a/webapper.com/File?id=ddtnjnzc_9cwfjddgz_b" border="0" alt="" width="624" height="386" /></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">Join the Back Up Database Task to the Shrink Database Task, and set the type to </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Completion</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">. </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Maintenance Cleanup Task</span></strong></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">As the last task in the Maintenance Plan, I’m going to cleanup the backup directory by removing any *.bak files that are older than 2 weeks. If you’re doing this type of maintenance, you’ll want to make sure you’ve got some sort of server backup that keeps a longer history of your *.bak files off-server. </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">Open the task dialogue and skip down to the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Search folder and delete files based on extension</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">.  Navigate to the backup folder that was set in the Back Up Database Task. Then set the file extension to </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">bak</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">. Note the extension is simply </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">bak</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">. You don’t need to include a . (dot). Skip to the bottom of the dialogue and set the age of the deleted files to </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">2 weeks</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">. When done, click </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">OK</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><img src="https://docs.google.com/a/webapper.com/File?id=ddtnjnzc_10ggz255fx_b" border="0" alt="" width="624" height="737" /></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">Join the Shrink Database Task to the Maintenance Cleanup Task, and set the type to </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Success</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">. </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Execute the Maintenance Plan</span></strong></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">Save the maintenance plan. From the </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Object Explorer</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">, right click the new plan and select </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">Execute</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> to test it.  If everything runs without error, you can set the plan to run on a schedule. </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">On the design mode screen in the Subplan grid, click on the calendar icon and set the schedule for executing the plan. When done, click </span></span><span style="color: #000000; font-family: 'Helvetica';"><strong><span style="font-size: small;">OK</span></strong></span><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">.</span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;"> </span></span></p>
<p style="margin-left: 0pt; margin-right: 0pt;"><span style="color: #000000; font-family: 'Helvetica';"><span style="font-size: small;">That’s it. The plan will now run as a scheduled task. Not only does the plan backup the database, but it’s also reorganizing the indexes, shrinking the database and cleaning up  the backup directory. Best of all, once it’s setup, the plan executes without your intervention and at a time that is best for your system. </span></span></p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/TtheoERVHZ0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/09/10/ms-sql-maintenance-plans/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/09/10/ms-sql-maintenance-plans/</feedburner:origLink></item>
		<item>
		<title>ColdFusion 9 Solr startup scripts for OS X</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/3ovCFHJmdtY/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/08/21/coldfusion-9-solr-startup-scripts-for-os-x/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 17:07:05 +0000</pubDate>
		<dc:creator>Shannon Hicks</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1175</guid>
		<description><![CDATA[The ColdFusion 9 team was kind enough to share the startup scripts for the ColdFusion install of Solr for OS X.
Here&#8217;s how to use these scripts:
1. Copy the files to solr installation directory. i.e /Applications/ColdFusion9/solr or /ColdFusion9/solr. Change the scripts to have execute permission.
2. Open cf-init-solr.sh and cf-solr-startup and be sure that CF_DIR is set [...]]]></description>
			<content:encoded><![CDATA[<p>The ColdFusion 9 team was kind enough to share the startup scripts for the ColdFusion install of Solr for OS X.</p>
<p>Here&#8217;s how to use these scripts:</p>
<p>1. Copy the files to solr installation directory. i.e /Applications/ColdFusion9/solr or /ColdFusion9/solr. Change the scripts to have execute permission.<br />
2. Open cf-init-solr.sh and cf-solr-startup and be sure that CF_DIR is set to your coldfusion9 install directory.</p>
<p>From there, run:</p>
<p><code class="codecolorer bash default"><span class="bash"><span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>cf-init-solr <span style="color: #c20cb9; font-weight: bold;">install</span></span></code><br />
to install the scripts.</p>
<p><code class="codecolorer bash default"><span class="bash"><span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>cf-init-solr uninstall</span></code><br />
to remove the scripts.</p>
<p>All done!</p>
<p><a href="http://www.webapper.com/enclosures/2009/08/CFSolrStartup.zip">Download the scripts now.</a></p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/3ovCFHJmdtY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/08/21/coldfusion-9-solr-startup-scripts-for-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/08/21/coldfusion-9-solr-startup-scripts-for-os-x/</feedburner:origLink></item>
		<item>
		<title>Webapper at RIA Unleashed : Boston</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/YCYjdyOUnic/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/08/05/webapper-at-ria-unleashed-boston/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 16:52:47 +0000</pubDate>
		<dc:creator>Shannon Hicks</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Flex & Flash]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1172</guid>
		<description><![CDATA[We are proud to announce that Webapper is sponsoring RIA Unleashed in Boston this year. Brian Rinaldi has been putting together some great Flex camps in years past, and we jumped at the chance to sponsor this expanded event. This year, it&#8217;s an all-day conference with three tracks: Flex/Air, ColdFusion, and Related Technologies. Steven Erat and [...]]]></description>
			<content:encoded><![CDATA[<p>We are proud to announce that Webapper is sponsoring <a href="http://www.riaunleashed.com/">RIA Unleashed in Boston</a> this year. Brian Rinaldi has been putting together some great Flex camps in years past, and we jumped at the chance to sponsor this expanded event. This year, it&#8217;s an all-day conference with three tracks: Flex/Air, ColdFusion, and Related Technologies. Steven Erat and I will be speaking, along with many other great Adobe employees and community experts.</p>
<p>There are still a few $30 tickets left, so <a href="http://www.riaunleashed.com/page.cfm/register">register now</a> before the prices go up!</p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/YCYjdyOUnic" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/08/05/webapper-at-ria-unleashed-boston/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/08/05/webapper-at-ria-unleashed-boston/</feedburner:origLink></item>
		<item>
		<title>Improve ColdFusion Performance by 1000x?  Believe Me, It’s Possible.</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/GYPz7RwuV0M/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/08/04/improve-coldfusion-performance-by-1000x-believe-me-its-possible/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 16:19:12 +0000</pubDate>
		<dc:creator>Tyson Vanek</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[General Development]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SeeFusion]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1157</guid>
		<description><![CDATA[Not only is it possible, but I spend most of my time every week doing this for our Webapper customers.
As we all know, businesses and their supporting web applications are constantly changing and adapting.  With any luck, change is in the direction of growth, and adaptation simply becomes a component necessary to keep up [...]]]></description>
			<content:encoded><![CDATA[<p>Not only is it possible, but I spend most of my time every week doing this for our Webapper customers.</p>
<p>As we all know, businesses and their supporting web applications are constantly changing and adapting.  With any luck, change is in the direction of growth, and adaptation simply becomes a component necessary to keep up with that change.  As businesses and web applications grow over time and exposure, so does the data.  A tool or process in a web application that has been humming along and performing well over the years is subject to turning on a dime and making your life miserable as additional data and concurrent usage flood your application.</p>
<p>I recently fixed a classic example of this for a customer of ours.  This particular customer runs (among other things) a pretty well utilized job posting and searching application which sits atop ColdFusion 8 and a SQL Server 2005 database.  The site is averaging about 6,000,000 page views a month, so performance gains can be expected to have a broad impact when you factor them by that level of utilization.  The customer was reporting all sorts of performance problems and slow running pages within their application but was at a bit of a loss in terms of specifically identifying the problem areas and addressing them.  That&#8217;s when they called Webapper.</p>
<p>I never begin a performance analysis engagement like this for a customer without first installing <a href="http://www.seefusion.com/" target="_blank">SeeFusion</a>.  It&#8217;s quite simply one of the best tools I&#8217;ve ever worked with when it comes to quickly identifying the problem areas and usage trends of a ColdFusion application.</p>
<p>After a day of monitoring the application performance with SeeFusion, it became quickly evident that a very critical page in their application needed some tuning &#8211; their &#8220;Browse Jobs&#8221; page.  I could see via the SeeFusion logging repository that this page was continually running long (anywhere from 20-45 seconds), and was accessed very frequently in comparison to other pages on the site.  So, I started looking into why this page was causing such headaches for our customer.</p>
<p>The page delivers some pretty simple functionality.  It first shows a total number of active jobs available in the application.  Then, just beneath that, it generates a list of all 50 states, a count of the jobs listings available in each state, and a parameter-driven link to a second-level page that then displays the jobs for that state.  Pretty simple concept.  When I accessed the page, the average execution time I was getting was around 24 seconds (24,000 ms) per request.  This clearly needed to change.</p>
<p>The first place I typically start when evaluating a page or process like this is with the SQL operations.  No matter how clean and optimized your CFML code may be, if your SQL calls are lackluster in the performance department, then it bleeds into everything else.  You can&#8217;t build a great house on a tattered foundation, right?  So I always begin with tidying up the SQL performance before moving on to any potential CFML optimizations.</p>
<p>I could see this page was running 3 varieties of SQL operations.  First, a simple parameterless query to the <em>tblJobPostings</em> database table in order to determine the overall number of active job postings available to the entire site.  Second, another parameterless query to the <em>tblStates</em> table in order to get a listing of all states.  And third, a loop through the query of all 50 states in order to run a by-state query returning the count of jobs in each particular state.  Put them all together and you have a total of 53 queries.  Now, I immediately jumped out of my seat at the idea of running the by-state job counts from within a loop.  But, I stayed focused on first task of SQL optimization before getting sidetracked &#8211; I&#8217;d get to that part later.</p>
<p>The query running within the loop of all states to get each by-state job count looked something like this.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;qStateJobCount&quot;</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#request.myDSN#&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; SELECT<br />
&nbsp; &nbsp; &nbsp; &nbsp; count(jobPostingID) countJobs<br />
&nbsp; &nbsp; FROM<br />
&nbsp; &nbsp; &nbsp; &nbsp; tblJobPostings<br />
&nbsp; &nbsp; WHERE<br />
&nbsp; &nbsp; &nbsp; &nbsp; state = '#qStates.state[qStates.currentRow]#'<br />
&nbsp; &nbsp; &nbsp; &nbsp; AND jobCode = 'ACT'<br />
&nbsp; &nbsp; &nbsp; &nbsp; AND (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expireDate IS NULL<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OR expireDate &gt;= GETDATE()<br />
&nbsp; &nbsp; &nbsp; &nbsp; )<br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span></div></div>
<p>Seems like a pretty simple query, but looks can be so deceiving when it comes to SQL performance if you&#8217;re not looking under the hood.  I could already see in the ColdFusion debugging output that the 50 instances of this seemingly simple query were taking about 400-500ms each to execute.  Multiply that average execution time by 50 states, and you can quickly see why the page was taking an average of 24,000 ms to render.  So, I cut-n-paste an example of this query from the ColdFusion debugging output and brought it over into Query Analyzer in SQL Server Management Studio.  I paste the query into Query Analyzer, enabled the &#8220;Include Actual Execution Plan&#8221; option, and executed the query.</p>
<p>I could immediately see some problems in the execution plan.  SQL Server was performing a pretty costly index scan operation and then combining those results with a key lookup operation.  This meant that SQL Server was utilizing an available index to match part of the selection criteria presented in the query, but was then having to perform additional work and filtering in order to evaluate other columns that weren&#8217;t a part of the index being used.  Immediately, I took a look at the indexes on the <em>tblJobPostings</em> table.  There was a clustered primary key index and a few single-column indexes, but not one multi-column index.  This immediately explained the execution plan I was staring at.  So, I created a new index on the table that included <em>state</em>, <em>jobCode</em>, <em>expireDate</em>, and <em>jobPostingID</em> in that order, essentially to match the conditions being applied in the <em>WHERE</em> clause and then including the columns referenced in the <em>SELECT</em> clause.  With this approach to indexing, SQL Server should now be able to get all the information it needs for this query from the new index without even directly accessing the table itself.</p>
<p>With this new table index in place, I returned to the web browser and reloaded the page.</p>
<p>Execution time: 12,400 ms</p>
<p>I had already effectively doubled the performance throughput of the page simply by creating that index.  But, 12 seconds was still far from being an acceptable load time.  So I moved on to step 2 &#8211; reorganizing the CFML code.</p>
<p>Experience has taught me that running &lt;cfquery&gt;s from within a &lt;cfloop&gt; is almost never a good idea.  Not only can it be a system memory hog, but it&#8217;s often a shortcut for not understanding how to get that same data in a single database call.  When I had first glanced at this code, I had already made a mental note that I would need to re-write this into a single database call, grouping the job counts by state, and organizing it in a way that I could later reference individual job counts by simply indicating a state.</p>
<p>Re-writing the query was the easy part.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;qJobCountsByState&quot;</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#request.myDSN#&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; SELECT<br />
&nbsp; &nbsp; &nbsp; &nbsp; count(jobPostingID) countJobs<br />
&nbsp; &nbsp; , &nbsp; state<br />
&nbsp; &nbsp; FROM<br />
&nbsp; &nbsp; &nbsp; &nbsp; tblJobPostings<br />
&nbsp; &nbsp; WHERE<br />
&nbsp; &nbsp; &nbsp; &nbsp; jobCode = 'ACT'<br />
&nbsp; &nbsp; &nbsp; &nbsp; AND (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expireDate IS NULL<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OR expireDate &gt;= GETDATE()<br />
&nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; GROUP BY<br />
&nbsp; &nbsp; &nbsp; &nbsp; state<br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span></div></div>
<p>This addressed the issue of getting all the counts in a single database call, but didn&#8217;t directly address the problem of how I would go about referencing the job counts from within the &lt;cfloop&gt; through all states.  But this is a technique I use all the time, so I quickly moved onward.  I had decided that converting this query into a structure would be my best option.  I would create the structure with keys for each state abbreviation and a value of the respective job count for that state.  The code looks something like this.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> stcJobCountsByState <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">structNew</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span><br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;qJobCountsByState&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> stcJobCountsByState<span style="color: #0000FF;">&#91;</span>qJobCountsByState.state<span style="color: #0000FF;">&#91;</span>qJobCountsByState.currentRow<span style="color: #0000FF;">&#93;</span><span style="color: #0000FF;">&#93;</span> <span style="color: #0000FF;">=</span> qJobCountsByState.countJobs<span style="color: #0000FF;">&#91;</span>qJobCountsByState.currentRow<span style="color: #0000FF;">&#93;</span><span style="color: #0000FF;">&gt;</span></span><br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span></div></div>
<p>The result of this code is a structure that visually might look something like this:</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">KEY &nbsp; &nbsp; VALUE<br />
-------------------------------------<br />
AL &nbsp; &nbsp; &nbsp;12756<br />
AK &nbsp; &nbsp; &nbsp;9756<br />
AR &nbsp; &nbsp; &nbsp;11220</div></div>
<p>With the data organized this way, I can use the following bit of code to get the specific job count of a given state.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> thisState <span style="color: #0000FF;">=</span> <span style="color: #009900;">&quot;AL&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> thisStateJobTotal <span style="color: #0000FF;">=</span> stcJobCountsByState<span style="color: #0000FF;">&#91;</span>thisState<span style="color: #0000FF;">&#93;</span><span style="color: #0000FF;">&gt;</span></span></div></div>
<p>At this point, I was ready to move ahead with adapting the code within the &lt;cfloop&gt; to utilize this new data structure.  Here&#8217;s a summary of original code.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;qStates&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;qStateJobCount&quot;</span> <span style="color: #0000FF;">datasource</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#request.myDSN#&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; SELECT<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count(jobPostingID) countJobs<br />
&nbsp; &nbsp; &nbsp; &nbsp; FROM<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tblJobPostings<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHERE<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state = '#qStates.state[qStates.currentRow]#'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND jobCode = 'ACT'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expireDate IS NULL<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OR expireDate &gt;= GETDATE()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfquery</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; #qStates.state[qStates.currentRow]# ( <span style="color: #0000FF;">#qStateJobCount.countJobs#</span> )<br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span><br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span></div></div>
<p>But with the new single grouped query to get job totals, and the conversion of that query to a structure, I could re-write the code to look something like this.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;qStates&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> thisJobCount <span style="color: #0000FF;">=</span> <span style="color: #FF0000;">0</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> <span style="color: #0000FF;">structKeyExists</span><span style="color: #0000FF;">&#40;</span>stcJobCountsByState,qStates.state<span style="color: #0000FF;">&#91;</span>qStates.currentRow<span style="color: #0000FF;">&#93;</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> thisJobCount <span style="color: #0000FF;">=</span> stcJobCountsByState<span style="color: #0000FF;">&#91;</span>qStates.state<span style="color: #0000FF;">&#91;</span>qStates.currentRow<span style="color: #0000FF;">&#93;</span><span style="color: #0000FF;">&#93;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; #qStates.state[qStates.currentRow]# ( <span style="color: #0000FF;">#thisJobCount#</span> )<br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span><br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span></div></div>
<p>It&#8217;s worth noting that the <em>structKeyExists()</em> call is critical here since the possibility exists that there may be 0 active jobs for one or more states that were separately returned from the <em>states</em> table in <em>qStates</em>.  For example, if &#8220;TX&#8221; exists in the <em>states</em> table, but there are no active jobs in <em>tbjJobPostings</em> for state &#8220;TX&#8221;, then there will not be a record in the <em>qJobCountsByState</em> query for &#8220;TX&#8221;.  That means a reference to <em>stcJobCountsByState["TX"]</em> would return an error indicating that the specified key does not exist.  The <em>structKeyExists()</em> method call addresses this issue.</p>
<p>With this new method of deriving by-state job counts in place, I returned once again to the web browser to see how my work was paying off in the performance department.  I clicked the refresh button in my web browser and scrolled to the debugging output.</p>
<p>Execution time: 2,120 ms</p>
<p>Alright, well now we&#8217;re getting somewhere.  Typical human factors studies of web users would indicate that 2 seconds is reasonable when it comes to perceived wait times for a given page in a web application.  However, I knew I could do better than this.  I knew that the list of all states wasn&#8217;t likely to change very often (if ever), and that the job postings on the site were only updated once a night by a scheduled import process.  This means that during the business day when the site is being access by the end users, the data being utilized to render this page isn&#8217;t changing.  While I&#8217;m typically an advocate of always writing your own caching methods in ColdFusion for better control and management, this seemed like an ideal opportunity to take the easier path and simply cache the database queries on this page using the <em>cachedWithin</em> argument of the &lt;cfquery&gt; tag.  So, I returned to the code and altered it by adding a 1 hour cache directive to the 3 remaining &lt;cfquery&gt; tags.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfquery</span> ... cachedWithin<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#createTimespan(0,1,0,0)#&quot;</span> <span style="color: #0000FF;">&gt;</span></span></div></div>
<p>With this change in place, ColdFusion will handle all the logic associated with caching and refreshing the cached data from these queries every hour.  One request per hour will run the queries against the database, but any other requests in that same hour will be fetching the cached query object from ColdFusion&#8217;s in-memory cache.  Once again, I returned to the web browser, clicked my refresh button, and scrolled to the debugging output.</p>
<p>Execution time: 24 ms</p>
<p>Bingo!  The page rendered almost faster than I could release the browser refresh button.  I could see from the debugging output that the page was now referencing the 3 queries from the cache.  Granted, once an hour a single request will actually have to run them against the database, but even then the execution time will only take about 2 seconds.</p>
<p>So, from an original page that started off with an average execution time of 24 seconds (24,000 ms), I had worked through a series of optimizations and come to rest on a new average execution time of 24 ms.  In the span of roughly 30 minutes, I had created a 1000x increase in the performance throughput of this commonly requested area of the application.</p>
<p>If you have an area of your existing web application that seems to be suffering from some performance challenges, I&#8217;d encourage you to have another look and see what you can do about it.  Review your SQL statement performance, optimize your database indexes, tweak your application logic, and apply caching where you can afford to do so.  If you don&#8217;t feel comfortable doing it on your own or simply would prefer to have someone else do the work for you, then pickup the phone, call Webapper, and put our expertise in this area to work for you.  The result just might be a 1000x increase in performance.</p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/GYPz7RwuV0M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/08/04/improve-coldfusion-performance-by-1000x-believe-me-its-possible/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/08/04/improve-coldfusion-performance-by-1000x-believe-me-its-possible/</feedburner:origLink></item>
		<item>
		<title>ColdFusion Request Tuning Settings in Depth</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/ip7eDh1gkFM/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/08/03/coldfusion-request-tuning-settings-in-depth/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 20:17:31 +0000</pubDate>
		<dc:creator>Steven Erat</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1142</guid>
		<description><![CDATA[Undoubtedly, the ColdFusion Administrator settings for Request Tuning are critical to performance of Web applications running in the server. While reading the recent Adobe article on Performance Tuning for ColdFusion Applications I was surprised to find the content on this topic to be a little light. With that in mind, I set out to expand on the topic of the Request Tuning settings.]]></description>
			<content:encoded><![CDATA[<p>Undoubtedly, the ColdFusion Administrator settings for Request Tuning are critical to performance of Web applications running in the server.  While reading the recent Adobe article on <a href="http://www.adobe.com/devnet/coldfusion/articles/coldfusion_performance_print.html">Performance Tuning for ColdFusion Applications</a> I was surprised to find the content on this topic to be a little light. With that in mind, I set out to expand on the topic of the Request Tuning settings.</p>
<p><strong>Foundations of ColdFusion Request Settings<br />
</strong></p>
<p>To begin, let&#8217;s look at how the ColdFusion settings were configured in earlier versions of application server.  With the release of ColdFusion MX 6.0 through versions 6.1 and 7, all editions of the ColdFusion server had one setting for Request Limits.  This was referred to as the &#8220;Simultaneous Requests&#8221; setting. This single setting throttled the number of running requests to be processed concurrently.  Should the running pool be fully occupied by requests that are processing but haven&#8217;t yet completed, the J2EE server underlying ColdFusion will hold requests in a queued request thread pool that are to be fed to the running request pool.</p>
<p><strong>What&#8217;s the Best Setting?</strong></p>
<p>As with most articles you may read on the topic, there is no magic setting for the Simultaneous Requests value that would automatically produce the best throughput.  Rather, determining the best value is done as an iterative process by carrying out real world load testing during application development and functional testing in the software development life cycle.</p>
<p><strong>CPU-intensive or Heavy I/O?</strong></p>
<p>ColdFusion applications tend to have a heterogeneous mix of templates that require intense CPU utilization, such as when performing string parsing or calculations in loops, or templates that require little system resources, such as those that are database intensive and spend time waiting on results or those that are I/O intensive such as applications that perform lots of network transactions with CFFTP or CFLDAP. Generally speaking, the Simultaneous Requests value will be higher for I/O-centric applications, and lower for CPU-intensive applications. The default value for the Simultaneous Request setting in ColdFusion MX 7 and earlier was set as 8 by default after installation.  Few server administrators changed that value, for better or worse, but it was thought to be a reasonable starting point with the generic guideline of 3-5 per CPU.</p>
<p>One approach to determining the best value for the setting is to perform load testing, perhaps with tools such as the freely available and robust <a href="http://jakarta.apache.org/jmeter/">Apache JMeter</a>, or commercially available and highly scriptable products like <a href="http://www.paessler.com/webstress">Paessler Web Stress Tool</a> or <a href="http://www.borland.com/us/products/silk/silkperformer/index.html">Borland Silk Performer</a>.  The testing should be carried out on a platform and configuration as close as possible to how it will be run in production.  As you perform testing while tracking request throughput, repeat the test iteratively while modulating the Simultaneous Request setting from low to high, then graph the results to find the setting for highest throughput on the curve.  Very likely, you will notice CPU utilization will reach a high of 60-80% during the trial that produced the best results.  When the CPU is consistently running at higher values, the CPU maybe thrashing which is another way of saying that it is being used inefficiently during the heavy context switching of frequently changing which cpu threads are being executed. Throughput typically declines as the CPU begins to &#8220;redline&#8221;. Tuning ColdFusion request limits to moderately utilize the CPU as a baseline allows room for occasional bursts of traffic (which can be simulated with ramp testing).  An example of a burst might be when users first start the application at 9am during the start of their work day, or when the application is popularized through Digg or other social networking sites.</p>
<p><strong>How <em>Not</em> to Tune The Request Limits</strong></p>
<p>The Simultaneous Request setting has often been misunderstood as the total number of end users to the application that can be concurrently supported.  When administrators tune ColdFusion based on that incorrect premise, they will sometimes scale up the value to be the total number persons they expect to be using the application at the same time, and as such they might set the Simultaneous Requests value to an unusually high value such as 100 or even 500.  In the majority of all situations, values this high will negatively affect server throughput by thrashing the CPU during heavy context switching, as alluded to earlier.</p>
<p><strong>Types of Requests</strong></p>
<p>So which type of application requests are throttled by the Simultaneous Requests setting?  Up to and including ColdFusion 7, all request types are throttled through the same request pool, including ColdFusion CFM template requests, CFC template requests that arrive via HTTP requests such as AJAX applications, Web Service Requests for exposed endpoints, and Flash Remoting Requests such as those from Flash or Flex presentation layers.</p>
<p><strong>Where Do I Find The Setting?</strong></p>
<p>The ColdFusion Administrator page titled Setting exposes this configuration option. The Simultaneous Requests value is directly tied to the JRun activeHandlerThreads value in the JRunProxyService section of it&#8217;s corresponding jrun.xml file. For ColdFusion installations deployed to other J2EE containers such as WebSphere or Weblogic, the Simultaneous Request setting does not exist in the ColdFusion Administrator. Refer to the J2EE server documentation for request tuning settings. Commonly on those other J2EE servers, the ColdFusion server must compete with other J2EE applications having additional incoming requests for JSP and Servlets directly.  Your tuning strategy will have to consider the total blend of requests across all applications running on that J2EE server.</p>
<p><strong>Current and Future Versions of ColdFusion</strong></p>
<p>With the release of ColdFusion 8 Enterprise Edition a new means of request tuning was introduced by a CF Admin page of the same title, Request Tuning.  The ColdFusion 8 Administrator exposes 4 separate ColdFusion pools for granular request tuning. These pools discretely throttle CFM requests, CFC requests, Flash Remoting requests, and Web Service requests.  These request pools are downstream of the underlying J2EE server request pool.  Note that the CFC throttle refers to CFCs accessed via HTTP directly, from AJAX applications for example.</p>
<div id="attachment_1145" class="wp-caption aligncenter" style="width: 410px"><img class="size-full wp-image-1145" title="ColdFusion 8/9 Request Pools" src="http://www.webapper.com/enclosures/2009/08/requestpools.jpg" alt="ColdFusion 8 introduced 4 types of request pools that throttle independently. These pools are downstream of the JRun thread pool." width="400" height="317" /><p class="wp-caption-text">ColdFusion 8 introduced 4 types of request pools that throttle independently. These pools are downstream of the JRun thread pool.</p></div>
<p>ColdFusion 8 Standard Edition, however, does not expose these 4 discrete ColdFusion pools, but rather it behaves exactly the same as ColdFusion 7 where there is a single Simultaneous Request setting.</p>
<p><strong>Advantages and Disadvantages of ColdFusion Request Pools</strong></p>
<p>The advantage of ColdFusion 8 Enterprise Edition is that if your application has different entry points such as an AJAX view for smart phones, a Flex view for desktop browsers, and a typical CFM/HTML view for clients not supporting Flash or JavaScript, then you can tune accordingly.  If a link to the AJAX view of your application suddenly rises to the top on Digg and receives a burst of traffic, the other Flex view and CFM view may continue to be available without noticeable disruption.</p>
<p>The reason I say <em>may</em> continue to be available is because, again, the ColdFusion request pools are secondary to the underlying J2EE server request pool.  In this example, if the AJAX view linked from Digg is wildly popular, then you may receive so many requests that the CFC thread pool becomes full and queues, and then the JRun thread pool begins to queue.  Once the JRun thread pool is queuing, then the CFM and Flex views to the application cannot be processed while they&#8217;re waiting in the JRun queue behind all the AJAXian CFC requests, even though the discrete CFM and Flash Remoting pool types are empty.</p>
<p>Think of it as trying to get into a fast food restaurant during lunch hour in the city.  If there&#8217;s a drink line, a sandwich line, and a buffet line inside and all you want is a Coke. If the buffet line is backed up and stretching out the door then you can&#8217;t get in to fill your cup even if the drink line is empty.</p>
<p><strong>Come On In!</strong></p>
<p>ColdFusion 8 recognized the potential for the individual request pools to become full, making the ColdFusion Administrator inaccessible.  A (partial) solution to this problem is that any request starting with /CFIDE in the script name is permitted to bypass the ColdFusion request pools.  This means that if the CFM template pool is full occupied and queuing, a request for the ColdFusion Administrator will still be accessible without queuing. Once again, however, this <em>backdoor</em> access for /CFIDE remains subject to the J2EE server pool and any queuing that may occur there.</p>
<p>A similar weakness exists regarding the ColdFusion Server Monitor should be noted.  The UI to the Server Monitor is built from Flex and runs as a Flash application, and the data that is displayed in the UI is obtained via Flash Remoting requests, as observed by its posts to /flex2gateway servlet mapping. Requests to /flex2gateway do not participate in the /CFIDE bypass.  Therefore, when the server is under load and the Flash Remoting pool becomes full and queues, then the Server Monitor is no longer able to retrieve data.  Additionally, once the Server Monitor is running, if the JRun server is queuing, then again the Server Monitor may not be able to retrieve any data.</p>
<div id="attachment_1147" class="wp-caption aligncenter" style="width: 410px"><img class="size-full wp-image-1147" title="Server Monitor Unavailable" src="http://www.webapper.com/enclosures/2009/08/servermonitor_hung.jpg" alt="The ColdFusion Server Monitor requires a connection through the JRun thread pool to access the CF Flash Remoting" width="400" height="393" /><p class="wp-caption-text">The ColdFusion Server Monitor requires a connection through the JRun thread pool to access the CF Flash Remoting</p></div>
<p>This weakness in the Server Monitor is where Webapper&#8217;s SeeFusion monitoring tool shines.  <a href="http://www.seefusion.com/">SeeFusion</a> is installed as a Servlet Filter and listens on its own port.  Requests to the SeeFusion monitoring interface are not subject to the restrictions of the ColdFusion request pools or the J2EE server request pools and is always available regardless of request volume.</p>
<p><strong>Multiserver Considerations</strong></p>
<p>Some admins may choose to install ColdFusion in the Multiserver Configuration to take advantage of JRun&#8217;s failover and load balancing abilities, or to take advantage of application isolation since each ColdFusion server instance runs in its own JVM.  When tuning the request pools, keep in mind during testing that the additive nature involved of the various request pools.  If it was previously determined that a CFM Template Limit should be 8 on single instance of ColdFusion, then if you add more server instances then obviously they cannot all be set to 8.  Instead the application should be retested for performance while tuning the various instances at the same time for balance and aggregate throughput.  In fact, since each JVM requires some CPU just to manage its heap and thread pools, you may find that the number of total ColdFusion Simultaneous Requests per CPU decrease further.  That is to say if you had one instance optimally set to a limit of 8 template requests, and you added another server instance for failover benefits, it would seem logical that you would set the template request limit from 8 down to 4 for each instance, but with the added overhead of an additional JVM you may end up discovering that the optimal throughput occurs with a limit of 3 template requests for each ColdFusion instance.</p>
<p><strong>Other Differences Between ColdFusion 8 and Earlier</strong></p>
<p>Recall that in ColdFusion MX 7 and earlier the Simultaneous Request setting was directly tied to the JRun activeHandlerThreads setting in jrun.xml.  If you set ColdFusion to 5, then the whole JRun server had a request limit of 5.  With ColdFusion 8, the request tuning pools are subsets of the JRun thread pool, with the default values of CFM/10, CFC/5, Flash Remoting/10, Web Service/5. (These values are held in the ColdFusion configuration file neo-runtime.xml.)  The total default value is then 20 ColdFusion requests, and the JRun Master Request Limit for running JRun threads is set to a default of 50 where that value directly ties to the JRun activeHandlerThreads setting in the jrun.xml config file.</p>
<p>Notice that in ColdFusion 7 the total size for the JRun thread pool activeHandlerThreads has a default of 8, and that the ColdFusion 8 default JRun activeHandlerThreads setting is 50, about a 6-fold increase.  The overall JRun defaults were increased in ColdFusion 8 based on the performance improvements observed with the upgrade to JVM 1.6 and the other internal ColdFusion server performance enhancements.  Its wise to be aware of the difference in these default pool sizes because an upgrade without load testing may result in inadequate default request tuning settings.</p>
<p>As mentioned earlier, on other J2EE server types such as WebSphere, the ColdFusion 7 Simultaneous Request setting is not available, however with ColdFusion 8 the individual CFM/CFC/FR/WS pools are accessible for ColdFusion Enterprise on those non-Adobe J2EE servers.</p>
<p><strong>CFThread</strong></p>
<p>The use of CFThread in ColdFusion 8 applications requires its own discussion apart from what&#8217;s covered in this article.  Notice that CFThread requests do not arrive via HTTP Requests from end users, and therefore are not subject to the ColdFusion Request Limits.  The ColdFusion Administrator provides a separate setting for CFThread.  In Enterprise Edition the default value for CFThread limit is 10 but may be increased upwards as needed.  In Standard Edition the hard limit for CFThread is 10.  It has been suggested in a comment on <a href="http://www.bennadel.com/blog/749-Learning-ColdFusion-8-CFThread-Part-II-Parallel-Threads.htm">Ben Nadel&#8217;s blog</a> that for applications spawning high volumes of CFThreads that you may need to adjust the jrun.xml JRunSchedulerService setting for activeHandlerThreads, not to be confused with the setting of the same name in the JRunProxyService section. I haven&#8217;t yet validated that statement, so you may want to do so yourself.  If you begin to tune the JRunSchedulerService settings, be aware that the maxHandlerThreads should not be larger than the activeHandlerThreads setting for the JRunSchedulerService because those threads do not die when idle, so that type of request pool does not shrink, but can only grow until the max limit.</p>
<p><strong>Watch it!</strong></p>
<p>With the addition of these new ColdFusion thread pools in ColdFusion 8, the commandline utility cfstat has been enhanced with 12 new columns to report the new values (including running, queued, and timedout).  To see these columns in ColdFusion 8 cfstat, use the -x switch for eXtended metrics, as in cfstat -x 1 to output extended data every second.</p>
<div id="attachment_1148" class="wp-caption aligncenter" style="width: 551px"><img class="size-full wp-image-1148" title="eXtended cfstat utility" src="http://www.webapper.com/enclosures/2009/08/cfstat_CFIDE_trapdoor.jpg" alt="Here cfstat reveals 22 running requests total, but only 10 cfm and 10 cfc requests.  The extra 2 requests were from accessing the ColdFusion Administrator which bypasses the new ColdFusion request limit pools." width="541" height="177" /><p class="wp-caption-text">Here cfstat reveals 22 running requests total, but only 10 cfm and 10 cfc requests.  The extra 2 requests were from accessing the ColdFusion Administrator which bypasses the new ColdFusion request limit pools.</p></div>
<p><strong>To the Future</strong></p>
<p>In July 2009 Adobe released a public Beta version of ColdFusion Server 9.  The Request Tuning settings remains unchanged from as they were in ColdFusion 8 at this time, so this article still applies as of this writing.</p>
<p><strong>Other Facets of Server Performance</strong></p>
<p>Request Tuning is just one aspect of performance tuning considerations.  Continue reading the Webapper blog for posts having overviews and recommendations of JVM tuning, and architectural suggestions.</p>
<hr /><span><strong>Acknowledgements</strong></span></p>
<p><span>Many thanks for the technical review provided by:</span></p>
<ul> <span></p>
<li><a href="http://www.fuzzyorange.co.uk/">Andy Allan</a></li>
<li><a href="http://www.cfwhisperer.com/">Mike Brunt</a></li>
<p></span></ul>
<p><span> </span></p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/ip7eDh1gkFM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/08/03/coldfusion-request-tuning-settings-in-depth/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/08/03/coldfusion-request-tuning-settings-in-depth/</feedburner:origLink></item>
		<item>
		<title>SeeDSN – A JDBC Wrapping Tool For Use With SeeFusion</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/qHGLPGshwD0/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 20:53:42 +0000</pubDate>
		<dc:creator>Tyson Vanek</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[General Development]]></category>
		<category><![CDATA[SeeFusion]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1119</guid>
		<description><![CDATA[Introduction
SeeDSN is utility that I&#8217;ve been using internally with our SeeFusion customers for years in order to assist with configuring JDBC wrapped datasources that can be monitored via SeeFusion.  The utility was originally developed for Webapper by Daryl Banttari, but it was never officially released to the public &#8211; until today.  Recently I was on [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p><strong></strong>SeeDSN is utility that I&#8217;ve been using internally with our SeeFusion customers for years in order to assist with configuring JDBC wrapped datasources that can be monitored via SeeFusion.  The utility was originally developed for Webapper by Daryl Banttari, but it was never officially released to the public &#8211; until today.  Recently I was on location with a Webapper customer in New Mexico assisting with installation and configuration of SeeFusion when the lead technical resource, Robert Aguayo, suggested the idea of integrating SeeDSN directly into the ColdFusion Administrator interface.  It was Robert&#8217;s suggestion that motivated me to revisit the utility, clean up some of the technical aspects, and publicly release it as a ColdFusion Administrator extension for SeeFusion users/customers.</p>
<p><strong>What is SeeDSN?</strong></p>
<p><strong> <span style="font-weight: normal; ">SeeDSN is a web-based administrative utility for use with SeeFusion.  Using SeeDSN, administrators of ColdFusion instances configured with SeeFusion can easily wrap/unwrap datasources with the JDBC wrapper required for reporting query information within SeeFusion.</span></strong></p>
<p><strong></strong><em>Main Features</em></p>
<ul>
<li>One-click functionality of backing up an existing ColdFusion datasource before applying the JDBC wrapper required for proper reporting to SeeFusion.</li>
<li>One-click functionality of restoring ColdFusion datasources to its original unwrapped configuration and removing the JDBC wrapper.</li>
<li>Form-driven configuration of additional JDBC connection string arguments relevant to datasources wrapped for use with SeeFusion.</li>
<li>Ability to verify datasources in the same manner that they are verified from the ColdFusion Administrator Datasources page.</li>
<li>Integrates SeeDSN and SeeFusion directly with your existing ColdFusion Administrator interface.</li>
</ul>
<p> </p>
<p><em>Requirements</em></p>
<ul>
<li>ColdFusion 7+</li>
<li>SeeFusion</li>
</ul>
<p> </p>
<p><strong>Installation</strong></p>
<p><strong><span style="font-weight: normal;">First, you&#8217;ll need to download the distribution <a title="here" href="http://www.seefusion.com/seedsn_v1.1.zip">here</a> (http://www.seefusion.com/seedsn_v1.1.zip).  Once you&#8217;ve downloaded it, you&#8217;ll need to open it up and follow the steps below.  These directions can also be found in the <em>readme.txt</em> file bundled with the distribution.</span></strong></p>
<ol>
<li>Copy the &#8220;seedsn&#8221; folder in this archive directly to your <em>/CFIDE/Administrator/</em> folder.�<br />
This means that when you&#8217;re finished, you should have a new &#8220;<em>seedsn</em>&#8220; folder in your<br />
<em>/CFIDE/Administrator/</em> folder (i.e. <em>/CFIDE/Administrator/seedsn/</em>).</li>
<li>If you&#8217;re using ColdFusion 8+, move &#8220;<em>/CFIDE/Administrator/seedsn/custommenu.xml</em>&#8221; to &#8220;<em>/CFIDE/Administrator/custommenu.xml</em>&#8220;.</li>
<li>If you&#8217;re using ColdFusion 7.*, move &#8220;<em>/CFIDE/Administrator/seedsn/extensionscustom.cfm</em>&#8221; to &#8220;<em>/CFIDE/Administrator/extensionscustom.cfm</em>&#8220;.</li>
<li>Edit &#8220;<em>/CFIDE/Administrator/seedsn/Application.cfm</em>&#8221; and replace the value of the &#8220;request.urlSeeFusionRedirect&#8221; variable with the fully-qualified URL to your existing SeeFusion Flex dashboard interface.</li>
</ol>
<p>That&#8217;s it!  You&#8217;ve just installed SeeDSN, and now you can access it directly from your ColdFusion Administrator.</p>
<p><strong>Using SeeDSN</strong></p>
<p><strong><span style="font-weight: normal;">Once you have completed the steps outlined above, you&#8217;ll be able to access<strong> </strong>both SeeDSN and SeeFusion directly from within your ColdFusion Administrator interface.</span></strong></p>
<p>Simply fire up your preferred web browser and log in to your existing ColdFusion Administrator.  Once you&#8217;ve logged in, you should notice a new group of menu options towards the bottom of the left-side navigation menu.</p>
<p>ColdFusion 8+<br />
You should see a new navigation menu section labeled &#8220;SEEFUSION&#8221; which, when expanded, contains two links.<br />
- &#8220;Flex Dashboard&#8221; will link to the SeeFusion Flex dashboard as indicate by the URL you supplied during step 3 above.<br />
- &#8220;Datasource Wrapper&#8221; will link to the SeeDSN JDBC wrapping utility that will assist you with your datasource wrapping needs.</p>
<p>ColdFusion 7.*<br />
You should see a new navigation menu section labeled &#8220;CUSTOM EXTENSIONS&#8221; which, when expanded, contains two links.<br />
- &#8220;SeeFusion Flex Dashboard&#8221; will link to the SeeFusion Flex dashboard as indicate by the URL you supplied during step 3 above.<br />
- &#8220;SeeFusion Datasource Wrapper&#8221; will link to the SeeDSN JDBC wrapping utility that will assist you with your datasource wrapping needs.</p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/qHGLPGshwD0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/</feedburner:origLink></item>
		<item>
		<title>Perry Woodin Joins Webapper!</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/v2eYlSNiXo8/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/05/29/perry-woodin-joins-webapper/#comments</comments>
		<pubDate>Fri, 29 May 2009 20:36:05 +0000</pubDate>
		<dc:creator>Nat Papovich</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1116</guid>
		<description><![CDATA[
We’re very excited to announce yet another big notch in our Web application engineering belt – Perry Woodin joined Webapper early this month. Whereas our recent hire of Steven Erat has contributed greatly to our ColdFusion Tuning &#38; Troubleshooting services, Perry brings an altogether different set of skills to our Application Development services, and will [...]]]></description>
			<content:encoded><![CDATA[<div class="storycontent">
<p>We’re very excited to announce yet another big notch in our Web application engineering belt – Perry Woodin joined Webapper early this month. Whereas our <a href="http://www.webapper.com/blog/index.php/2009/04/30/steven-erat-joins-webapper/">recent hire of Steven Erat</a> has contributed greatly to our <a href="http://www.webapper.com/index.cfm/consulting-services">ColdFusion Tuning &amp; Troubleshooting services</a>, Perry brings an altogether different set of skills to our <a href="http://www.webapper.com/index.cfm/ria-development">Application Development services</a>, and will be leading development projects.</p>
<p>Having worked with ColdFusion since version 2.0,  he co-authored &#8220;<a href="http://www.amazon.com/Discovering-Fusebox-4-John-Quarto-vonTivadar/dp/0972078657">Discovering Fusebox 4 with ColdFusion</a>&#8221; while working on a range of business and commercial web applications ranging from eCommerce apps to specialized internal systems for everything from art galleries to industrial manufacturers. Additionally, he has significant Flex development under his belt (his latest application made Laptop Magazine&#8217;s Top 50 Web Applications of 2008), which we&#8217;ll be putting to good use in very short order.</p>
<p>We couldn’t be happier about adding Perry’s talents to our team of Web application engineers. Welcome Perry!</p></div>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/v2eYlSNiXo8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/05/29/perry-woodin-joins-webapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/05/29/perry-woodin-joins-webapper/</feedburner:origLink></item>
		<item>
		<title>Charity Code Jam Is A Go!</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/kM5VSKI48GU/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/05/12/charity-code-jam-is-a-go/#comments</comments>
		<pubDate>Tue, 12 May 2009 20:18:41 +0000</pubDate>
		<dc:creator>Shannon Hicks</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[360Flex]]></category>
		<category><![CDATA[Charity Code Jam]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1108</guid>
		<description><![CDATA[We&#8217;re happy to announce that, with the help of the dynamic duo from 360&#124;Conferences, the Charity Code Jam is going to happen at 360&#124;Flex in Indianapolis. After reading their blog post, we talked it over and decided this was another excellent way to spread good karma around.
Ali Daniali has plane tickets in hand now, and [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re happy to announce that, with the help of the dynamic duo from 360|Conferences, the Charity Code Jam is going to happen at <a href="http://www.360flex.com/">360|Flex in Indianapolis</a>. After reading <a href="http://www.ourstartupstory.com/great-opportunity-to-earn-some-good-juju-who-wants-it/">their blog post</a>, we talked it over and decided this was another excellent way to spread good karma around.</p>
<p>Ali Daniali has plane tickets in hand now, and we&#8217;ll lend a hand setting up the spaces donated by 360|Flex so the coding can begin on Monday, May 18. Coding will continue 24 hours/day until we&#8217;re done, and there will be copious amounts of caffeine and food. So bring your laptop and plenty of sleep before the conference, and help make a difference for The Leukemia &#038; Lymphoma Society. Webapper is honored to be pitching in with some dollars to support such an incredible effort in giving back.</p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/kM5VSKI48GU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/05/12/charity-code-jam-is-a-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/05/12/charity-code-jam-is-a-go/</feedburner:origLink></item>
		<item>
		<title>CreateUUID() : Friendly Function or Server Killer?</title>
		<link>http://feedproxy.google.com/~r/WebapperBlog/~3/ShFApHFrY_c/</link>
		<comments>http://www.webapper.com/blog/index.php/2009/05/05/createuuid_friendly_function_or_server_killer/#comments</comments>
		<pubDate>Tue, 05 May 2009 06:29:15 +0000</pubDate>
		<dc:creator>Tyson Vanek</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[JVM & Java]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SeeFusion]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.webapper.com/blog/?p=1071</guid>
		<description><![CDATA[Ok, so I know what you&#8217;re thinking.  You&#8217;re thinking I must be crazy for suggesting that a simple built-in unique randomization function could somehow be instrumental in crashing a ColdFusion server, right?  Well, before you go calling me a lunatic, let me assure you that the ColdFusion createUUID() function DOES, in fact, represent a threat [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so I know what you&#8217;re thinking.  You&#8217;re thinking I must be crazy for suggesting that a simple built-in unique randomization function could somehow be instrumental in crashing a ColdFusion server, right?  Well, before you go calling me a lunatic, let me assure you that the ColdFusion <em>createUUID()</em> function DOES, in fact, represent a threat to the stability of your server &#8211; and I intend to prove it to you.</p>
<p>Before I go too far into this topic, I should point out that this threat really only exists if you happen to be running ColdFusion on a Windows server.  For those of you who are running on any sort of *NIX-based server, you can move on &#8211; nothing to see here.</p>
<p>If you&#8217;re still with me at this point, then I need to do a little explaining.</p>
<p>First off, you should be aware of a known issue with ColdFusion on Windows servers as documented in this <a title="Adobe TechNote" href="http://www.adobe.com/go/tn_19007" target="_blank">Adobe TechNote</a> article.  This TechNote basically explains that there&#8217;s a bug with certain JVM versions under the hood of ColdFusion that results in the potential for the <em>createUUID()</em> function to actually increase the speed of the system clock within Windows.  Now, this acceleration of the Windows system clock is only likely to occur in situations where <em>createUUID()</em> is &#8220;heavily utilized&#8221;.  The tricky part here is that I&#8217;m not entirely certain how &#8220;heavily utilized&#8221; is classified as referenced in the TechNote.  Later in this article, however, I will give you an example of a particular customer scenario that was creating this server-crashing behavior as a point of reference.  For now, just note that heavy usage of the <em>createUUID()</em> function might cause the Windows system clock to speed ahead a matter of seconds or even minutes within the span of an hour or two depending the volume with which the function calls are made.</p>
<p>Now, the second vital bit of of information comes down to the inner mechanics of how the <em>createUUID()</em> function actually works.  The function more or less generates a unique hash/GUID based on a combination of the server machine ID, a cryptographically strong random number, and the present date and time.  Now, we all know that calls to the <em>createUUID()</em> function on the same server will all have the same machine ID input value.  And even though the chance is extremely slim, fact remains there&#8217;s a fraction of a fraction of a chance that two calls to generate a &#8220;cryptographically strong random number&#8221; could result in returning the same value.  That&#8217;s where the importance of the present date and time consideration made by <em>createUUID()</em> becomes important.  If you think about how quickly many ColdFusion templates execute (quite often literally within milliseconds), you can quickly see how a series of calls to simply get the current server date and time (even if to the precision of milliseconds) might return the exact same date and time.  For this very reason, the <em>createUUID()</em> method makes a call during its execution to another internal method &#8211; <em>uniqueTOD()</em>.  The purpose of <em>uniqueTOD()</em> is to return a Unique Time Of Day &#8211; as the name suggests.  But as we already discussed, it&#8217;s possible that extremely rapid calls to return the system date and time may not be separated by more than a millisecond, resulting in a return of the same date and time.  So, in order to ensure that this doesn&#8217;t take place, the <em>uniqueTOD()</em> function has been designed as a &#8220;synchronized&#8221; method.  In the Java world, that just means that the method is single-threaded &#8211; it can only be run one invocation at a time, and any attempts to invoke it while it&#8217;s already in the process of running will be blocked until execution of the running invocation completes.  In addition to this, the <em>uniqueTOD()</em> also includes a <em>Thread.sleep(1)</em> statement which effectively causes the thread to sleep for 1 millisecond by designating a specific date and time at which to wake and resume execution.  The combination of these two concepts ensures that dates and times returned by the <em>uniqueTOD()</em> function will always be separated by at least 1 millisecond.</p>
<p>If you need proof that this takes place, take the following bit of sample code, toss it on your server, enable server debugging output, point your browser at it, and take a look at the execution time spent.</p>
<pre>&lt;cfloop from="1" to="1000" index="i"&gt;
    &lt;cfset x = createUUID()&gt;
&lt;/cfloop&gt;</pre>
<p>When you run this code, you&#8217;ll quickly notice that the execution time takes roughly 1 second or 1,000 milliseconds in direct correlation with the <em>to</em> argument value of 1,000 for the <em>cfloop</em>.  This correlates directly to the 1ms sleep time being incurred with each of the 1,000 calls within the loop to <em>createUUID()</em>.</p>
<p>So now that we understand all those mechanics, it&#8217;s time for me to unveil where this might become a server killing problem.  There&#8217;s a handy bit of operating system housekeeping that most of us take completely for granted these days &#8211; automatic internet-based time synchronization.  Consider the following scenario with me.</p>
<ul>
<li>Your server starts off at 1:00:00.000pm with a date and time that are synchronized to an internet time server of some sort.</li>
<li>Your ColdFusion application makes &#8220;heavy utilization&#8221; of the <em>createUUID()</em> function over the course of 2 hours, gradually advancing your server clock by 200 seconds or so as a result of the behavior/bugs I&#8217;ve explained above.</li>
<li>Your ColdFusion server is in the middle of a series of high-volume calls to the <em>createUUID()</em> function.</li>
<li>Your server makes a call to the configured internet time server, realizes the system clock is currently running about 200 seconds fast, and resets the system clock appropriately to 3:00:00.000pm.</li>
<li>As the system clock was turned back to the proper time, a single internal call to the <em>uniqueTOD()</em> function had already assigned a &#8220;wake time&#8221; of 3:03:20.001pm (based on having previously been 200 seconds ahead).</li>
</ul>
<p>In the scenario outlined above, you now have a <em>createUUID()</em> call waiting on an internal <em>uniqueTOD()</em> call that won&#8217;t actually complete execution until 3:03:20.001pm.  Prior to the call to synchronize the system clock with the internet time server,  this would have only been 1 millisecond away.  But now that the server clock has been corrected, we&#8217;re suddenly 3 minutes, 20 seconds, and 1 millisecond away from that &#8220;wake time&#8221;.  And what makes matters worse is that the waiting <em>uniqueTOD()</em> invocation is also synchronized.  This means that all other invocations to <em>uniqueTOD()</em> or to any other functions that include the use of <em>uniqueTOD()</em> must now sit and wait until the running/waiting invocation &#8220;wakes&#8221; and completes at 3:03:20.001pm.</p>
<p>Wait a minute.  What&#8217;s that I hear in the background?  Oh, yes&#8230; that&#8217;s the sound of thread activity grinding to a halt on your production server as threads are suddenly being blocked for 3 minutes, 20 seconds and 1 millisecond until that <em>uniqueTOD()</em> invocation finally wakes and completes in order to generate that UUID that was requested.</p>
<p>I actually tracked this situation down for a Webapper customer who had been experiencing frequent yet unpredictable &#8220;mystery crashes&#8221; of their ColdFusion instances.  Our customer was very technically proficient and had already looked under most of the &#8220;rocks&#8221; we would typically turn over in this sort of situation.  During our initial kick-off call with the customer, we were all in consensus that this was likely a result of some sort of database transaction locking and blocking that we&#8217;d need to track down.  After a little investigation and profiling on the servers in question, I realized that was simply a red herring.  With the help of <a title="SeeFusion" href="http://www.seefusion.com/" target="_blank">SeeFusion</a>, we were able to snag stack traces from the server as the crashes were actually taking place and quickly determine that the entire system was hanging up WAY before ever getting to any database activity.  In fact, the application seemed to be hung on the first line of their <em>Application.cfm</em> file &#8211; the <em>&lt;cfapplication&gt;</em> tag.</p>
<p>That&#8217;s when it hit me.  The customer&#8217;s application was architected in such a way that there were very high-volume rapid-succession web service calls being made to a ColdFusion component.  By high-volume rapid-succession, I specifically mean 2 or 3 calls every 50ms.  That component, by design, was including the root <em>Application.cfm</em> file.  And the <em>&lt;cfapplication&gt;</em> call was hanging because the <em>clientmanagement</em> argument had been set to &#8220;true&#8221; and the customer had enabled the &#8220;<em>Use UUID for CFTOKEN</em>&#8221; checkbox in the ColdFusion Administrator.  Each web service call was resulting in the assignment of a new CFID/CFTOKEN pair &#8211; an entirely separate blog-worthy issue.  Suddenly, the whole situation made perfect sense &#8211; well, at least in theory.  The real test, of course, would be to have the customer uncheck the &#8220;<em>Use UUID for CFTOKEN</em>&#8221; setting and see if the &#8220;mystery crashes&#8221; came to an end.  I&#8217;m happy to report that they haven&#8217;t had a system hang since disabling that ColdFusion setting.</p>
<p>So, if you have any code in your server that might be creating opportunities for high-volume utilization of the <em>createUUID()</em> function, then you just might be one internet clock synchronization cycle away from a complete ColdFusion meltdown.</p>
<img src="http://feeds.feedburner.com/~r/WebapperBlog/~4/ShFApHFrY_c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.webapper.com/blog/index.php/2009/05/05/createuuid_friendly_function_or_server_killer/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		<feedburner:origLink>http://www.webapper.com/blog/index.php/2009/05/05/createuuid_friendly_function_or_server_killer/</feedburner:origLink></item>
	</channel>
</rss>
