<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Uptime &#38; Performance Tips</title>
	<atom:link href="http://blog.monitis.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.monitis.com</link>
	<description>Tips for SysAdmin, Webmaster, Network Admin</description>
	<lastBuildDate>Wed, 16 May 2012 13:18:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Introduction to SQL Azure</title>
		<link>http://blog.monitis.com/index.php/2012/05/16/introduction-to-sql-azure/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/16/introduction-to-sql-azure/#comments</comments>
		<pubDate>Wed, 16 May 2012 13:18:47 +0000</pubDate>
		<dc:creator>Irina Tihova</dc:creator>
				<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[Database Management]]></category>
		<category><![CDATA[Database Monitoring]]></category>
		<category><![CDATA[MS SQL Server Monitoring]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ms sql]]></category>
		<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[windows azure]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6783</guid>
		<description><![CDATA[&#160; In our previous articles, Introduction to SQL Server 2012 and Windows Azure Overview, we made references to Microsoft’s SQL Azure service. In this article we will take a closer look at its main features in more detail. SQL Azure is a relational database solution with the capability to support both Windows Azure and on-premise applications with minimum [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/SQL-Azure.jpg"><img class="alignright size-full wp-image-6785" src="http://blog.monitis.com/wp-content/uploads/2012/05/SQL-Azure.jpg" alt="" width="250" height="188" /></a></p>
<p>In our previous articles, <a href="http://blog.monitis.com/index.php/2012/05/08/introduction-to-sql-server-2012/" target="_blank">Introduction to SQL Server 2012</a> and <a href="http://blog.monitis.com/index.php/2012/03/16/windows-azure-overview/" target="_blank">Windows Azure Overview</a>, we made references to Microsoft’s SQL Azure service. In this article we will take a closer look at its main features in more detail.</p>
<p>SQL Azure is a relational database solution with the capability to support both Windows Azure and on-premise applications with minimum latency. It is considered a managed service and it’s offered by Microsoft to allow you to build applications without concerning yourself about the storage they’ll use. Being a cloud service, SQL Azure gives you all the benefits of the cloud including:</p>
<p>-          The hardware and software that support the SQL database are all managed by Microsoft</p>
<p>-          Patching and maintenance are also managed by Microsoft</p>
<p>-          High availability and fault tolerance are guaranteed by an SLA (Service-level agreement)</p>
<p>-          Per usage billing and the availability to scale up or down whenever you have the need</p>
<p>All these features contribute to SQL Azure’s eased management. The service-level agreement is backed up by powerful and extremely secure datacenters offering you maximum protection of your databases. SQL Azure is built entirely on top of SQL Server and offers most of SQL Server’s features, such as the Tabular Data Streams (TDSs) for connecting, databases with tables, views, stored procedures, indexes, etc. They are all managed using the standard T-SQL language. SQL Azure allows you to store up to 150 GB of information in your database. If you need more storage for a database, you will have to spread it out over multiple databases and use parallel queries<span id="more-6783"></span></p>
<p>Keep in mind that SQL Azure is secure by default and you have to create firewall rules to enable access to the service. It uses port 1433 and it must be open for the client application as well. Any open connection, being inactive for 30 minutes or using excessive resources, is dropped.</p>
<p>Note also that the T-SQL statement USE can’t be used in SQL Azure. You are forced to identify the database of your choice in the connection string. If you don’t, you will be connected to the master database by default.</p>
<p>SQL Azure comes in two editions – Web, with maximum database capacity of 5 GB, and Business, with maximum database capacity of 150 GB. The pricing is either on a per-use basis or on a 6-month commitment. Here is a price list cited from Microsoft:</p>
<table width="576" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="208"><strong>Database Size</strong></td>
<td width="369"><strong>Price Per Database Per Month</strong></td>
</tr>
<tr>
<td width="208">0 to 100 MB</td>
<td width="369">Flat $4.995</td>
</tr>
<tr>
<td width="208">Greater than 100 MB to 1 GB</td>
<td width="369">Flat $9.99</td>
</tr>
<tr>
<td width="208">Greater than 1 GB to 10 GB</td>
<td width="369">$9.99 for first GB, $3.996 for each additional GB</td>
</tr>
<tr>
<td width="208">Greater than 10 GB to 50 GB</td>
<td width="369">$45.954 for first 10 GB, $1.998 for each additional GB</td>
</tr>
<tr>
<td width="208">Greater than 50 GB to 150 GB</td>
<td width="369">$125.874 for first 50 GB, $0.999 for each additional GB</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Be aware that every portion of a GB is a billed GB and the size is calculated on a daily basis taking into account the maximum capacity during that day. The bills you get, however, are monthly. Microsoft has recently changed the names for the Azure services in their billings. That’s why you will get a bill for SQL database, not SQL Azure. Here is a list of all the name changes on the Microsoft billing portal:</p>
<table width="579" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="297"><strong>Prior Service Name</strong></td>
<td width="281"><strong>New Service Name</strong></td>
</tr>
<tr>
<td valign="top" width="297">Windows Azure Compute</td>
<td valign="top" width="281">Cloud Services</td>
</tr>
<tr>
<td valign="top" width="297">Windows Azure Platform – All Services</td>
<td valign="top" width="281">All Services</td>
</tr>
<tr>
<td valign="top" width="297">Windows Azure CDN</td>
<td valign="top" width="281">CDN</td>
</tr>
<tr>
<td valign="top" width="297">Windows Azure Storage</td>
<td valign="top" width="281">Storage</td>
</tr>
<tr>
<td valign="top" width="297">Windows Azure Traffic Manager</td>
<td valign="top" width="281">Traffic Manager</td>
</tr>
<tr>
<td valign="top" width="297">Windows Azure Virtual Network</td>
<td valign="top" width="281">Virtual Network</td>
</tr>
<tr>
<td valign="top" width="297">AppFabric Cache</td>
<td valign="top" width="281">Cache</td>
</tr>
<tr>
<td valign="top" width="297">AppFabric Service Bus</td>
<td valign="top" width="281">Service Bus</td>
</tr>
<tr>
<td valign="top" width="297">AppFabric Access Control</td>
<td valign="top" width="281">Access Control</td>
</tr>
<tr>
<td valign="top" width="297">SQL Azure</td>
<td valign="top" width="281">SQL Database</td>
</tr>
<tr>
<td valign="top" width="297">SQL Azure Reporting Services</td>
<td valign="top" width="281">SQL Reporting</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>We already investigated the SQL Azure Data Sync service in our previous article, <a href="http://blog.monitis.com/index.php/2012/05/08/introduction-to-sql-server-2012/" target="_blank">Introduction to SQL Server 2012</a>. It eases your work with SQL Azure even more by simplifying the process of synchronization between your SQL Azure and on-premise SQL databases. It even gives you the ability to choose which exact columns you would like to sync. By using SQL Azure Data Sync you can eliminate the boundaries between your databases and easily move to and from the cloud whenever you need to.  You can also use it for replicating your data across different geographical locations to enhance the worldwide experience of your users.</p>
<p>Rest assured that Microsoft has implemented a lot of security measures to protect your data stored in the cloud, including SQL Authentication and IP filtering. SQL Azure doesn’t yet support Transparent Data Encryption (TDE). It uses only the Tabular Data Stream (TDS) connection protocol. You can implement another form of application encryption if required. However, the SQL Azure Data Sync service does encrypt all the connections between its components, such as between the on-premise database and the cloud.</p>
<p>SQL Azure also enjoys most of the security benefits related to all the Microsoft cloud solutions discussed previously in the article <a href="http://blog.monitis.com/index.php/2012/04/19/windows-azure-overview-part-4-security/" target="_blank">Windows Azure Overview Part 4: Security</a>.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;title=Introduction%20to%20SQL%20Azure&amp;notes=%26nbsp%3B%0D%0A%0D%0A%0D%0A%0D%0AIn%20our%20previous%20articles%2C%C2%A0Introduction%20to%20SQL%20Server%202012%C2%A0and%C2%A0Windows%20Azure%20Overview%2C%20we%20made%20references%20to%20Microsoft%E2%80%99s%20SQL%20Azure%20service.%20In%20this%20article%20we%20will%20take%20a%20closer%20look%20at%20its%20main%20features%20in%20more%20detail.%0D%0A%0D%0ASQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;title=Introduction%20to%20SQL%20Azure&amp;bodytext=%26nbsp%3B%0D%0A%0D%0A%0D%0A%0D%0AIn%20our%20previous%20articles%2C%C2%A0Introduction%20to%20SQL%20Server%202012%C2%A0and%C2%A0Windows%20Azure%20Overview%2C%20we%20made%20references%20to%20Microsoft%E2%80%99s%20SQL%20Azure%20service.%20In%20this%20article%20we%20will%20take%20a%20closer%20look%20at%20its%20main%20features%20in%20more%20detail.%0D%0A%0D%0ASQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;t=Introduction%20to%20SQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;title=Introduction%20to%20SQL%20Azure&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%26nbsp%3B%0D%0A%0D%0A%0D%0A%0D%0AIn%20our%20previous%20articles%2C%C2%A0Introduction%20to%20SQL%20Server%202012%C2%A0and%C2%A0Windows%20Azure%20Overview%2C%20we%20made%20references%20to%20Microsoft%E2%80%99s%20SQL%20Azure%20service.%20In%20this%20article%20we%20will%20take%20a%20closer%20look%20at%20its%20main%20features%20in%20more%20detail.%0D%0A%0D%0ASQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;Title=Introduction%20to%20SQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;title=Introduction%20to%20SQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;title=Introduction%20to%20SQL%20Azure&amp;annotation=%26nbsp%3B%0D%0A%0D%0A%0D%0A%0D%0AIn%20our%20previous%20articles%2C%C2%A0Introduction%20to%20SQL%20Server%202012%C2%A0and%C2%A0Windows%20Azure%20Overview%2C%20we%20made%20references%20to%20Microsoft%E2%80%99s%20SQL%20Azure%20service.%20In%20this%20article%20we%20will%20take%20a%20closer%20look%20at%20its%20main%20features%20in%20more%20detail.%0D%0A%0D%0ASQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;title=Introduction%20to%20SQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F&amp;title=Introduction%20to%20SQL%20Azure" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Introduction%20to%20SQL%20Azure%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F16%2Fintroduction-to-sql-azure%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/16/introduction-to-sql-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improving .NET Application Performance Part 13: Arrays</title>
		<link>http://blog.monitis.com/index.php/2012/05/15/improving-net-application-performance-part-13-arrays/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/15/improving-net-application-performance-part-13-arrays/#comments</comments>
		<pubDate>Tue, 15 May 2012 14:32:36 +0000</pubDate>
		<dc:creator>Ard-Jan Barnas</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[.net application performance]]></category>
		<category><![CDATA[.NET Framework]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6805</guid>
		<description><![CDATA[In our previous article in the .NET series we discussed the how to optimize String operations in .NET. In this article we’ll focus on optimizing arrays. Arrays provide basic functionality for grouping types. Every language implements array syntax in its own way, although the following considerations apply regardless of language: Arrays have a static size. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/04/NET_v_rgb_2.png"><img class="alignright size-full wp-image-6369" title="NET_v_rgb_2" src="http://blog.monitis.com/wp-content/uploads/2012/04/NET_v_rgb_2.png" alt="" width="160" height="152" /></a>In our previous article in the .NET series we discussed the how to <a href="http://blog.monitis.com/index.php/2012/05/04/improving-net-application-performance-part-12-string-operations/" target="_blank">optimize String operations in .NET</a>. In this article we’ll focus on optimizing arrays.</p>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>Arrays provide basic functionality for grouping types. Every language implements array syntax in its own way, although the following considerations apply regardless of language:</span></span></span></p>
<ul style="margin-bottom: 0in;" type="disc">
<li class="MsoNormal"><span style="font-family: 'Segoe UI';"><strong><span><span>Arrays have a static size</span></span></strong><span><span>. The size of the array remains fixed after initial allocation. If you need to extend the size of the array, you must create a new array of the required size and then copy the elements from the old array.</span></span></span></li>
<li class="MsoNormal"><span style="font-family: 'Segoe UI';"><strong><span><span>Arrays support indexed access</span></span></strong><span><span>. To access an item in an array, you can use its index.</span></span></span></li>
<li class="MsoNormal"><span style="font-family: 'Segoe UI';"><strong><span><span>Arrays support enumerator access</span></span></strong><span><span>. You can access items in the array by enumerating through the contents using the <strong><span>foreach</span></strong> construct (C#) or <strong><span>For</span></strong> <strong><span>Each</span></strong> (Visual Basic .NET).</span></span></span></li>
<li class="MsoNormal"><span style="font-family: 'Segoe UI';"><strong><span><span>Memory is contiguous</span></span></strong><span><span>. The CLR arranges arrays in contiguous memory space, which provides fast item access.<span id="more-6805"></span></span></span></span></li>
</ul>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>This section summarizes performance guidelines to consider when using arrays:</span></span></span></p>
<ul style="margin-bottom: 0in;" type="disc">
<li class="MsoNormal"><span style="font-family: 'Segoe UI';"><strong><span><span>Prefer arrays to collections unless you need functionality</span></span></strong><span><span>.</span></span></span></li>
<li class="MsoNormal"><span style="font-family: 'Segoe UI';"><strong><span><span>Use strongly typed arrays</span></span></strong><span><span>.</span></span></span></li>
<li class="MsoNormal"><span style="font-family: 'Segoe UI';"><strong><span><span>Use jagged arrays instead of multidimensional arrays</span></span></strong><span><span>.</span></span></span></li>
</ul>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="line-height: 12pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Prefer Arrays to Collections Unless You Need Functionality</span></span></span></span></h3>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>Arrays are the fastest of all collections, so unless you need special functionality, such as dynamic extension of the collection, you should consider using arrays rather than collections. Arrays also avoid the boxing and unboxing overhead.</span></span></span></p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="line-height: 12pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Use Strongly Typed Arrays</span></span></span></span></h3>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>Use strongly typed arrays where possible, rather than using object arrays to store types. This avoids type conversion or boxing depending upon the type stored in the array. If you declare an array of objects and then proceed to add a value type such as an integer or float to the array, it involves the boxing overhead as shown in the following code sample.</span></span></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Object[] array = new Object[10]</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>arr[0] = 2+3; //boxing occurs here</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em> </em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>To avoid the boxing overhead declare a strongly typed int array, as follows:</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>int [] arrIn = new int [10];</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>arrIn[0] = 2+3;</em></p>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>Storing reference types, such as string or custom classes in the array of objects, involves the typecasting overhead. Therefore, use strongly typed arrays to store your reference types to, as shown in the following code sample.</span></span></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>string[10]<span>  </span>arrStr = new string[10];</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>arrStr[0] =<span>  </span>new string(&#8220;abc&#8221;);</em></p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="line-height: 12pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Use Jagged Arrays Instead of Multidimensional Arrays</span></span></span></span></h3>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>A jagged array is a single dimensional array of arrays. The elements of a jagged array can be of different dimensions and sizes. Use jagged arrays instead of multidimensional arrays to benefit from MSIL performance optimizations. </span></span></span></p>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>MSIL has specific instructions that target single dimensional zero-based arrays (SZArrays) and access to this type of array is optimized. In contrast, multidimensional arrays are accessed using the same generic code for all types, which results in boxing and unboxing for arrays of primitive types.</span></span></span></p>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>Let’s look at an example showing the declaration and use of jagged arrays.</span></span></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>string[][] Address = new string[2][];<span>  </span>// A jagged array of strings</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Address[0] = new string[1];</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Address[1] = new string[2];</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Address[0][0] = &#8220;Address [0,1]&#8220;;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Address[1][0] = &#8220;Address [1,0]&#8220;;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Address[1][1] = &#8220;Address [1,1]&#8220;;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>for (int i =0; i &lt;=1; i++) {</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>      </span>for (int j = 0; j &lt; Address[i].Length; j ++)</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>            </span>MessageBox.Show(Address[i][j]);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>}</em></p>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>You can compare the efficiency of jagged versus multidimensional arrays by studying the MSIL code generated in each case. Notice how the following code that uses a multidimensional array results in a function call.</span></span></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>int [,] secondarr = new int[1, 2];</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>secondarr[0, 0] = 40;</em></p>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>The preceding code generates the following MSIL. Notice the function call.</span></span></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>IL_0029: ldc.i4.s<span>   </span>40</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>IL_002b: call instance void int32[0...,0...]::Set(int32,int32,int32)</em></p>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>The following code shows the MSIL generated for a jagged array. Note the MSIL <strong><span>stelem</span></strong> instruction which replaces the array element at a given index with the <strong><span>int32</span></strong> value on the evaluation stack.</span></span></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>int [][] intarr = new int[1][];</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>intarr[0] = new int[2];</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>intarr[0][0] = 10;</em></p>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>The preceding code generates the following MSIL. Note the use of the <strong><span>stelem</span></strong> instruction.</span></span></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>IL_001c:<span>  </span>ldc.i4.s<span>   </span>10</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>IL_001e:<span>  </span>stelem.i4</em></p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="line-height: 12pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Additional Considerations</span></span></span></span></h3>
<p style="margin-left: 0in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>When using arrays you should also consider the following:</span></span></span></p>
<ul style="margin-bottom: 0in;" type="disc">
<li class="MsoNormal"><span style="font-family: 'Segoe UI';"><strong><span><span>Sorting</span></span></strong><span><span>. If you retrieve data from a database, see if you can presort it by using an <strong><span>ORDER BY</span></strong> clause in your query. If you need to use the sorted results from the database for additional searching and sorting of the subset of results, you may require sorting the arrays. You should always measure to find out which approach works better for your scenario: sorting, using SQL queries, or sorting using arrays in the business layer.</span></span></span></li>
<li class="MsoNormal"><span><span style="font-family: 'Segoe UI';"><span>Avoid returning an <strong><span>Array</span></strong> from a property. Instead, consider using indexing properties.</span></span></span></li>
</ul>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>EmployeeList l = FillList();</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>for (int i = 0; i &lt; l.Length; i++) {</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>   </span>if (l.All[i] == x){&#8230;}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>}</em></p>
<p style="margin-left: 0.5in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>In the preceding code, each time the property <strong><span>All</span></strong> is used, you might be creating and returning an array. If the calling code uses the property in a loop as shown in the preceding code, an array is created on each iteration of the loop.</span></span></span></p>
<p style="margin-left: 0.5in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>In addition, if you return an array from a method, the resulting code is somewhat nonintuitive. A code example follows. In either case, document the details for your API.</span></span></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>// calling code:</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>if (l.GetAll()[i]== x) {&#8230;}</em></p>
<p style="margin-left: 0.5in; margin-right: 0in;"><span><span style="font-family: 'Segoe UI';"><span>If you must return an array from a piece of code, consider returning a copy to prevent synchronization issues between clients.</span></span></span></p>
<ul style="margin-bottom: 0in;" type="disc">
<li class="MsoNormal"><span><span style="font-family: 'Segoe UI';"><span>In the following code example, each call to the <strong><span>myObj</span></strong> property creates a copy of the array. As a result, a copy of the array will be created each time the code DoSomething(obj.myObj[i]) is executed.</span></span></span></li>
</ul>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>for (int i = 0; i &lt; obj.myObj.Count; i++)</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>      </span>DoSomething(obj.myObj[i]);</em></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">In our next article, we’ll look at the optimizing working with Collections.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays&amp;notes=In%20our%20previous%20article%20in%20the%20.NET%20series%20we%20discussed%20the%20how%20to%20optimize%20String%20operations%20in%20.NET.%20In%20this%20article%20we%E2%80%99ll%20focus%20on%20optimizing%20arrays.%0D%0AArrays%20provide%20basic%20functionality%20for%20grouping%20types.%20Every%20language%20implements%20array%20syntax%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays&amp;bodytext=In%20our%20previous%20article%20in%20the%20.NET%20series%20we%20discussed%20the%20how%20to%20optimize%20String%20operations%20in%20.NET.%20In%20this%20article%20we%E2%80%99ll%20focus%20on%20optimizing%20arrays.%0D%0AArrays%20provide%20basic%20functionality%20for%20grouping%20types.%20Every%20language%20implements%20array%20syntax%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;t=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=In%20our%20previous%20article%20in%20the%20.NET%20series%20we%20discussed%20the%20how%20to%20optimize%20String%20operations%20in%20.NET.%20In%20this%20article%20we%E2%80%99ll%20focus%20on%20optimizing%20arrays.%0D%0AArrays%20provide%20basic%20functionality%20for%20grouping%20types.%20Every%20language%20implements%20array%20syntax%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;Title=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays&amp;annotation=In%20our%20previous%20article%20in%20the%20.NET%20series%20we%20discussed%20the%20how%20to%20optimize%20String%20operations%20in%20.NET.%20In%20this%20article%20we%E2%80%99ll%20focus%20on%20optimizing%20arrays.%0D%0AArrays%20provide%20basic%20functionality%20for%20grouping%20types.%20Every%20language%20implements%20array%20syntax%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Improving%20.NET%20Application%20Performance%20Part%2013%3A%20Arrays%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F15%2Fimproving-net-application-performance-part-13-arrays%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/15/improving-net-application-performance-part-13-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring JBoss with Monitis – Part 3</title>
		<link>http://blog.monitis.com/index.php/2012/05/11/monitoring-jboss-with-monitis-part-3/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/11/monitoring-jboss-with-monitis-part-3/#comments</comments>
		<pubDate>Fri, 11 May 2012 14:16:21 +0000</pubDate>
		<dc:creator>Drago Z Kamenov</dc:creator>
				<category><![CDATA[Java Monitoring]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[AJP connector]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[JMX]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6711</guid>
		<description><![CDATA[In the last post of the series, we saw how to use the Monitis JMX agent to collect JDBC connection pool metrics from JBoss. While the connection pool performance is often the most important thing to monitor, there are a multitude of other metrics available in JBoss that are worth exploring. AJP vs HTTP Connectors [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/04/Monitis-Logo-Small-1.png"><img class="alignright size-full wp-image-6507" title="Monitis-Logo-Small-1" src="http://blog.monitis.com/wp-content/uploads/2012/04/Monitis-Logo-Small-1.png" alt="" width="200" height="81" /></a>In the <a href="http://blog.monitis.com/index.php/2012/04/04/monitoring-jboss-with-monitis-part-2-2/" target="_blank">last post</a> of the series, we saw how to use the Monitis JMX agent to collect JDBC connection pool metrics from JBoss. While the connection pool performance is often the most important thing to monitor, there are a multitude of other metrics available in JBoss that are worth exploring.</p>
<h2>AJP vs HTTP Connectors</h2>
<p>As you probably know, JBoss contains a built-in HTTP request processor to enable it to serve HTTP requests. In production environments however, the application server usually does not handle HTTP requests directly. This task falls on a dedicated web server &#8211; most often Apache. This division of labor allows Apache to serve static content (think large image files) and do the heavy-lifting for HTTPS, while letting your app server concentrate on what it does best &#8211; generating dynamic content and business logic processing. Apache and JBoss communicate via the AJP protocol &#8211; which involves a separate listener in JBoss (actually in JBoss Web &#8211; a version of Tomcat, which serves as a web container for JBoss). The AJP processor is very similar to the HTTP one &#8211; which is hardly surprising given how similar AJP and HTTP are.<span id="more-6711"></span></p>
<h2>Monitoring an AJP Connector with Monitis</h2>
<p>As with other JMX-related metrics, it is very easy to set up a JMX monitor for AJP Connectors.</p>
<p><strong>Step 1</strong>. Make sure the Monitis HTTP connector is deployed as described as described <a href="http://blog.monitor.us/2012/03/jboss-application-server-monitoring-with-monitis/">here</a></p>
<p><strong>Step 2</strong>. Navigate to the JMX Monitor URL and log on with your Monitis credentials</p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/03/Login1.png"><img class="alignnone size-full wp-image-6332" src="http://blog.monitis.com/wp-content/uploads/2012/03/Login1.png" alt="" width="345" height="277" /></a></p>
<p><strong>Step 3</strong>. After entering an agent name, click on &#8220;Add Test&#8221; link from the navigation bar, enter the JMX parameters and click &#8220;Submit&#8221;. The agent will then connect to the JMX server. (By  default the JMX port in JBoss 6.x is 1090, the username and password are blank &#8211; I certainly hope you are not running with these defaults in production!)</p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_params.png"><img class="alignnone size-full wp-image-6713" src="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_params.png" alt="" width="649" height="455" /></a></p>
<p><strong>Step 4</strong>. Select &#8220;jboss.web&#8221; from the drop-down and navigate to the GlobalRequestProcessor class:</p>
<p><code>jboss.web:type=GlobalRequestProcessor,name=ajp-127.0.0.1-8009</code></p>
<p><strong>Step 5</strong>. Give the monitor a meaningful name, select appropriate interval (in minutes), select MBean attributes (all except <em>modellerType</em>) and click &#8220;Add Monitor&#8221;:</p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_create_monitor.png"><img class="alignnone size-full wp-image-6715" src="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_create_monitor.png" alt="" width="811" height="750" /></a></p>
<p>Your monitor should now be up an running. When you log on to your Monitis account, you should be able to find it and add it to your dashboard. After allowing some time for monitoring data to accumulate, you can graph the data:</p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_AJP_bytes_sent.png"><img class="alignnone size-full wp-image-6718" src="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_AJP_bytes_sent.png" alt="" width="535" height="506" /></a></p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_AJP_error_count.png"><img class="alignnone size-full wp-image-6719" src="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_AJP_error_count.png" alt="" width="532" height="507" /></a></p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_AJP_processing_time.png"><img class="alignnone size-full wp-image-6720" src="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_AJP_processing_time.png" alt="" width="532" height="501" /></a></p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_AJP_request_count.png"><img class="alignnone size-full wp-image-6721" src="http://blog.monitis.com/wp-content/uploads/2012/05/JMX_AJP_request_count.png" alt="" width="533" height="504" /></a></p>
<p>The same steps could be followed to set up a monitor for an HTTP Request processor &#8211; it exposes the same metrics as the AJP processor, the only difference being the naming of the MBean.</p>
<p>In another installment we will look at per-application metrics provided by SessionManager MBean. Until then, happy monitoring!</p>
<p>&nbsp;</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;title=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203&amp;notes=In%20the%20last%20post%20of%20the%20series%2C%20we%20saw%20how%20to%20use%20the%20Monitis%20JMX%20agent%20to%20collect%20JDBC%20connection%20pool%20metrics%20from%20JBoss.%20While%20the%20connection%20pool%20performance%20is%20often%20the%20most%20important%20thing%20to%20monitor%2C%20there%20are%20a%20multitude%20of%20other%20metrics%20ava" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;title=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203&amp;bodytext=In%20the%20last%20post%20of%20the%20series%2C%20we%20saw%20how%20to%20use%20the%20Monitis%20JMX%20agent%20to%20collect%20JDBC%20connection%20pool%20metrics%20from%20JBoss.%20While%20the%20connection%20pool%20performance%20is%20often%20the%20most%20important%20thing%20to%20monitor%2C%20there%20are%20a%20multitude%20of%20other%20metrics%20ava" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;t=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;title=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=In%20the%20last%20post%20of%20the%20series%2C%20we%20saw%20how%20to%20use%20the%20Monitis%20JMX%20agent%20to%20collect%20JDBC%20connection%20pool%20metrics%20from%20JBoss.%20While%20the%20connection%20pool%20performance%20is%20often%20the%20most%20important%20thing%20to%20monitor%2C%20there%20are%20a%20multitude%20of%20other%20metrics%20ava" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;Title=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;title=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;title=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203&amp;annotation=In%20the%20last%20post%20of%20the%20series%2C%20we%20saw%20how%20to%20use%20the%20Monitis%20JMX%20agent%20to%20collect%20JDBC%20connection%20pool%20metrics%20from%20JBoss.%20While%20the%20connection%20pool%20performance%20is%20often%20the%20most%20important%20thing%20to%20monitor%2C%20there%20are%20a%20multitude%20of%20other%20metrics%20ava" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;title=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F&amp;title=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Monitoring%20JBoss%20with%20Monitis%20%E2%80%93%20Part%203%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F11%2Fmonitoring-jboss-with-monitis-part-3%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/11/monitoring-jboss-with-monitis-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Node.Js server monitoring, part 2</title>
		<link>http://blog.monitis.com/index.php/2012/05/10/node-js-server-monitoring-part-2/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/10/node-js-server-monitoring-part-2/#comments</comments>
		<pubDate>Thu, 10 May 2012 14:03:46 +0000</pubDate>
		<dc:creator>Seb Kiureghian</dc:creator>
				<category><![CDATA[101 Reasons To Choose Monitis]]></category>
		<category><![CDATA[Application Performance Management]]></category>
		<category><![CDATA[how to monitor node.js]]></category>
		<category><![CDATA[Monitoring Node]]></category>
		<category><![CDATA[monitoring node.js]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[node.js performance]]></category>
		<category><![CDATA[node.js tuning]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5822</guid>
		<description><![CDATA[Last time we mentioned two fundamental principles while monitoring any object: 1. The monitor should collect as much important information as possible that will allow to accurately evaluate the health state of an object. 2. The monitor should have little to no effect on the activity of the object. Sure, these two principles work against [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2011/07/nodejs.png"><img class="alignright  wp-image-2620" title="nodejs" src="http://blog.monitis.com/wp-content/uploads/2011/07/nodejs.png" alt="node-js-monitor" width="220" height="60" /></a><a href="http://blog.monitis.com/index.php/2012/02/28/node-js-server-monitoring-with-monitis-part-1/" target="_blank">Last time</a> we mentioned two fundamental principles while monitoring any object:</p>
<p>1. The monitor should collect as much important information as possible that will allow to accurately evaluate the health state of an object.<br />
2. The monitor should have little to no effect on the activity of the object.</p>
<p>Sure, these two principles work against each other in most of cases, but with Node.js they work together quite nicely because Node.js is based on event-driven technology and doesn&#8217;t use the traditional threads-driven approach. This technology allows to register many listeners for one event and process them in parallel almost independently. To avoid even a small effect on the production server, it was decided to separate the monitor into two parts &#8211; the first is the javascript module-plugin that listens to all server events and accumulates necessary information and the second is the Linux shell script that periodically runs the monitor-plugin by using the REST technique for collecting, processing, and sending information to the <a href="http://monitis.com">Monitis</a> main server.<span id="more-5822"></span><br />
<a href="http://blog.monitis.com/wp-content/uploads/2012/02/pic1.png"><img class="aligncenter size-full wp-image-5824" title="pic1" src="http://blog.monitis.com/wp-content/uploads/2012/02/pic1.png" alt="" width="744" height="432" /></a></p>
<p>Normally, it is necessary to add couple lines in your existing Node.js server code to activate the monitor-plugin:<br />
<code><br />
var monitor = require('monitor');// insert monitor module-plugin<br />
....</code></p>
<p>var server = … // the definition of current Node.js server</p>
<p>&#8230;.</p>
<p>monitor.Monitor(server); //add server to monitor</p>
<p>Now the monitor will begin collecting and measuring data. The monitor-plugin has an embedded simple HTTP server that sends accumulated data by request and should correspond (in current implementation) to the following pattern</p>
<p><em>http://127.0.0.1:10010/node_monitor?action=getdata&amp;access_code=<br />
</em><br />
where<br />
10010 &#8211; the listen port of monitor-plugin (configurable)<br />
&#8216;node_monitor&#8217; &#8211; the pathname keyword<br />
&#8216;action=getdata&#8217; &#8211; command for getting collected data<br />
&#8216;access_code&#8217; &#8211; the specially generated access code that changes for every session</p>
<p>Please notice that monitis-plugin server (in current implementation) listens the localhost only. This and usage of the security access code for every session gives enough security while monitoring. More detailed information can be found along with implemented code in the github repository.</p>
<p>Server monitoring metrics</p>
<p>There are a largely standard set of metrics which can be used to monitor the underlying health of any server.</p>
<p>* CPU Usage describes the level of utilisation of the system CPU(s) and is usually broken down into three states.<br />
o IO Wait &#8211; indicates the proportion of CPU cycles spent waiting for IO (disk or network) events. If you experience large IO Wait proportions, it can indicate that your disks are causing a performance bottleneck.<br />
o System &#8211; indicates the proportion of CPU cycles spent performing kernel-level processing. Generally you will find only a small proportion of your CPU cycles are spent on system tasks, Hence if you see spikes it could indicate a problem.<br />
o User &#8211; indicates the proportion of CPU cycles spent performing user instigated processing. This is where you should see the bulk of your CPU cycles consumed; it includes activities such as web serving, application execution, and every other process not owned by the kernel.<br />
o Idle &#8211; indicates the spare CPU capacity you have &#8211; all the cycles where the CPU is, quite literally, doing nothing.<br />
* Load Average is a metric that indicates the level of load that a server is under at a given point in time. Usually evaluated as number of requests per second.<br />
* RAM usage by server is broken down usually into the following parts.<br />
o Free &#8211; the amount of unallocated RAM available. Linux systems tend to keep this as low as possible; and do not free up the system&#8217;s physical RAM until it is requested by another process.<br />
o Inactive &#8211; RAM that is in-use for buffers and page caching, but hasn&#8217;t been used recently so will be reclaimed first for use by a running process.<br />
o Active &#8211; RAM that has been used recently and will not be reclaimed unless we have insufficient Inactive RAM to claim from. In Linux systems this is generally the one to keep an eye on. Sudden, rapid increases signal a memory hungry process that will soon cause VM swapping to occur.<br />
* The server uptime is a metric showing the elapsed time since the last reboot. Non-linear behavior of the server uptime line indicates that the server was rebooted somehow.<br />
* Throughput &#8211; the amount of data traffic passing through the servers&#8217; network interface is fundamentally important. It is usually broken down into inbound and outbound throughput and normally measured as average values for some period by kbit or kbyte per sec.<br />
* Server Response time is defined as the duration from receiving a request to sending a response. Normally, it should not exceed reasonable timeout (usually this depends on the complexity of processing) but should be as little as possible. Usually, the average and peak response time is evaluated for some time period.<br />
* The count of successfully processed requests is evaluated as the percentage of responses with 2xx status codes (success) to requests during observing time. This value should be as close as possible to 100%.</p>
<p>We have used part of these metrics and added some specific statistics that are important for our task (e.g. client platform, detailed info for response codes, etc.)</p>
<p>Test results</p>
<p>The results below were obtained on a Node.js server equipped with the monitor described above on a Debian6-x64. The server listens on HTTP (81) and HTTPS (443) ports and does not have a large load.</p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/02/table.png"><img class="aligncenter size-full wp-image-5828" title="table" src="http://blog.monitis.com/wp-content/uploads/2012/02/table.png" alt="" width="1033" height="482" /></a><br />
By double-clicking on a line you can view a specific part of the monitoring data.<br />
<a href="http://blog.monitis.com/wp-content/uploads/2012/02/ver.png"><img class="aligncenter size-full wp-image-5830" title="ver" src="http://blog.monitis.com/wp-content/uploads/2012/02/ver.png" alt="" width="377" height="153" /></a></p>
<p>The data can be shown in graphical view too.</p>
<p><a href="http://blog.monitis.com/wp-content/uploads/2012/02/graph1.png"><img class="aligncenter size-full wp-image-5831" title="graph1" src="http://blog.monitis.com/wp-content/uploads/2012/02/graph1.png" alt="" width="1033" height="620" /></a><br />
<a href="http://blog.monitis.com/wp-content/uploads/2012/02/graph2.png"><img class="aligncenter size-full wp-image-5832" title="graph2" src="http://blog.monitis.com/wp-content/uploads/2012/02/graph2.png" alt="" width="1035" height="622" /></a><br />
In conclusion, the monitoring system has successfully tracked the metrics and found the Node.Js server to be in a good health state.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;title=Node.Js%20server%20monitoring%2C%20part%202&amp;notes=Last%20time%20we%20mentioned%20two%20fundamental%20principles%20while%20monitoring%20any%20object%3A%0D%0A%0D%0A1.%20The%20monitor%20should%20collect%20as%20much%20important%20information%20as%20possible%20that%20will%20allow%20to%20accurately%20evaluate%20the%20health%20state%20of%20an%20object.%0D%0A2.%20The%20monitor%20should%20hav" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;title=Node.Js%20server%20monitoring%2C%20part%202&amp;bodytext=Last%20time%20we%20mentioned%20two%20fundamental%20principles%20while%20monitoring%20any%20object%3A%0D%0A%0D%0A1.%20The%20monitor%20should%20collect%20as%20much%20important%20information%20as%20possible%20that%20will%20allow%20to%20accurately%20evaluate%20the%20health%20state%20of%20an%20object.%0D%0A2.%20The%20monitor%20should%20hav" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;t=Node.Js%20server%20monitoring%2C%20part%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;title=Node.Js%20server%20monitoring%2C%20part%202&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=Last%20time%20we%20mentioned%20two%20fundamental%20principles%20while%20monitoring%20any%20object%3A%0D%0A%0D%0A1.%20The%20monitor%20should%20collect%20as%20much%20important%20information%20as%20possible%20that%20will%20allow%20to%20accurately%20evaluate%20the%20health%20state%20of%20an%20object.%0D%0A2.%20The%20monitor%20should%20hav" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;Title=Node.Js%20server%20monitoring%2C%20part%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;title=Node.Js%20server%20monitoring%2C%20part%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;title=Node.Js%20server%20monitoring%2C%20part%202&amp;annotation=Last%20time%20we%20mentioned%20two%20fundamental%20principles%20while%20monitoring%20any%20object%3A%0D%0A%0D%0A1.%20The%20monitor%20should%20collect%20as%20much%20important%20information%20as%20possible%20that%20will%20allow%20to%20accurately%20evaluate%20the%20health%20state%20of%20an%20object.%0D%0A2.%20The%20monitor%20should%20hav" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;title=Node.Js%20server%20monitoring%2C%20part%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F&amp;title=Node.Js%20server%20monitoring%2C%20part%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Node.Js%20server%20monitoring%2C%20part%202%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F10%2Fnode-js-server-monitoring-part-2%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/10/node-js-server-monitoring-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to SQL Server 2012</title>
		<link>http://blog.monitis.com/index.php/2012/05/08/introduction-to-sql-server-2012/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/08/introduction-to-sql-server-2012/#comments</comments>
		<pubDate>Tue, 08 May 2012 14:27:00 +0000</pubDate>
		<dc:creator>Irina Tihova</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Database Management]]></category>
		<category><![CDATA[Database Monitoring]]></category>
		<category><![CDATA[MS SQL Server Monitoring]]></category>
		<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[microsoft sql server]]></category>
		<category><![CDATA[ms sql]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[SQL 2012]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6654</guid>
		<description><![CDATA[In our previous article, SQL Server 2008 Overview, we looked over the different features that the Microsoft SQL Server provides. In this article we will focus on the new and advanced features of the latest SQL Server release – SQL Server 2012. They include, but are not limited to, the new High Availability solution AlwaysOn, improved [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/sql-2012.jpg"><img class="alignright  wp-image-6655" src="http://blog.monitis.com/wp-content/uploads/2012/05/sql-2012.jpg" alt="" width="244" height="167" /></a></p>
<p>In our previous article,<a href="http://blog.monitis.com/index.php/2012/04/24/ms-sql-server-2008-overview/" target="_blank"> SQL Server 2008 Overview</a>, we looked over the different features that the Microsoft SQL Server provides. In this article we will focus on the new and advanced features of the latest SQL Server release – SQL Server 2012. They include, but are not limited to, the new High Availability solution AlwaysOn, improved security, and the capability of syncing with the cloud.</p>
<p>AlwaysOn consists of two main components – AlwaysOn Availability Groups and AlwaysOn Failover Cluster Instances. Let’s first focus on the Availability Groups. An availability group is a combination of databases that are hosted on a primary server and up to four secondary servers. Each availability group member is capable of replying to clients’ requests in the event that the primary group member is unavailable. All the databases in an availability group fail over to another group member together. This functionality is built on top of the Windows Server Failover Clustering feature and requires its installation.<span id="more-6654"></span></p>
<p>The high availability of the SQL server can be further enhanced by using Failover Cluster Instances (FCI). However, this approach requires shared storage. Shared storage is not required for the AlwaysOn Availability Groups. The servers in an availability group are required to have shared storage only if they are also acting as FCI. Be aware that AlwaysOn Availability groups automatically failover to a different replica when a problem with primary one is detected. This automatic failover is not supported in FCI, so you will have to set the availability group members acting as FCI to manual failover.</p>
<p>Another service Microsoft offers for high availability of your SQL databases is SQL Azure Data Sync. It allows you to easily sync your on-premise SQL Server 2012 with your SQL Azure’s data. That’s why SQL Server 2012 is considered a cloud-ready application. Furthermore, it gives you the ability to specify exactly which columns you want to be synchronized. It is a full implementation of a service and there is no need for you to write extra code for this synchronization to occur. You can use it within your Disaster Recovery plan so that you will have a complete copy of your on-premise database on a different physical location.</p>
<p>Let’s now focus on the new features that SQL Server 2012 brings to the main SQL features:</p>
<p>1)      Analysis Services</p>
<p>SQL Server 2012 offers a unified model for all the needs your organization may have. This is the BI Semantic Model. It has the benefits of the tabular and the multidimensional models and it includes: PowerPivot for Excel to meet end users’ needs; PowerPivot for SharePoint to meet teams’ needs; and Analysis Services to meet corporate’s needs. It offers you the choice between cached and passthrough storage mode and security on both row and cell level.</p>
<p>2)      Reporting Services</p>
<p>In SQL Server 2012 the Reporting Services are now a SharePoint’s shared service taking advantage of all the native SharePoint service’s capabilities. Another big improvement is the enhanced end user alerting functionality. In SQL Server 2012 users can be notified when data in a report of their interest change.  This is done through a new user-friendly interface. It’s worth mentioning that the Reporting Services in SQL Server 2012 now support the 2007 and 2010 versions of Word and Excel.</p>
<p>3)      Integration Services</p>
<p>One of the new characteristics of Integration Services is the new Project model for deployment. The traditional Package model is still supported. However, with the Project model you can take advantage of some advanced features, such as:  eased centralized management of parameters and connection managers; and enhanced security, since the projects can be automatically encrypted and access to them easily controlled. Amongst the enhancements in SQL Server 2012 Integration Services is also the support of Visual Studio for Applications 3.0 and .NET 4.0.</p>
<p>You can use all of these new features with SQL Server 2012. The editions basically remain the same as with SQL Server 2008 with the addition of SQL Server 2012 Business Intelligence. This is a customized version of SQL Server that provides a platform for building and deploying business intelligence solutions in the most secure and scalable way. All the supported features that an SQL Server 2012 edition offers can be found and compared here: <a href="http://technet.microsoft.com/library/cc645993(SQL.110).aspx" target="_blank">http://technet.microsoft.com/library/cc645993(SQL.110).aspx</a></p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;title=Introduction%20to%20SQL%20Server%202012%20&amp;notes=%0D%0A%0D%0AIn%20our%20previous%20article%2C%C2%A0SQL%20Server%202008%20Overview%2C%20we%20looked%20over%20the%20different%20features%20that%20the%20Microsoft%20SQL%20Server%20provides.%20In%20this%20article%20we%20will%20focus%20on%20the%20new%20and%20advanced%20features%20of%20the%20latest%20SQL%20Server%20release%20%E2%80%93%20SQL%20Server%202012." ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;title=Introduction%20to%20SQL%20Server%202012%20&amp;bodytext=%0D%0A%0D%0AIn%20our%20previous%20article%2C%C2%A0SQL%20Server%202008%20Overview%2C%20we%20looked%20over%20the%20different%20features%20that%20the%20Microsoft%20SQL%20Server%20provides.%20In%20this%20article%20we%20will%20focus%20on%20the%20new%20and%20advanced%20features%20of%20the%20latest%20SQL%20Server%20release%20%E2%80%93%20SQL%20Server%202012." ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;t=Introduction%20to%20SQL%20Server%202012%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;title=Introduction%20to%20SQL%20Server%202012%20&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0A%0D%0AIn%20our%20previous%20article%2C%C2%A0SQL%20Server%202008%20Overview%2C%20we%20looked%20over%20the%20different%20features%20that%20the%20Microsoft%20SQL%20Server%20provides.%20In%20this%20article%20we%20will%20focus%20on%20the%20new%20and%20advanced%20features%20of%20the%20latest%20SQL%20Server%20release%20%E2%80%93%20SQL%20Server%202012." ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;Title=Introduction%20to%20SQL%20Server%202012%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;title=Introduction%20to%20SQL%20Server%202012%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;title=Introduction%20to%20SQL%20Server%202012%20&amp;annotation=%0D%0A%0D%0AIn%20our%20previous%20article%2C%C2%A0SQL%20Server%202008%20Overview%2C%20we%20looked%20over%20the%20different%20features%20that%20the%20Microsoft%20SQL%20Server%20provides.%20In%20this%20article%20we%20will%20focus%20on%20the%20new%20and%20advanced%20features%20of%20the%20latest%20SQL%20Server%20release%20%E2%80%93%20SQL%20Server%202012." ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;title=Introduction%20to%20SQL%20Server%202012%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F&amp;title=Introduction%20to%20SQL%20Server%202012%20" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Introduction%20to%20SQL%20Server%202012%20%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F08%2Fintroduction-to-sql-server-2012%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/08/introduction-to-sql-server-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Windows Server 2012 cloud ready?</title>
		<link>http://blog.monitis.com/index.php/2012/05/07/is-windows-server-2012-cloud-ready/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/07/is-windows-server-2012-cloud-ready/#comments</comments>
		<pubDate>Mon, 07 May 2012 14:28:40 +0000</pubDate>
		<dc:creator>Irina Tihova</dc:creator>
				<category><![CDATA[Windows Servers Monitoring]]></category>
		<category><![CDATA[hyper-v]]></category>
		<category><![CDATA[Live Migration]]></category>
		<category><![CDATA[Network Virtualization]]></category>
		<category><![CDATA[QoS]]></category>
		<category><![CDATA[Server 2012]]></category>
		<category><![CDATA[Server 8]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6668</guid>
		<description><![CDATA[To answer this question we need to take a closer look at the requirements for a server system to be considered cloud ready and then investigate the different features of Windows Server 2012 that does or does not meet these requirements. Windows Server 2012 is the official name of Windows Server code name “8” and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/05/Windows-Server.jpg"><img class="alignright  wp-image-6670" src="http://blog.monitis.com/wp-content/uploads/2012/05/Windows-Server.jpg" alt="" width="227" height="150" /></a></p>
<p>To answer this question we need to take a closer look at the requirements for a server system to be considered cloud ready and then investigate the different features of Windows Server 2012 that does or does not meet these requirements. Windows Server 2012 is the official name of Windows Server code name “8” and is now on its Beta stage of development.</p>
<p>The first thing to consider here is the ability of the operating system to virtualize its resources, meaning to make them available as part of a shared pool and managed by an administrator. The main features Windows Server 2012 has here are:</p>
<p>-         <strong> Hyper-V extensible switch</strong> – the Hyper-V switch from Windows Server 2008 is now enhanced to support extensions. It is a platform for you to extend the functionality of a virtual switch to whatever your organization needs.<span id="more-6668"></span></p>
<p>-          <strong>Network Virtualization</strong> – allows you to continue using you IP address scheme in the cloud infrastructure. All your virtual machines will have two IP addresses – one that you’re used to, and one new, that will be unique from the cloud perspective. All your services that depend on the IP address scheme will continue to work in the cloud.</p>
<p>-          <strong>Quality of Service (QoS)</strong> – gives you the opportunity to manage your network environment, identify problems, and prioritize traffic. You can use it to give priority to network-intensive applications such as voice traffic and to management messages indicating network connectivity problems.</p>
<p>-          <strong>Enhanced Live Storage Migration</strong> – allows you to move the files of a virtual machine while it’s still running. If a physical volume hosting VMs is running out of space, you don’t have to worry about moving one of all of the VMs to another location. Windows Server 2012 will do this job transparently without even turning the machines off.</p>
<p>Self-service is another thing you have to consider if you intend to provide or consume public cloud services. This functionality gives the clients the ability to change only the settings that are relevant to what they’ve paid for. It usually happens via custom Web page serving as a portal. Windows Server 2012 gives you the necessary foundation for this to happen by PowerShell and WMI.  Furthermore, Windows Server 2012 gives you the ability to monitor or to allow the customer to monitor the resources they’re using.</p>
<p>The next thing in our list would be elasticity. What it covers is the ability of the infrastructure to support the ever changing needs of the company using cloud services. If you host an application in the cloud, you would normally want more resources in peak user activity periods and less for the rest of the time. Furthermore, you may want to move your application from one geo-location to another. Windows Server 2012 has integrated support of IKEv2 VPN that can be used for hybrid cloud environments with interconnected public and private cloud infrastructures. IKEv2 VPN is an IPSec secured VPN connection allowing mobility of the connected users between different wireless access points or when moving from wireless to wired connection. The Network Virtualization functionality discussed earlier also helps Windows Server 2012 meet the elasticity requirements of today’s cloud infrastructures.</p>
<p>With all the Windows Server 2012 features mentioned we can definitely consider Windows Server 2012 a cloud ready operating system.</p>
<p>Keep eye on this block for further articles discussing Windows Server 2012’s advanced features!</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;title=Is%20Windows%20Server%202012%20cloud%20ready%3F&amp;notes=%0D%0A%0D%0ATo%20answer%20this%20question%20we%20need%20to%20take%20a%20closer%20look%20at%20the%20requirements%20for%20a%20server%20system%20to%20be%20considered%20cloud%20ready%20and%20then%20investigate%20the%20different%20features%20of%20Windows%20Server%202012%20that%20does%20or%20does%20not%20meet%20these%20requirements.%20Windows%20S" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;title=Is%20Windows%20Server%202012%20cloud%20ready%3F&amp;bodytext=%0D%0A%0D%0ATo%20answer%20this%20question%20we%20need%20to%20take%20a%20closer%20look%20at%20the%20requirements%20for%20a%20server%20system%20to%20be%20considered%20cloud%20ready%20and%20then%20investigate%20the%20different%20features%20of%20Windows%20Server%202012%20that%20does%20or%20does%20not%20meet%20these%20requirements.%20Windows%20S" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;t=Is%20Windows%20Server%202012%20cloud%20ready%3F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;title=Is%20Windows%20Server%202012%20cloud%20ready%3F&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0A%0D%0ATo%20answer%20this%20question%20we%20need%20to%20take%20a%20closer%20look%20at%20the%20requirements%20for%20a%20server%20system%20to%20be%20considered%20cloud%20ready%20and%20then%20investigate%20the%20different%20features%20of%20Windows%20Server%202012%20that%20does%20or%20does%20not%20meet%20these%20requirements.%20Windows%20S" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;Title=Is%20Windows%20Server%202012%20cloud%20ready%3F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;title=Is%20Windows%20Server%202012%20cloud%20ready%3F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;title=Is%20Windows%20Server%202012%20cloud%20ready%3F&amp;annotation=%0D%0A%0D%0ATo%20answer%20this%20question%20we%20need%20to%20take%20a%20closer%20look%20at%20the%20requirements%20for%20a%20server%20system%20to%20be%20considered%20cloud%20ready%20and%20then%20investigate%20the%20different%20features%20of%20Windows%20Server%202012%20that%20does%20or%20does%20not%20meet%20these%20requirements.%20Windows%20S" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;title=Is%20Windows%20Server%202012%20cloud%20ready%3F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F&amp;title=Is%20Windows%20Server%202012%20cloud%20ready%3F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Is%20Windows%20Server%202012%20cloud%20ready%3F%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F07%2Fis-windows-server-2012-cloud-ready%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/07/is-windows-server-2012-cloud-ready/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improving .NET Application Performance Part 12: String Operations</title>
		<link>http://blog.monitis.com/index.php/2012/05/04/improving-net-application-performance-part-12-string-operations/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/04/improving-net-application-performance-part-12-string-operations/#comments</comments>
		<pubDate>Fri, 04 May 2012 10:02:53 +0000</pubDate>
		<dc:creator>Ard-Jan Barnas</dc:creator>
				<category><![CDATA[Application Performance Management]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[.NET performance]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[dotnet performance]]></category>
		<category><![CDATA[string operations]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6576</guid>
		<description><![CDATA[In our previous article in this series we discussed Iteration and Looping. In this article we’ll focus on optimizing string operations. The .NET Framework provides the System.String data type to represent a string. Intensive string manipulation can degrade performance. Every time you perform an operation to change string data, the original string in memory is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/04/NET_v_rgb_2.png"><img class="alignright size-full wp-image-6369" title="NET_v_rgb_2" src="http://blog.monitis.com/wp-content/uploads/2012/04/NET_v_rgb_2.png" alt="" width="160" height="152" /></a>In our previous article in this series we discussed Iteration and Looping. In this article we’ll focus on optimizing string operations.</p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">The .NET Framework provides the <span>System.String</span> data type to represent a string. Intensive string manipulation can degrade performance. Every time you perform an operation to change string data, the original string in memory is discarded for later garbage collection and a new one is created to hold the new string data. Also note that the <span>String</span> type is a reference type, so the contents of the string are stored on the managed heap. As a result, strings must be garbage collected to be cleaned up.<span id="more-6576"></span></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">This section summarizes recommendations you should consider when working with strings.</p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Avoid Inefficient String Concatenation</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">Excessive string concatenation results in many allocation and deallocation operations, because each time you perform an operation to change the string, a new one is created and the old one is subsequently collected by the garbage collector.</p>
<p class="MsoListParagraph" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 10pt 0.75in;"><span><span><span style="font-family: Symbol;">·</span><span style="line-height: normal;"><span style="font-family: Times New Roman;"><span>         </span></span></span></span></span>If you concatenate string literals, the compiler concatenates them at compile time.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>//&#8217;Hello&#8217; and &#8216;world&#8217; are string literals</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>String str = &#8220;Hello&#8221; + &#8220;world&#8221;;</em></p>
<p class="MsoListParagraphCxSpFirst" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.75in;"><span><span><span style="font-family: Symbol;">·</span><span style="line-height: normal;"><span style="font-family: Times New Roman;"><span>         </span></span></span></span></span>If you concatenate nonliteral strings, CLR concatenates them at run time. So using the <strong>+ </strong>operator creates multiple strings objects in the managed heap.</p>
<p class="MsoListParagraphCxSpLast" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 10pt 0.75in;"><span><span><span style="font-family: Symbol;">·</span><span style="line-height: normal;"><span style="font-family: Times New Roman;"><span>         </span></span></span></span></span>Use <span>StringBuilder</span> for complex string manipulations and when you need to concatenate strings multiple times.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>// using String and &#8216;+&#8217; to append</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>String str = &#8220;Some Text&#8221;;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>for ( &#8230; loop several times to build the string &#8230;) {</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em><span>  </span>str = str + &#8221; additional text &#8220;;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>// using String and .Append method to append</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>StringBuilder strBuilder = new StringBuilder(&#8220;Some Text &#8220;);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>for ( &#8230; loop several times to build the string &#8230;) {</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em><span>  </span>strBuilder.Append(&#8221; additional text &#8220;);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.75in;"><em>}</em></p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Use + When the Number of Appends Is Known</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">If you know the number of appends to be made and you are concatenating the strings in one shot, prefer the <strong>+</strong> operator for concatenation.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>String str = str1+str2+str3;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em> </em></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">If you concatenate the strings in a single expression, only one call to <span>String.Concat</span> needs to be made. It results in no temporary strings (for partial combinations of the strings to be concatenated).</p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"><span>Avoid </span>should not be using <span>+</span> on strings inside a loop or for multiple iterations. Use <span>StringBuilder</span> instead.</p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Use StringBuilder When the Number of Appends Is Unknown</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">If you do not know the number of appends to be made, which might be the case when iterating through a loop or building dynamic SQL queries, use the <span>StringBuilder</span> class as shown in the following code sample.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>for (int i=0; i&lt; Results.Count; i++)</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>{</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>StringBuilder.Append (Results[i]);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>} </em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em> </em></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">The <span>StringBuilder</span> class starts with a default initial capacity of 16. Strings less than the initial capacity are stored in the <span>StringBuilder</span> object. The initial capacity of the buffer can be set by using the following overloaded constructor.</p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"><em>public StringBuilder (int capacity);</em></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">You can continue to concatenate without additional allocations until you consume the preallocated buffer. As a result, using a <span>StringBuilder</span> object is often more efficient than using String objects for concatenation. If you concatenate further, the <span>StringBuilder</span> class creates a new buffer of the size equal to double the current capacity.</p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">So if you start with a <span>StringBuilder</span> of size 16 and exceed the limit, the <span>StringBuilder</span> allocates a new buffer of size 32 and copies the old string to the new buffer. The old buffer is inaccessible and becomes eligible for garbage collection.</p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">You should try to set the initial capacity of the <span>StringBuilder</span> to an optimum value to reduce the cost of new allocations. To determine the optimum value for your case, the best way is to track the memory consumption by using the CLR profiler. For more information about how to use CLR profiler, see &#8220;How To: Use CLR Profiler&#8221; in the &#8220;How To&#8221; section of this guide.</p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Treat StringBuilder as an Accumulator</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">You can treat <span>StringBuilder</span> as an accumulator or reusable buffer. This helps avoid the allocations of temporary strings during multiple append iterations. Some of the scenarios where this helps are as follows:</p>
<ul style="margin-top: 0in; margin-bottom: 0in;" type="disc">
<li class="MsoNormal"><strong>Concatenating strings</strong>. You should always prefer the following approach to string concatenation when using <span>StringBuilder</span>.</li>
</ul>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em>StringBuilder sb;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em>sb.Append(str1);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em>sb.Append(str2);</em></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt 0.25in;">Use the preceding code rather than the following.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em>sb.Append(str1+str2);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em> </em></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt 0.25in;">This is because you do not need to make the temporary str1+str2 to append str1 and then str2.</p>
<p class="MsoListParagraph" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in;"><span><span><span style="font-family: Symbol;">·</span><span style="line-height: normal;"><span style="font-family: Times New Roman;"><span>         </span></span></span></span></span><strong>Concatenating the strings from various functions</strong>.</p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt 0.25in;">An example of this is shown in the following code sample.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em>StringBuilder sb;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em>sb.Append(f1());</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em>sb.Append(f2()); </em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.25in;"><em>sb.Append(f3());</em></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">The preceding code snippet results in temporary string allocations for the return values by the functions f1 (&#8230;), f2 (), f3 (). You can avoid these temporary allocations by using the following pattern.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>void f1( sb,);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>void f2( sb,);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>void f3( sb,);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;">In this case, the <span>StringBuilder</span> instance is directly passed as an input parameter to the methods. <span>sb.Append</span> is directly called in the function body, which avoids the allocation of temporary strings.</p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Use the Overloaded Compare Method for Case-Insensitive String Comparisons</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">Carefully consider how you perform case-insensitive string comparisons. Avoid using <strong>ToLower</strong> as shown in the following code because you end up creating temporary string objects.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>// Bad way for insensitive operations because ToLower creates temporary </em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>strings</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>String str=&#8221;New York&#8221;;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>String str2 = &#8220;New york&#8221;;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>if (str.ToLower()==str2.ToLower())</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>// do something</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>The more efficient way to perform case-insensitive string comparisons is to use the <strong>Compare</strong> method.</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>str.Compare(str,str2,false);</em></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"><strong> </strong></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">The <span>String.Compare</span> method uses the info in the <span>CultureInfo.CompareInfo</span> property to compare culture-sensitive strings.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations&amp;notes=In%20our%20previous%20article%20in%20this%20series%20we%20discussed%20Iteration%20and%20Looping.%20In%20this%20article%20we%E2%80%99ll%20focus%20on%20optimizing%20string%20operations.%0D%0AThe%20.NET%20Framework%20provides%20the%20System.String%20data%20type%20to%20represent%20a%20string.%20Intensive%20string%20manipulation%20ca" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations&amp;bodytext=In%20our%20previous%20article%20in%20this%20series%20we%20discussed%20Iteration%20and%20Looping.%20In%20this%20article%20we%E2%80%99ll%20focus%20on%20optimizing%20string%20operations.%0D%0AThe%20.NET%20Framework%20provides%20the%20System.String%20data%20type%20to%20represent%20a%20string.%20Intensive%20string%20manipulation%20ca" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;t=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=In%20our%20previous%20article%20in%20this%20series%20we%20discussed%20Iteration%20and%20Looping.%20In%20this%20article%20we%E2%80%99ll%20focus%20on%20optimizing%20string%20operations.%0D%0AThe%20.NET%20Framework%20provides%20the%20System.String%20data%20type%20to%20represent%20a%20string.%20Intensive%20string%20manipulation%20ca" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;Title=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations&amp;annotation=In%20our%20previous%20article%20in%20this%20series%20we%20discussed%20Iteration%20and%20Looping.%20In%20this%20article%20we%E2%80%99ll%20focus%20on%20optimizing%20string%20operations.%0D%0AThe%20.NET%20Framework%20provides%20the%20System.String%20data%20type%20to%20represent%20a%20string.%20Intensive%20string%20manipulation%20ca" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Improving%20.NET%20Application%20Performance%20Part%2012%3A%20String%20Operations%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F04%2Fimproving-net-application-performance-part-12-string-operations%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/04/improving-net-application-performance-part-12-string-operations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benefits of Monitoring Active Directory</title>
		<link>http://blog.monitis.com/index.php/2012/05/03/benefits-of-monitoring-active-directory/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/03/benefits-of-monitoring-active-directory/#comments</comments>
		<pubDate>Thu, 03 May 2012 15:52:58 +0000</pubDate>
		<dc:creator>Ard-Jan Barnas</dc:creator>
				<category><![CDATA[101 Reasons To Choose Monitis]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Monitoring Scripts]]></category>
		<category><![CDATA[Sysadmin Tools]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[Monitis]]></category>
		<category><![CDATA[Windows Monitoring]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6555</guid>
		<description><![CDATA[As a server administrator, you want to make sure you create the best possible experience for users. For users to reliably gain access to Active Directory, it must be managed and monitored to make sure it functions properly. Monitoring Active Directory is essential to ensure that directory data remains consistent and users have uninterrupted access [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/04/active_directory.jpg"><img class="alignright size-full wp-image-6498" title="active directory" src="http://blog.monitis.com/wp-content/uploads/2012/04/active_directory.jpg" alt="" width="250" height="112" /></a>As a server administrator, you want to make sure you create the best possible experience for users. For users to reliably gain access to Active Directory, it must be managed and monitored to make sure it functions properly.</p>
<p>Monitoring Active Directory is essential to ensure that directory data remains consistent and users have uninterrupted access to their account and domain resources they require access to.<span id="more-6555"></span></p>
<h3>Importance of Active Directory Monitoring</h3>
<p>Active Directory monitoring can check for specific indicators to make sure that problems are resolved when they first arise. Doing so can prevent possible service outages. IT can improve customer satisfaction because customers never experience the consequences of potential problems. The system will also be able to better cope with server outages when they do occur.</p>
<p>Monitoring will also help reveal problems that can lead to slower response times when the users access servers. For example, monitoring could reveal issues with user logon and resource access response times. Optimizing logon times and fast access to resources will contribute to a better overall user experience.</p>
<p>When monitoring Active Directory, administrators can experience better schedule flexibility that makes it easier for them to prioritize workloads. You want to monitor Active Directory to make sure that all of the necessary services are running on each domain controller and that replication is working throughout the domain and each domain controller holds the same data.</p>
<p>Monitoring is also being used to make sure the domain controllers don’t experience excessive CPU usage and that Lightweight Directory Access Protocol (LDAP) queries return a result quickly. Making sure LDAP is responsive speeds up the process of accessing and maintaining directory information services, which will increase productivity and – again &#8211; create a better overall user experience.</p>
<p>We’ll list a few of the most common issues below that can be prevented by monitoring your Active Directory and taking the appropriate action when an issue is detected.</p>
<h3>Replication Issues</h3>
<p>Replication issues can cause Active Directory data to be inconsistent across domain controllers. Proper monitoring will detect replication issues and can prevent problems associated with such issues like lingering AD objects or re-animated objects. Lingering objects emerge when the domain controller does not replicate until after the tombstone lifetime. This problem takes time to correct, since an extensive diagnosis will be required.</p>
<p>If the SYSVOL shared folder fails to replicate correctly, Group Policy objects and security policies are not correctly applied to domain clients.</p>
<h3>Account Issues</h3>
<p>Sometimes Active Directory can experience logon failures, account lockouts and account creation failures.</p>
<p><strong><span style="text-decoration: underline;">Logon failures</span></strong> can results from a trust relationship failure or the inability to perform proper name resolution. Sometimes, the failure results from a mismatch between the password and the computer account. The result is an end-user feeling frustrated not being able to access the domain and its resources.</p>
<p><strong><span style="text-decoration: underline;">Account lockouts</span></strong> happen if the PDC emulator is not available or several domain controllers experience a replication failure between each other. Active Directory normally locks out an account to prevent login attempts from overwhelming the server. As a result, account administrators spend their time troubleshooting the issue and are busy trying to help users regain access to their accounts. This wastes time and creates frustration for the user.</p>
<p><strong><span style="text-decoration: underline;">Account creation issues</span></strong> occur when there are not enough relative IDs and the RID master is unavailable. The relative ID is a variable length number that serves as a part of an object&#8217;s security identifier. The RID master is responsible for allocating security RIDs.</p>
<h3>Domain Controller Failure and Application Failure</h3>
<p>If the hard drive that holds Ntds.dit runs out of space, the domain controller will fail. Applications can fail when queries against Active Directory &#8211; that the application depends on – do not return a response or an incorrect result is returned because of a replication issue.</p>
<h3>How to Efficiently Monitor Microsoft Active Directory</h3>
<p>Small organizations will likely only need to occasionally check domain controllers. For large enterprises, monitoring solutions must gather large amounts of data and generate easily understandable reports that can help administrators make decisions. The need for a good monitoring solution becomes increasingly more important as the size of the Active Directory increases. There are several monitoring solutions available that can help you establish a good monitoring environment.</p>
<p>Monitis offers the advantage that its solution is cloud-based and therefor doesn’t require a dedicated in-house monitoring system. <strong>Windows Monitoring Scripts</strong> that interact with Monitis and integrate metric results in the Monitis Dashboard fulfill an important role in monitoring Active Directory. The Active Directory monitoring script creates a custom dashboard Monitor that can be easily adapted to include the metrics you require for your organization. The scripts can be downloaded from here: <a href="https://github.com/monitisexchange/Windows-Monitoring-Scripts">https://github.com/monitisexchange/Windows-Monitoring-Scripts</a>.</p>
<p>Using these scripts and actively start monitoring Active Directory will help you detect and prevent possible issues with user accounts, directory data and security policies that might lead to server or domain outages and resolve slow response times.</p>
<h3>References:</h3>
<p>http://technet.microsoft.com/en-us/library/cc961807.aspx</p>
<p>http://technet.microsoft.com/en-us/library/cc961984.aspx</p>
<p>http://www.windowsecurity.com/articles/implementing-troubleshooting-account-lockout.html</p>
<p>https://github.com/monitisexchange/Windows-Monitoring-Scripts</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;title=Benefits%20of%20Monitoring%20Active%20Directory&amp;notes=As%20a%20server%20administrator%2C%20you%20want%20to%20make%20sure%20you%20create%20the%20best%20possible%20experience%20for%20users.%20For%20users%20to%20reliably%20gain%20access%20to%20Active%20Directory%2C%20it%20must%20be%20managed%20and%20monitored%20to%20make%20sure%20it%20functions%20properly.%0D%0A%0D%0AMonitoring%20Active%20Direc" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;title=Benefits%20of%20Monitoring%20Active%20Directory&amp;bodytext=As%20a%20server%20administrator%2C%20you%20want%20to%20make%20sure%20you%20create%20the%20best%20possible%20experience%20for%20users.%20For%20users%20to%20reliably%20gain%20access%20to%20Active%20Directory%2C%20it%20must%20be%20managed%20and%20monitored%20to%20make%20sure%20it%20functions%20properly.%0D%0A%0D%0AMonitoring%20Active%20Direc" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;t=Benefits%20of%20Monitoring%20Active%20Directory" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;title=Benefits%20of%20Monitoring%20Active%20Directory&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=As%20a%20server%20administrator%2C%20you%20want%20to%20make%20sure%20you%20create%20the%20best%20possible%20experience%20for%20users.%20For%20users%20to%20reliably%20gain%20access%20to%20Active%20Directory%2C%20it%20must%20be%20managed%20and%20monitored%20to%20make%20sure%20it%20functions%20properly.%0D%0A%0D%0AMonitoring%20Active%20Direc" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;Title=Benefits%20of%20Monitoring%20Active%20Directory" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;title=Benefits%20of%20Monitoring%20Active%20Directory" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;title=Benefits%20of%20Monitoring%20Active%20Directory&amp;annotation=As%20a%20server%20administrator%2C%20you%20want%20to%20make%20sure%20you%20create%20the%20best%20possible%20experience%20for%20users.%20For%20users%20to%20reliably%20gain%20access%20to%20Active%20Directory%2C%20it%20must%20be%20managed%20and%20monitored%20to%20make%20sure%20it%20functions%20properly.%0D%0A%0D%0AMonitoring%20Active%20Direc" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;title=Benefits%20of%20Monitoring%20Active%20Directory" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F&amp;title=Benefits%20of%20Monitoring%20Active%20Directory" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Benefits%20of%20Monitoring%20Active%20Directory%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F03%2Fbenefits-of-monitoring-active-directory%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/03/benefits-of-monitoring-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft’s Endpoint Protection Overview</title>
		<link>http://blog.monitis.com/index.php/2012/05/02/microsofts-endpoint-protection/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/02/microsofts-endpoint-protection/#comments</comments>
		<pubDate>Wed, 02 May 2012 16:33:26 +0000</pubDate>
		<dc:creator>Irina Tihova</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sysadmin Tools]]></category>
		<category><![CDATA[Endpoint Protection]]></category>
		<category><![CDATA[Forefront]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[SCCM]]></category>
		<category><![CDATA[System Center]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6634</guid>
		<description><![CDATA[First, let’s make it clear what an endpoint is. In Microsoft’s world this term represents any client computer, server, or laptop in an organization. Forefront Endpoint Protection is a line-of-business application developed by Microsoft to provide defense against viruses, worms, and other threats. Forefront Endpoint Protection (FEP) 2010 was closely tied to System Center Configuration [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/04/Endpoint-Protection.png"><img class="alignright size-full wp-image-6637" src="http://blog.monitis.com/wp-content/uploads/2012/04/Endpoint-Protection.png" alt="" width="224" height="103" /></a></p>
<p>First, let’s make it clear what an endpoint is. In Microsoft’s world this term represents any client computer, server, or laptop in an organization. Forefront Endpoint Protection is a line-of-business application developed by Microsoft to provide defense against viruses, worms, and other threats.</p>
<p>Forefront Endpoint Protection (FEP) 2010 was closely tied to System Center Configuration Manager (SCCM) through the infrastructure. This was beneficial for organizations which had already adopted SCCM, but was a challenge for ones without it implemented.<span id="more-6634"></span></p>
<p>In their latest release, the Endpoint protection is actually part of the System Center family and takes the name System Center Endpoint Protection (SCEP) 2012. The integration of SCEP with SCCM allows you to centrally manage your endpoints. You can scan them for both updates and viruses. You can also schedule your scans so that they happen automatically.</p>
<p>In a typical scenario you would use one software solution for managing the updates of your endpoints, such as Windows Software Update Services (WSUS), and another solution for antivirus protection, such as McAfee. This means you have to open one management tool for WSUS and another one for McAfee.</p>
<p>By using a single dashboard, you can easily notice potential problems with your endpoints such as missing updates and potential viruses. This central management can save your IT staff significant time. The idea is that you should not look at the anti-virus protection as a separate solution. With Endpoint Protection, anti-virus protection is integrated into your whole IT management solution. Furthermore, SCEP ensures your Windows Firewall is also up and running, and any set policies take effect.</p>
<p>The SCEP client is very lightweight and any competitive antivirus solutions are automatically removed before installation. This can ease your adoption of SCEP when you have another solution in place.</p>
<p>A SCEP client is installed on all the endpoints, and it is automatically updated with definitions of known and unknown threats. The methods SCEP uses include:</p>
<p>- <strong>Behavior monitoring</strong> – allows the agent installed on the system to monitor the registry, the active processes and the system operations in order to identify any suspicious activities. If an activity is considered suspicious, then it is sent to Microsoft for investigating. If malware is detected, a signature is released.</p>
<p>- <strong>Dynamic Signature Service</strong> – keeps a dynamically updated list of all known signatures of attacks. With this feature the agent installed on the endpoint is able to get real-time information about whether an activity is considered malicious or not. If it is considered to be malicious, then corrective actions are applied, like quarantine or removal.</p>
<p>- <strong>Dynamic translation</strong> – is used by the agent to run code in a virtual environment and investigate it, before allowing it to run on the actual endpoint with the real resources. It can be used with code like ActiveX and JavaScript that run in the browser.</p>
<p>And the good news &#8211; Microsoft provides an absolutely free product, <strong>Microsoft Security Essentials</strong>, which can be used by end clients and uses the same core as the Forefront Endpoint Protection.</p>
<p>&nbsp;</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;title=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview&amp;notes=%0D%0A%0D%0AFirst%2C%20let%E2%80%99s%20make%20it%20clear%20what%20an%20endpoint%20is.%20In%20Microsoft%E2%80%99s%20world%20this%20term%20represents%20any%20client%20computer%2C%20server%2C%20or%20laptop%20in%20an%20organization.%20Forefront%20Endpoint%20Protection%20is%20a%20line-of-business%20application%20developed%20by%20Microsoft%20to%20pro" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;title=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview&amp;bodytext=%0D%0A%0D%0AFirst%2C%20let%E2%80%99s%20make%20it%20clear%20what%20an%20endpoint%20is.%20In%20Microsoft%E2%80%99s%20world%20this%20term%20represents%20any%20client%20computer%2C%20server%2C%20or%20laptop%20in%20an%20organization.%20Forefront%20Endpoint%20Protection%20is%20a%20line-of-business%20application%20developed%20by%20Microsoft%20to%20pro" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;t=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;title=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0A%0D%0AFirst%2C%20let%E2%80%99s%20make%20it%20clear%20what%20an%20endpoint%20is.%20In%20Microsoft%E2%80%99s%20world%20this%20term%20represents%20any%20client%20computer%2C%20server%2C%20or%20laptop%20in%20an%20organization.%20Forefront%20Endpoint%20Protection%20is%20a%20line-of-business%20application%20developed%20by%20Microsoft%20to%20pro" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;Title=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;title=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;title=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview&amp;annotation=%0D%0A%0D%0AFirst%2C%20let%E2%80%99s%20make%20it%20clear%20what%20an%20endpoint%20is.%20In%20Microsoft%E2%80%99s%20world%20this%20term%20represents%20any%20client%20computer%2C%20server%2C%20or%20laptop%20in%20an%20organization.%20Forefront%20Endpoint%20Protection%20is%20a%20line-of-business%20application%20developed%20by%20Microsoft%20to%20pro" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;title=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F&amp;title=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Microsoft%E2%80%99s%20Endpoint%20Protection%20Overview%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F02%2Fmicrosofts-endpoint-protection%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/02/microsofts-endpoint-protection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improving .NET Application Performance Part 11: Iteration and Looping</title>
		<link>http://blog.monitis.com/index.php/2012/05/01/improving-net-application-performance-part-11-iteration-and-looping/</link>
		<comments>http://blog.monitis.com/index.php/2012/05/01/improving-net-application-performance-part-11-iteration-and-looping/#comments</comments>
		<pubDate>Tue, 01 May 2012 14:48:43 +0000</pubDate>
		<dc:creator>Ard-Jan Barnas</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[.NET Framework]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=6569</guid>
		<description><![CDATA[In this article in the optimizing .NET code series, we’ll discuss “Iteration and Looping”. Non-optimized code within loops can lead to performance issues, ranging from increased memory consumption to CPU exhaustion. This section summarizes guidelines that will improve iteration and loop efficiency: Avoid Repetitive Field or Property Access If your data is static for the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/04/NET_v_rgb_2.png"><img class="alignright size-full wp-image-6369" style="float: right;" title="NET_v_rgb_2" src="http://blog.monitis.com/wp-content/uploads/2012/04/NET_v_rgb_2.png" alt="monitoring dot net" width="160" height="152" /></a>In this article in the optimizing .NET code series, we’ll discuss “Iteration and Looping”. Non-optimized code within loops can lead to performance issues, ranging from increased memory consumption to CPU exhaustion. This section summarizes guidelines that will improve iteration and loop efficiency:</p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Avoid Repetitive Field or Property Access</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">If your data is static for the duration of the loop, obtain it before the loop instead of repeatedly accessing a field or property. The following code shows a collection of orders being processed for a single customer.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>for ( int item = 0; item &lt; Customer.Orders.Count ; item++ ){</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>CalculateTax ( Customer.State, Customer.Zip, Customer.Orders[item] );</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;">Note that <span>State</span> and <span>Zip</span> are constant for the loop and could be stored in local variables rather than accessed for each pass through the loop as shown in the following code.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>string state = Customer.State;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>string zip = Customer.Zip;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>int count = Customers.Orders.Count;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>for ( int item = 0; item &lt; count ; item++ )</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>{</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>CalculateTax (state, zip, Customer.Orders[item] );</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;">Note that if these are fields, it may be possible for the compiler to do this optimization automatically. If they are properties, it is much less likely. If the properties are virtual, it cannot be done automatically.</p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Optimize or Avoid Expensive Operations Within Loops</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">Identify operations in your loop code that can be optimized. Look for code that causes boxing or allocations as a side effect. The following code causes side effect strings to be created for each pass through the loop.<span id="more-6569"></span></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>String str;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Array arrOfStrings = GetStrings();</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>for(int i=0; i&lt;10; i++)</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>{</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>str+= arrOfStrings[i];</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>The following code avoids extra string allocations on the heap by using <span>StringBuilder</span>.</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>StringBuilder sb = new StringBuilder();</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Array arrOfStrings = GetStrings();</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>for(int i=0; i&lt;10; i++)</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>{</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>sb.Append(arrOfStrings.GetValue(i));</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;">The following tips can help avoid expensive loop operations:</p>
<p class="MsoListParagraphCxSpFirst" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.75in;"><span><span><span style="font-family: Symbol;">·</span><span style="line-height: normal;"><span style="font-family: Times New Roman;"><span>         </span></span></span></span></span>Be aware of the method calls you make inside loops. Watch out for inadvertent method calls and consider using inline code where appropriate.</p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.75in;"><span><span><span style="font-family: Symbol;">·</span><span style="line-height: normal;"><span style="font-family: Times New Roman;"><span>         </span></span></span></span></span>Consider <span>StringBuilder</span> for string concatenation inside a loop. For more information, see &#8220;String Operations&#8221; later in this chapter.</p>
<p class="MsoListParagraphCxSpLast" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 10pt 0.75in;"><span><span><span style="font-family: Symbol;">·</span><span style="line-height: normal;"><span style="font-family: Times New Roman;"><span>         </span></span></span></span></span>When testing for multiple conditions to exit out or continue looping, order your tests so that the one most likely to let you escape the loop, is run first.</p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Copy Frequently Called Code into the Loop</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">If you repeatedly call methods from inside a loop, consider changing the loop to reduce the number of calls made. The JIT compiler usually inlines any called code if it is simple, but in most complex scenarios it is your responsibility to optimize the code. The costs of the call increase as you cross process or computer boundaries with remoting or Web services. The following code shows a method being called repeatedly inside a loop.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>for ( int item = 0 ; item &lt; Circles.Items.Length; item++ ){</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>CalculateAndDisplayArea(Circles[item]);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;">Consider the following strategies to reduce the calls incurred:</p>
<ul style="margin-top: 0in; margin-bottom: 0in;" type="disc">
<li class="MsoNormal">Move the called code into the loop. This reduces the number of calls being made.</li>
<li class="MsoNormal">Move the whole unit of work to the called object. The following code modifies the object being called and passes all the required data so that the whole loop can happen remotely. This is helpful to avoid round trips and offloads the work to local calls for an object which may be hosted remotely.</li>
</ul>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>// call function to store all items</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>OrderProcessing op = new OrderProcessing();</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>StoreAllOrderItems (Order.Items);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>&#8230;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>class OrderProcessing{</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>&#8230;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>  </span>public bool StoreAllOrderItems ( Items itemsToInsert )</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>  </span>{</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>    </span>SqlConnection conn = new SqlConnection(&#8230;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>    </span>SqlCommnd cmd = new SqlCommand(&#8230;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>    </span>for ( int item = 0 ; item &lt; orders.Items.Length; item++ ){</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>      </span>// insert order into database</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>      </span>// set parameters on command object</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>      </span>cmd.ExecuteNonQuery();</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>      </span>// insert order item</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>    </span>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>  </span>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em><span>  </span>. . .</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt 0.5in;"><em>}</em></p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Consider Replacing Recursion with Looping</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">Each recursive call adds data to the stack. Examine your code and see if your recursive calls can be converted to a looping equivalent. The following code makes recursive calls to accomplish a small task of string concatenation.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>Array arr = GetArrayOfStrings();</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>int index = arr.Length-1;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>String finalStr= RecurStr(index);</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>string RecurStr(int ind){</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>if (ind&lt;=0)</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>    </span>return &#8220;&#8221;;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>else</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>    </span>return (arr.GetValue(ind)+RecurStr(ind-1));</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;">Rewritten, the following code now avoids creating new data on the stack for each successive call and avoids an additional method call to itself.</p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>string ConcString (Array array)</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>{</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>StringBuilder sb = new StringBuilder();</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>for (int i= array.Length; i&gt;0; i&#8211;)</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>{</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>    </span>sb.Append(array.GetValue(i));</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>}</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em><span>  </span>return sb;</em></p>
<p class="MsoQuote" style="margin: 0in 0in 0pt;"><em>}</em></p>
<h3 style="line-height: 13pt; margin: 10pt 0in 0pt;"><span style="font-family: Cambria;"><span style="color: #4f81bd;"><span>Use for Instead of foreach in Performance-Critical Code Paths</span></span></span></h3>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;">Use <span>for</span> instead of <span>foreach</span> (C#) to iterate the contents of collections in performance-critical code. <span>foreach</span> in C# and <span>For Each</span> in Visual Basic .NET use an enumerator to provide enhanced navigation through arrays and collections.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping&amp;notes=In%20this%20article%20in%20the%20optimizing%20.NET%20code%20series%2C%20we%E2%80%99ll%20discuss%20%E2%80%9CIteration%20and%20Looping%E2%80%9D.%20Non-optimized%20code%20within%20loops%20can%20lead%20to%20performance%20issues%2C%20ranging%20from%20increased%20memory%20consumption%20to%20CPU%20exhaustion.%20This%20section%20summarizes%20guid" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping&amp;bodytext=In%20this%20article%20in%20the%20optimizing%20.NET%20code%20series%2C%20we%E2%80%99ll%20discuss%20%E2%80%9CIteration%20and%20Looping%E2%80%9D.%20Non-optimized%20code%20within%20loops%20can%20lead%20to%20performance%20issues%2C%20ranging%20from%20increased%20memory%20consumption%20to%20CPU%20exhaustion.%20This%20section%20summarizes%20guid" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;t=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=In%20this%20article%20in%20the%20optimizing%20.NET%20code%20series%2C%20we%E2%80%99ll%20discuss%20%E2%80%9CIteration%20and%20Looping%E2%80%9D.%20Non-optimized%20code%20within%20loops%20can%20lead%20to%20performance%20issues%2C%20ranging%20from%20increased%20memory%20consumption%20to%20CPU%20exhaustion.%20This%20section%20summarizes%20guid" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;Title=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping&amp;annotation=In%20this%20article%20in%20the%20optimizing%20.NET%20code%20series%2C%20we%E2%80%99ll%20discuss%20%E2%80%9CIteration%20and%20Looping%E2%80%9D.%20Non-optimized%20code%20within%20loops%20can%20lead%20to%20performance%20issues%2C%20ranging%20from%20increased%20memory%20consumption%20to%20CPU%20exhaustion.%20This%20section%20summarizes%20guid" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F&amp;title=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Improving%20.NET%20Application%20Performance%20Part%2011%3A%20Iteration%20and%20Looping%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F05%2F01%2Fimproving-net-application-performance-part-11-iteration-and-looping%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/05/01/improving-net-application-performance-part-11-iteration-and-looping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

