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

<channel>
	<title>eSustain</title>
	<atom:link href="http://www.esustain.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.esustain.com/blog</link>
	<description>Sustaining Electronic Commerce</description>
	<pubDate>Wed, 23 Sep 2009 02:59:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What if the load test tool itself can not handle load?</title>
		<link>http://www.esustain.com/blog/uncategorized/what-if-the-load-test-tool-itself-can-not-handle-load/</link>
		<comments>http://www.esustain.com/blog/uncategorized/what-if-the-load-test-tool-itself-can-not-handle-load/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 02:54:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[advanced settings]]></category>

		<category><![CDATA[advanced vm parameter]]></category>

		<category><![CDATA[heap]]></category>

		<category><![CDATA[hp]]></category>

		<category><![CDATA[hppc]]></category>

		<category><![CDATA[jconsole]]></category>

		<category><![CDATA[jms]]></category>

		<category><![CDATA[jms protocol]]></category>

		<category><![CDATA[jms_send_message_queue]]></category>

		<category><![CDATA[jmx]]></category>

		<category><![CDATA[jvm]]></category>

		<category><![CDATA[jvm heap]]></category>

		<category><![CDATA[loadrunner]]></category>

		<category><![CDATA[memory leak]]></category>

		<category><![CDATA[mmdrv]]></category>

		<category><![CDATA[mmdrv.exe]]></category>

		<category><![CDATA[remote]]></category>

		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=242</guid>
		<description><![CDATA[You use load test tools to break application software you are testing. What if the tool itself breaks and the applications under test do not even have a dent?
This is exactly what happened when using JMS protocol in HPPC ( Loadrunner).  There is a memory leak in HPPC when using JMS. The mmdrv.exe process invokes [...]]]></description>
			<content:encoded><![CDATA[<p>You use load test tools to break application software you are testing. What if the tool itself breaks and the applications under test do not even have a dent?</p>
<p>This is exactly what happened when using JMS protocol in HPPC ( Loadrunner).  There is a memory leak in HPPC when using JMS. The mmdrv.exe process invokes JVM (in-process) during use of one of the jms functions (jms_send_message_queue).</p>
<p>During one of our tests we started getting out of memory error. Of course if you increase the JVM heap ( using -Xmx ) the error will be delayed but the fact remains it is leaking memory. It was very embarrassing to tell the application team that our tool is breaking during load testing.</p>
<p>We have been trying desperately to get HP to admit and fix it but they are making us go around in circle. We  used JConsole to monitor the JVM and prove to them that there is a leak but they still do not get it. The only thing that is left is for us to now fix the code for them.</p>
<p>In order to use JConsole with loadrunner JMS, you need to add the following in the -Dcom.sun.management.jmxremote in the &#8220;Additional VM Parameters&#8221; in order for JConsole to connect to the JVM.  Once you do that you can see the JVM memory keep on climbing inspite of you manually invoking GC.</p>
<p>Are you listening HP?</p>
<p> <a href="http://www.esustain.com/blog/wp-content/uploads/2009/09/test.jpg"><img class="alignnone size-full wp-image-246" title="JMS Advanced Settings" src="http://www.esustain.com/blog/wp-content/uploads/2009/09/test.jpg" alt="JMS Advanced Settings" width="687" height="457" /></a></p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=What%20if%20the%20load%20test%20tool%20itself%20can%20not%20handle%20load%3F&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Funcategorized%2Fwhat-if-the-load-test-tool-itself-can-not-handle-load%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/uncategorized/what-if-the-load-test-tool-itself-can-not-handle-load/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Oracle buying Sun: What it means for Open Source Community</title>
		<link>http://www.esustain.com/blog/tech_commentary/oracle-buying-sun/</link>
		<comments>http://www.esustain.com/blog/tech_commentary/oracle-buying-sun/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 03:27:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Tech Commentary]]></category>

		<category><![CDATA[glassfish]]></category>

		<category><![CDATA[ibm]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[jonathan schwartz]]></category>

		<category><![CDATA[larry ellison]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[open source]]></category>

		<category><![CDATA[opensolaris]]></category>

		<category><![CDATA[oracle]]></category>

		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=238</guid>
		<description><![CDATA[Sun under the leadership of Jonathan Schwartz had been investing all its resources in open sourcing the whole organization. Sun was one of the biggest recent converts to Open Sourcing. When IBM was in talks to buy Sun the threat to open source community was not much. IBM had also invested heavily in open source [...]]]></description>
			<content:encoded><![CDATA[<p>Sun under the leadership of Jonathan Schwartz had been investing all its resources in open sourcing the whole organization. Sun was one of the biggest recent converts to Open Sourcing. When IBM was in talks to buy Sun the threat to open source community was not much. IBM had also invested heavily in open source and could have kept up the open source efforts of Sun alive and ticking.</p>
<p>Now that Oracle is in talks to buy Sun what is in store for open source community. What will happen to all the open source projects initiated by Sun? The most interesting of them for Oracle is MySQL. MySQL was getting positioned to provide stiff competition to Oracle in near future. What will be its fate under Larry Ellison&#8217;s leadership?</p>
<p>It would be actually in best interest of Oracle to expand the reach of MySQL. If MySQL gets killed there will be other open source database taking birth and it will be a big headache for Oracle to keep fending off these open source initiatives. Oracle is in a great position now that it is acquiring the leading open source database and it can really use this opportunity to be at the center of the Open Source action. Of course Java  brand  has tremendous value and Larry Ellison might find ways to monetize it, which Sun had miserably failed to do so. What happens to the rest of the open source initiatives? It is anybody&#8217;s guess. It will be interesting to see what happens to OpenSolaris, Glassfish, Netbeans etc.</p>
<p>The only thing that does not fit well in this acquisition is the hardware aspect of Sun. Oracle has always been a software company but with this acquisition it suddenly has to have a hardware strategy. One possible scenario is that Oracle will just absorb the software products of Sun and sell off the hardware business. It is difficult to envision Oracle putting itself into the center of an already overcrowded server market.</p>
<p>Is this a acquisition a big blow to Open Source Community? I doubt so. It might just be an hiccup and probably the open source community will keep chugging along and getting people on board. What ever happens it will surely be very interesting to see how this acquisition plays out.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=Oracle%20buying%20Sun%3A%20What%20it%20means%20for%20Open%20Source%20Community&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Ftech_commentary%2Foracle-buying-sun%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/tech_commentary/oracle-buying-sun/feed/</wfw:commentRss>
		</item>
		<item>
		<title>One accurate measurement is worth a thousand expert opinions</title>
		<link>http://www.esustain.com/blog/performance_engineering/one-accurate-measurement/</link>
		<comments>http://www.esustain.com/blog/performance_engineering/one-accurate-measurement/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 16:22:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Perfromance Engineering]]></category>

		<category><![CDATA[accurate]]></category>

		<category><![CDATA[expert]]></category>

		<category><![CDATA[Grace]]></category>

		<category><![CDATA[Grace Murray Hopper]]></category>

		<category><![CDATA[hopper]]></category>

		<category><![CDATA[InvalidAuthenticityToken]]></category>

		<category><![CDATA[leak]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[measure]]></category>

		<category><![CDATA[measurement]]></category>

		<category><![CDATA[memory]]></category>

		<category><![CDATA[memory leak]]></category>

		<category><![CDATA[Murray]]></category>

		<category><![CDATA[opinions]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[resource]]></category>

		<category><![CDATA[thousand]]></category>

		<category><![CDATA[worth]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=218</guid>
		<description><![CDATA[&#8220;One accurate measurement is worth a thousand expert opinions&#8221; - Adm Grace Murray Hopper ( Dec 9 1906 to Jan 1 1992)
Measurement is the most important aspect of Performance Engineering. There is no place for guess work in performance engineering. Measuring tools are the most important tools in a Performance Engineer&#8217;s tool set.
In one of [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;One accurate measurement is worth a thousand expert opinions&#8221; - <a title="Adm Grace Murray Hopper" href="http://en.wikipedia.org/wiki/Grace_Hopper" target="_self">Adm Grace Murray Hopper </a>( Dec 9 1906 to Jan 1 1992)</p>
<p>Measurement is the most important aspect of Performance Engineering. There is no place for guess work in performance engineering. Measuring tools are the most important tools in a Performance Engineer&#8217;s tool set.</p>
<p>In one of the projects I was involved in, the second day of my job I was validating the solution for a high throughput. Everything was going fine till the performance test started throwing lot of errors. The solution involved around 15 servers. I had set up monitoring of resources on all the 15 servers. First thing I did was look up the resource utilization of all the servers. There was one server where the memory utilization kept on growing. I narrowed down to the process which was growing in memory. The graph of the memory utilization for the process showed a linear growth, it went up as high as 1GB and then the process terminated. This graph was proof enough to show the developer that the process had a big memory leak. This was fixed within a day and solution was ready for further testing.</p>
<p>Performance engineering requires lot of discipline and a methodical approach. Lot of times when we come across problems we tend to start giving expert opinions, start guessing where the problem might be or start looking at the code. One needs to take a scientific approach. One has to look at the facts, start with resource utilization and then narrow down to looking at logs, timestamps, database metrics, application server metrics, compare with historical benchmarks etc.</p>
<p>Check this out. The very first <a title="Computer bug" href="http://en.wikipedia.org/wiki/File:H96566k.jpg" target="_blank">computer bug</a>.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=One%20accurate%20measurement%20is%20worth%20a%20thousand%20expert%20opinions&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Fperformance_engineering%2Fone-accurate-measurement%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/performance_engineering/one-accurate-measurement/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scalability in Performance Engineering</title>
		<link>http://www.esustain.com/blog/performance_engineering/scalability-in-performance-engineering/</link>
		<comments>http://www.esustain.com/blog/performance_engineering/scalability-in-performance-engineering/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 04:34:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Perfromance Engineering]]></category>

		<category><![CDATA[architecture]]></category>

		<category><![CDATA[bottleneck]]></category>

		<category><![CDATA[hardware]]></category>

		<category><![CDATA[hardware bottleneck]]></category>

		<category><![CDATA[horizontal]]></category>

		<category><![CDATA[horizontal scalability]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[monitoring]]></category>

		<category><![CDATA[resources]]></category>

		<category><![CDATA[scalability]]></category>

		<category><![CDATA[scalable]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[software bottleneck]]></category>

		<category><![CDATA[throughput]]></category>

		<category><![CDATA[tps]]></category>

		<category><![CDATA[vertical]]></category>

		<category><![CDATA[vertical scalability]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=198</guid>
		<description><![CDATA[There is a common misconception that just by adding more hardware  you can increase the throughput of your application. Yes indeed hardware is very cheap these days but things are not as easy as adding more hardware to improve the performance. You could have so many layers in your solution, web servers, application servers, database [...]]]></description>
			<content:encoded><![CDATA[<p>There is a common misconception that just by adding more hardware  you can increase the throughput of your application. Yes indeed hardware is very cheap these days but things are not as easy as adding more hardware to improve the performance. You could have so many layers in your solution, web servers, application servers, database servers, authentication servers etc. Lets say currently your solution is supporting 50 transaction per second (tps)  and you have 20 servers spread across different layers. Now there is a need to support 100 tps.</p>
<p>Are you going to add 20 more servers since the load has doubled?</p>
<p>Are you sure that the application will <strong>scale </strong>up to 100 tps with added hardware?</p>
<p>Lets assume we have a perfectly scalable application. The first step is finding out which server is the bottleneck. Lets say the authentication server is at 90% CPU busy during peak load and is the only bottleneck in the system. Probably all you need is to add just one more authentication server and you could support 100 tps. You would be wasting time, money and resources by buying 20 more servers instead of just a single server which would have supported the 100 tps load. That is where Performance Engineering comes into picture.  Performance engineer is responsible for determining the scalability of the system and determine the bottlenecks both in the hardware resources and the software application.</p>
<p>There are two types of scalability, <strong>Vertical</strong> and <strong>Horizontal</strong>. Vertical scalability involves verifying that the software scales up on adding more resources ( cpu, memory, io, network) within a single server machine. Horizontal scalability involves verifying that the software scales up by adding more physical servers machines ( probably balanced via a load balancer ).  You determine the vertical scalability of the software by benchmarking on a particular hardware ( cpu, memory, io and network) for the maximum throughput and increasing the relevant resources and run another benchmark for the maximum throughput. If the software scales proportionately then it is scaling vertically.  Most of the times in real world you do not have time to test for vertical scalability and you just find out what is the maximum throughput on a single server and then see if it scales horizontally. Testing for horizontal scalability requires adding additional servers. Try to get three points in a graph to better understand the scalability. For e.g  on a 6 server architecture you could get benchmarking results on 1 server, 3 server and 6 servers and plot the throughput graph and understand if the software scales. If the software is not scaling proportionally or not scaling up at all then there is  probably a software bottleneck. If none of the hardware resources are found to be a bottleneck then we have a tough task at hand to determine the software bottleneck.</p>
<p><span id="more-198"></span></p>
<p>If you have a bottleneck in your software it will not scale up in spite of throwing more hardware at it. The most difficult and crucial part is finding and removing bottlenecks in the software. In one of the critical applications I had been working on, during my scalability tests I saw that with increased load the throughput was not increasing and the response time was growing linearly. This seemed to be a classic software bottleneck and I used all the tools at disposal, resource utilization tools, profiling tools, timestamp analysis tools etc. to narrow down where the problem is. The problem was in a method called &#8220;processMessage&#8221; within a class. This method was the entry point for multiple threads and there was one big lock sitting in there. This class had a member variable as a DOM object and in order to make the method &#8220;processMessage&#8221; as threadsafe there was a mutex surrounding the processing of this DOM object. This would serialize all the requests instead of processing them simultaneously in different threads. There was no need to have the DOM object as a member variable. All that was required was to instantiate the DOM object within the method &#8220;processMessage&#8221; , remove it from being a member variable and remove the mutex. This was a huge bottleneck and was due to careless programming and it would have been a disaster if the product went into production without a fix. A simple fix resolved the problem. Lot of times this is not so easy and needs much more time and repeated tests to narrow down the bottleneck. Just imagine if you have to find a software bottleneck in production environment. The customer impact could be huge.</p>
<p>The bottom line is that adding hardware is not always the right solution. Yes if your solution is scalable then adding additional hardware will increase the throughput. But you still need to know which hardware to add. Sometimes adding hardware also does not improve performance so one needs to know what are the bottlenecks within the software. This is one of the most difficult and challenging aspects of performance engineering. A good performance engineer will be able to determine by monitoring the resources if there are hardware bottlenecks and after resolving hardware bottlenecks if the software does not scale up he will be able to determine the software bottlenecks and resolve it for improved scalability. Bottlenecks sometimes keeps on moving from one layer to another. You might resolve a bottleneck in application layer and then the bottleneck might move to the database layer. That is what makes performance engineering so challenging and interesting.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=Scalability%20in%20Performance%20Engineering&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Fperformance_engineering%2Fscalability-in-performance-engineering%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/performance_engineering/scalability-in-performance-engineering/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Performance testing with data representative of production.</title>
		<link>http://www.esustain.com/blog/performance_engineering/performance-testing-with-data-representative-of-production/</link>
		<comments>http://www.esustain.com/blog/performance_engineering/performance-testing-with-data-representative-of-production/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 19:30:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Perfromance Engineering]]></category>

		<category><![CDATA[archival]]></category>

		<category><![CDATA[archiving]]></category>

		<category><![CDATA[data retention]]></category>

		<category><![CDATA[full table scan]]></category>

		<category><![CDATA[joins]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[optimize]]></category>

		<category><![CDATA[production]]></category>

		<category><![CDATA[SGA]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=192</guid>
		<description><![CDATA[Lot of times applications are certified for good performance by testing with minimal data. The performance tests should be done with a data set which is representative of the production environment. One needs to load the peak expected data as per the data retention scheme employed in the performance test environment and validate the performance. [...]]]></description>
			<content:encoded><![CDATA[<p>Lot of times applications are certified for good performance by testing with minimal data. The performance tests should be done with a data set which is representative of the production environment. One needs to load the peak expected data as per the data retention scheme employed in the performance test environment and validate the performance. The performance results can vary significantly for different size of the data incorporated in the database.</p>
<p>For example a particular query might be doing a <strong>full table scan</strong> and this issue might not be noticed when testing with small amounts of data. When it goes into production and there is substantial amount of data, this single query can bring down the performance of the whole solution to its knees. This single query could eat up the CPU of the database machine thereby adversely affecting all the other queries. The time to find out the root cause of this issue while the product is in production could be substantial and the customer impact could be huge. There might be need to optimize your database configuration ( SGA size, tablespace settings, redo log settings, archival settings etc.)  in order to support huge amounts of data. Some of your queries would be using complex joins and dealing with large number of records and could impact performance. All these issues could be found and resolved prior to going in production by running performance tests with production like data.</p>
<p><span id="more-192"></span>In a recent consulting work I was involved in a project where not much thought was put into data retention. There was actually no data retention strategy. The application was dealing with large amounts of data and was retaining the data in the live database and would grow to 15 TB in just a few months. There is no way we could test with this kind of data and also there was no storage immediately available to handle this kind of data. Actually there was no need of storing all this data in the live database. All that was required was an archiving strategy. The data (documents) would only be looked into if there was some issue so there was no need to keep it in live database, also there was a downstream system which would do most of the processing and it would be safe to archive the data if the processing was successful.  In this case it was an architecture issue and just required an archival strategy.</p>
<p>Also another challenge is to upload huge amounts of data for performance testing  especially if it is the first release and there is not production data available. There is a need to generate huge amounts of data. Should you use the performance load tool to drive the load and create the data? I would advise against that. It might take whole lot of time just to populate the database especially if you drive from the front end and go through the whole solution. If possible one should use some kind of script to directly load data in the database and bypass the whole solution and speed up the process.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=Performance%20testing%20with%20data%20representative%20of%20production.&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Fperformance_engineering%2Fperformance-testing-with-data-representative-of-production%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/performance_engineering/performance-testing-with-data-representative-of-production/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Open Source Performance Testing</title>
		<link>http://www.esustain.com/blog/open_source_technologies/open-source-performance-testing/</link>
		<comments>http://www.esustain.com/blog/open_source_technologies/open-source-performance-testing/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 21:57:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Open Source technologies]]></category>

		<category><![CDATA[Perfromance Engineering]]></category>

		<category><![CDATA[automation]]></category>

		<category><![CDATA[grinder]]></category>

		<category><![CDATA[jmeter]]></category>

		<category><![CDATA[junit]]></category>

		<category><![CDATA[jWebUnit]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[loadrunner]]></category>

		<category><![CDATA[open source]]></category>

		<category><![CDATA[opensta]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[pushtotest]]></category>

		<category><![CDATA[qtp]]></category>

		<category><![CDATA[selenium]]></category>

		<category><![CDATA[silk performer]]></category>

		<category><![CDATA[silk test]]></category>

		<category><![CDATA[STAF]]></category>

		<category><![CDATA[testing]]></category>

		<category><![CDATA[testmaker]]></category>

		<category><![CDATA[watir]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=85</guid>
		<description><![CDATA[Open Source has taken a center stage in the development world. It is a community effort which can not stopped. Either you ride it or get run over by it. 
One area where open source has not yet made a big dent is in test automation and performance testing.
This area is still dominated by commercial [...]]]></description>
			<content:encoded><![CDATA[<p>Open Source has taken a center stage in the development world. It is a community effort which can not stopped. Either you ride it or get run over by it. </p>
<p>One area where open source has not yet made a big dent is in test automation and performance testing.<br />
This area is still dominated by commercial tools. Most of the commercial tools available for automation and performance testing are extremely expensive. The leading tools from HP (QTP, Loadrunner) and Borland ( Silk Performer, Silk Test) come with a huge price tag.</p>
<p>I used to be a developer before I jumped into Performance Testing back in 1998. That time I was still not able to let go of my development skills. For the first Performance Testing assignment I had built a load testing tool using MS VC++ ( are we not talking of open source here?), the GUI for it is shown below. This was perfect for me. It suited all my needs for driving the load on the server. I had other scripts to automate monitoring, logging and analyzing the results ( see the tool image below).  Well right around then the company I used to work for, decided on standardizing the tool set and we settled on Silk Performer ( then a product of Segue). Using the tool was good for my resume value and it did have lots more bells and whistles.<br />
<span id="more-85"></span><br />
But I can not say for sure that using this tool instead of my own nifty tool added more value to quality of the product I was testing. Load generation tool contributes to probably 20-30% of the whole performance engineering aspect. There is more to performance engineering then just using a load tesing tool, like benchmarking, tuning, reliability, availability and capacity planning. Also there is a human factor involved. A good Performance Engineer has to have the good breadth and depth of knowledge about the whole architecture and components involved. Performance engineering touches all aspects of the solution involving both the software and the hardware. There can be so many moving parts to a solution. A typical solution could comprise of application servers, frameworks, Operating systems, databases, user interfaces, Virtual Servers. Then there is the hardware factor CPU, Memory, Network and IO. Detecting performance bottlenecks in these complex solutions is an art and needs lot of experience. Is it worth it to spend enormous amounts of money for a load testing tool when it helps with just a 20-30% of the performance engineering aspect. Frankly I do not think it is worth it.</p>
<p>If you have a server gateway which is queue based ( JMS/MQSeries/MS MQ) why do you need to invest in LoadRunner or Silk Performer. Just a small script to pump the messages in the Queue to drive the load will suffice. The good thing about these expensive commercial tools is that they promise to satisfy all your needs (different  protocols, frameworks , OS etc.) and the bad thing is also that they promise to satisfy all your needs. You do not go buy a Ferrari when all you need is a bike!</p>
<p>There is a huge opportunity for open source tools to provide a subsitute for these expensive commercial tools. At present there is no single tool which can act as a substitute for the comercial counterparts, although open source provides you the opportunity to select and use tools as per your needs. One tool is not going to satisfy all your needs.</p>
<p>Here are some of the tools which can be used for Performance Testing and Automation</p>
<p><strong>Performance Testing:</strong></p>
<p><a title="Apache JMeter" href="http://jakarta.apache.org/jmeter/" target="_blank">Apache JMeter</a><br />
<a title="Grinder" href="http://grinder.sourceforge.net/" target="_blank">Grinder</a><br />
<a title="OpenSTA" href="http://opensta.org/" target="_blank">OpenSTA</a><br />
<a title="TestMaker" href="http://www.pushtotest.com/" target="_blank">TestMaker</a></p>
<p><strong>Automation:</strong></p>
<p><a title="Selennium" href="http://seleniumhq.org/" target="_blank">Selenium</a><br />
<a title="STAF" href="http://staf.sourceforge.net/" target="_blank">Software Testing Automation Framework (STAF)</a> <br />
<a title="Waitr" href="http://wtr.rubyforge.org/" target="_blank">Web App Testing in Ruby (Watir)</a><br />
<a title="JWebUnit" href="http://jwebunit.sourceforge.net/" target="_blank">JWebUnit</a></p>
<p>The following is the GUI for the tool I had built for my first assignment.</p>
<div id="attachment_86" class="wp-caption alignnone" style="width: 349px"><img class="size-full wp-image-86" title="loadclient" src="http://www.esustain.com/blog/wp-content/uploads/2009/02/loadclient.jpg" alt="Nifty Load generating tool" width="339" height="366" /><p class="wp-caption-text">Nifty Load generating tool</p></div>
<p>Here is a nice youtube video on OpenSource Performance Testing..<br />
<object width="425" height="344" data="http://www.youtube.com/v/k9h51BM2h4w&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/k9h51BM2h4w&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=Open%20Source%20Performance%20Testing&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Fopen_source_technologies%2Fopen-source-performance-testing%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/open_source_technologies/open-source-performance-testing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is Response Time?</title>
		<link>http://www.esustain.com/blog/performance_engineering/what-is-response-time/</link>
		<comments>http://www.esustain.com/blog/performance_engineering/what-is-response-time/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 18:37:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Perfromance Engineering]]></category>

		<category><![CDATA[context switch]]></category>

		<category><![CDATA[cpu]]></category>

		<category><![CDATA[delay]]></category>

		<category><![CDATA[elapsed time]]></category>

		<category><![CDATA[io]]></category>

		<category><![CDATA[iostat]]></category>

		<category><![CDATA[latency]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[network]]></category>

		<category><![CDATA[oracle]]></category>

		<category><![CDATA[owi]]></category>

		<category><![CDATA[response time]]></category>

		<category><![CDATA[sar]]></category>

		<category><![CDATA[system time]]></category>

		<category><![CDATA[time]]></category>

		<category><![CDATA[timex]]></category>

		<category><![CDATA[user time]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=162</guid>
		<description><![CDATA[One of the primary goals of Software Performance Engineering is to satisfy the response time as defined by Service Level Agreements (SLAs). Response time is one of the simplest concept yet it is not fully understood by many.
Let us take a real world example. You go to a restaurant and place an order for lunch. [...]]]></description>
			<content:encoded><![CDATA[<p>One of the primary goals of Software Performance Engineering is to satisfy the response time as defined by Service Level Agreements (SLAs). Response time is one of the simplest concept yet it is not fully understood by many.</p>
<p>Let us take a real world example. You go to a restaurant and place an order for lunch. What is the total time to execute this order? Let&#8217;s look at the sequence of events. The waiter spends some time taking your order and then places it as the last item in a queue of orders. When this order reaches the top of the queue one of the cooks takes this order and cooks the dish and when it is ready the waiter brings it to your table. So the total time for your order is the sum of processing time ( time to take order + cooking time) and the wait time ( time the order was in the queue).</p>
<p>Response time can be defined as the total time taken to perform an action. This total time could include time processing the action ( in the app server, database, client etc.) and the time spent waiting ( network, IO, memory..). In Software Performance Engineering, Response Time can be surmised as sum of processing time and wait time.</p>
<p>Lets take an example from software engineering. In unix there is a utility &#8220;time&#8221; or &#8220;timex&#8221; for measuring the elapsed time for a particular process. We will be looking at a granular level, analyzing a particular process within a system and not the response time for a particular action through the whole solution. Let&#8217;s say your application process is &#8220;myapp&#8221;, you can run the time command on that application as below.</p>
<p><em><strong>&gt;time myapp<br />
4.6 real 0.5 user 0.8 sys</strong></em></p>
<p><span id="more-162"></span></p>
<p>The output shows that the elapsed time ( real time or the response time perceived by the user) for running the &#8220;myapp&#8221; process is 4.6 seconds. The total CPU time for running this process is 1.3 CPU seconds, out of which 0.5 cpu seconds is spent in user mode and 0.8 cpu second in system mode (kernel). Where is the rest of the time? How do you account for 3.3 seconds.</p>
<p>Time could have been spent performnig I/O operation some of which is attributed to system time, but time spent by disk drives, network interfaces, terminal controller, or other hardware is not accounted for by the &#8220;time&#8221; command. Time could have been also spent running jobs on behalf of other users ( context switching) or waiting for memory. Many different components contribute to a program&#8217;s elapsed time.</p>
<p>Some of the notable elements for the breakup of elapsed time is as follows</p>
<ol>
<li><strong>User CPU Time :</strong> The amount of time the CPU spends running user&#8217;s program in user state ( executing library function but excluding time spent in kernel).</li>
<li><strong>System CPU Time:</strong> The amount of time the CPU spends in the system state ( amount of time executing kernel code ).</li>
<li><strong>I/O time:</strong> The amount of time the I/O Subsystem spends servicing I/O requests by the process.</li>
<li><strong>Network time:</strong> The amount of time the I/O Subsystem spends servicing the netwrok requests that the job issues.</li>
<li><strong>Time spent running other programs:</strong> As the load increases, the CPU will spent less time on a particular program and will be switching between programs to give them some slice of time.</li>
<li><strong>Virtual Memory: </strong>Ideally all the programs remain in the system&#8217;s memory, but when the memory is overloaded and not all program&#8217;s can exist in the memory, the system starts paging memory to and from the disk therby increasing the time spent servicing memory request.</li>
</ol>
<p>The bottom line is  <strong>Response time = Processing Time + Wait Time.</strong></p>
<p>Oracle has also changed the way they collect and report performance. The impetus is on wait time. Oracle introduced Oracle Wait Interface ( OWI) in 7.0.12 but it has really matured 10g onwards. This interface provides wait time metrics for numerous events. Mostly the response time degrades significantly due to high wait time and if you can reduce the wait time you can really improve the response times. I will cover OWI in a different post. Also there are system tools ( sar, iostat etc.) which give good indication of the wait time at the system level, those will also be covered in a different post.</p>
<p>Refernces: System Performance Tuniong (Mike Loukides, O&#8217;Reilly)</p>
<p><strong></strong></p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=What%20is%20Response%20Time%3F&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Fperformance_engineering%2Fwhat-is-response-time%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/performance_engineering/what-is-response-time/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Sitemap plugin for Rails</title>
		<link>http://www.esustain.com/blog/open_source_technologies/ruby_on_rails/using-sitemap-plugin-for-rails/</link>
		<comments>http://www.esustain.com/blog/open_source_technologies/ruby_on_rails/using-sitemap-plugin-for-rails/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 22:16:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[finder]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[named route]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[queso]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ror]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[ruby on rails]]></category>

		<category><![CDATA[sitemap]]></category>

		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=134</guid>
		<description><![CDATA[If you have a web site and you want search engined to index your site properly you need to have sitemap for your site. Sitemap is a way to describe your web site, revealing all the static and dynamic links within your website.
I have recently been building a web site based on ROR and I [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a web site and you want search engined to index your site properly you need to have sitemap for your site. Sitemap is a way to describe your web site, revealing all the static and dynamic links within your website.</p>
<p>I have recently been building a web site based on ROR and I was looking for a plugin to accomplish this. The plugin I used is queso/sitemap from <a title="Sitemap Plugin" href="http://github.com/queso/sitemap/tree/master" target="_blank">http://github.com/queso/sitemap/tree/master</a>. This link has instructions and also the readme with the plugin gives enough information to install this plugin. The problem I faced was with setting up widgets and the static link in the sitemap_settings link.</p>
<p>Since I am new to Ruby on Rails it took me a while to figure out how to setup the widgets and static link in the sitemap_settings url.  To explain how I had setup the sitemap I am going to use  the model &#8220;Term&#8221; as an example. Basically I needed Sitemap to display the url of list of terms <strong><em>http://www.mydomain.com/terms</em></strong> and all the individual terms like <strong><em>http://www.mydomain.com/terms/term1</em></strong>, <strong><em>http://www.mydomain.com/terms/term2</em></strong> etc.</p>
<p>In the Widgets setting screen I added a widget named <strong>Term</strong> and entered the information as shown in the image below. The model is going to be <strong>&#8220;Term&#8221;</strong>. <span style="text-decoration: line-through;">The named route is <strong>&#8220;terms_path&#8221;</strong> which resolves to <strong><em>http://www.mydomain.com/terms</em></strong></span><strong><em>. Correction: </em></strong>The named route is <strong>&#8220;terms_url&#8221;</strong> which resolves to <strong><em>http://www.mydomain.com/terms. </em></strong>Make sure to look up your routes to see if the name route you are providing is relevant and available ( use  &gt;&gt; <strong>rake routes</strong> command). If you leave the finder method blank, the sitemap plugin will use <strong>find(:all)</strong> method of the model to get the list of all items in the model. Sitemap plugin is going to generate an XML comprising of the url for list of terms ( <strong><em>http://www.mydomain.com/terms</em></strong> ) and the url of individual terms (<strong><em>http://www.mydomain.com/terms/term1, http://www.mydomain.com/terms/term2 , etc.). </em></strong></p>
<p>You can create a custom finder method. We have created a <strong>find_sitemap</strong> class method in the <strong>Term</strong> model as shown in the code below:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">find_sitemap</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>args<span style="color:#006600; font-weight:bold;">&#41;</span>
    find<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span>,:conditions<span style="color:#006600; font-weight:bold;">=&gt;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'state=?'</span>,<span style="color:#996600;">'published'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p> This method is going to find all terms that are in published state. <span style="text-decoration: line-through;">One issue I ran into was the url being generated by the sitemap for the list was coming out as &#8220;/terms&#8221; instead of &#8220;http://www.mydomain.com/terms&#8221;. I had to hack the sitemap code to get this right. I had to change the code in <strong>show.xml.builder</strong> of the sitemap plugin. The code block is shown below. The following was added in line 3 in the url_for method: &#8220;<strong>root_url.chop + &#8220;</strong>. I am not sure if this is the most graceful way but I was kind of in hurry</span>. Pardon my ignorance. There was nothing wrong with the sitemap plugin it expects a named url ( contains the entire url) instead of the path ( contains relative path). The named route in the following image should be &#8220;terms_url&#8221; instead of &#8220;terms_path&#8221;.</p>
<div id="attachment_148" class="wp-caption alignnone" style="width: 440px"><img class="size-full wp-image-148" title="Sitemap Widget" src="http://www.esustain.com/blog/wp-content/uploads/2009/03/widget1.jpg" alt="Sitemap Widget" width="430" height="497" /><p class="wp-caption-text">Sitemap Widget</p></div>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=Using%20Sitemap%20plugin%20for%20Rails&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Fopen_source_technologies%2Fruby_on_rails%2Fusing-sitemap-plugin-for-rails%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/open_source_technologies/ruby_on_rails/using-sitemap-plugin-for-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making Permalink_fu work</title>
		<link>http://www.esustain.com/blog/open_source_technologies/ruby_on_rails/making-permalink_fu-work/</link>
		<comments>http://www.esustain.com/blog/open_source_technologies/ruby_on_rails/making-permalink_fu-work/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 16:24:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[error]]></category>

		<category><![CDATA[ignore]]></category>

		<category><![CDATA[invalidencoding]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[permalink]]></category>

		<category><![CDATA[permalink_fu]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ror]]></category>

		<category><![CDATA[translit]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=120</guid>
		<description><![CDATA[I recently came across an issue in trying to use Permalink_fu plugin for rails. The problem happened while trying to create permalinks for existing records. Lets say you are trying to add permalink facility to a model &#8220;Designers&#8221;. You already have a few records in the database and would like to generate the permalink for [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across an issue in trying to use Permalink_fu plugin for rails. The problem happened while trying to create permalinks for existing records. Lets say you are trying to add permalink facility to a model &#8220;Designers&#8221;. You already have a few records in the database and would like to generate the permalink for them. This can be done as following:</p>
<p>Designers.find(:all).each(&#038;:save)</p>
<p>This would give an error: <strong>Iconv::InvalidEncoding: invalid encoding (&#8221;ascii//translit//IGNORE&#8221;, &#8220;utf-8&#8243;)</strong></p>
<p>Turns out code needs to be changed in permalink_fu.rb at line 90.<br />
The order is not correct. Commented out portion is what comes with the plugin. The subsequent statement is the correction.</p>
<p>#  PermalinkFu.translation_to   = &#8216;ascii//translit//IGNORE&#8217;<br />
  PermalinkFu.translation_to   = &#8216;ascii//ignore//translit&#8217;</p>
<p>Please refer to this <a href="http://www.seoonrails.com/even-better-looking-urls-with-permalink_fu" target="_blank">tutorial</a> on using permalink_fu.</p>
<p>Also use this <a href="http://groups.google.com/group/MephistoBlog/browse_thread/thread/58ab04c1da47ad46/3b7caba5a2c1dc7f" target="_blank">Reference</a></p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=Making%20Permalink_fu%20work&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Fopen_source_technologies%2Fruby_on_rails%2Fmaking-permalink_fu-work%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/open_source_technologies/ruby_on_rails/making-permalink_fu-work/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using gdb to find memory leaks in HP Unix</title>
		<link>http://www.esustain.com/blog/performance_engineering/using-gdb-to-find-memory-leaks-in-hp-unix/</link>
		<comments>http://www.esustain.com/blog/performance_engineering/using-gdb-to-find-memory-leaks-in-hp-unix/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 01:36:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Perfromance Engineering]]></category>

		<category><![CDATA[breakpoint]]></category>

		<category><![CDATA[c++]]></category>

		<category><![CDATA[gdb]]></category>

		<category><![CDATA[heap profiling]]></category>

		<category><![CDATA[heap-check]]></category>

		<category><![CDATA[hp unix]]></category>

		<category><![CDATA[info leaks]]></category>

		<category><![CDATA[librt.sl]]></category>

		<category><![CDATA[linkedin]]></category>

		<category><![CDATA[memory leak]]></category>

		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.esustain.com/blog/?p=92</guid>
		<description><![CDATA[The following gdb commands are used to setup memory leak detection in C++ programs:
set heap-check leaks on
set heap-check free on
set heap-check bounds on
set heap-check scramble on
To show the leak the following command is used:
(gdb) info leaks
To  view a particular leak from a list of leaks detected use the following:
(gdb) info leak  &#60;leak number&#62; ( [...]]]></description>
			<content:encoded><![CDATA[<p>The following gdb commands are used to setup memory leak detection in C++ programs:<br />
<em>set heap-check leaks on<br />
set heap-check free on<br />
set heap-check bounds on<br />
set heap-check scramble on</em></p>
<p>To show the leak the following command is used:</p>
<p>(gdb) <em>info leaks</em></p>
<p>To  view a particular leak from a list of leaks detected use the following:</p>
<p>(gdb) <em>info leak  &lt;leak number&gt;</em> ( leak number is the relevant number from the leak)</p>
<p>It is very important that program be linked with <strong>librt.sl </strong> shared library to use heap profiling.</p>
<p>The following example is using xscAppAdapter as a C++ program to demonstrate memory leak detection.</p>
<p><span id="more-92"></span><br />
<strong>1) Set Heap Options</strong></p>
<pre>
&gt;&gt;gdb xscAppAdapter.gdb
(gdb) set heap-check leaks on
(gdb) set heap-check free on
(gdb) set heap-check bounds on
(gdb) set heap-check scramble on
(gdb) b xscAppAdapter::processMessage
</pre>
<p><strong>2) Set Breakpoint and Run Application and continue once past the breakpoint to process a message and then detect a leak</strong></p>
<pre>
Breakpoint 1 at 0x202e4: file xscAppAdapter.C, line 383.
(gdb) run -s PFAppStation -c xsc_Config.8.0 -t xsc_StateManager -r dflt &gt; /dev/null 2&gt;&amp;1 0&lt;/dev/null
Starting program: /perf/app/bin/xscAppAdapter.gdb -s PFAppStation -c xsc_Config.8.0 -t xsc_StateManager -r dflt &gt; /dev/null 2&gt;&amp;1 0&lt;/dev/null
Breakpoint 1, xscAppAdapter::processMessage (this=0x4081edf8, <a href="mailto:msg=@0x407b19b0">msg=@0x407b19b0</a>) at xscAppAdapter.C:383
(gdb) c 1
Will stop next time breakpoint 1 is reached.  Continuing.
Breakpoint 1, xscAppAdapter::processMessage (this=0x4081edf8, <a href="mailto:msg=@0x407b1a50">msg=@0x407b1a50</a>) at xscAppAdapter.C:383
383     in xscOpedsAdapter.C
</pre>
<p><strong>3) Find leak using info leaks.</strong></p>
<pre>
(gdb) info leaks
Scanning for memory leaks...
338 bytes leaked in 13 blocks

No. Total bytes Blocks Address Function
0 88 1 0x40510768 operator new(unsigned long)()
1 64 1 0x405321b8 operator new(unsigned long)()
2 37 1 0x4053f1c8 operator new[](unsigned long)()
3 37 1 0x4053f208 operator new[](unsigned long)()
4 31 1 0x406790f0 strdup()
5 22 3 0x4074d548 operator new[](unsigned long)()
6 20 1 0x405f3078 pthread_atfork()
7 15 1 0x40733810 operator new[](unsigned long)()
8 12 1 0x40536510 operator new(unsigned long)()
9 8 1 0x4040e268 operator new(unsigned long)()
10 4 1 0x405efca8 operator new[](unsigned long)()
</pre>
<p><strong>4) Lookup Individual leak info.</strong></p>
<pre>
(gdb) info leak 4
</pre>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=eSustain&amp;siteurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2F&amp;linkname=Using%20gdb%20to%20find%20memory%20leaks%20in%20HP%20Unix&amp;linkurl=http%3A%2F%2Fwww.esustain.com%2Fblog%2Fperformance_engineering%2Fusing-gdb-to-find-memory-leaks-in-hp-unix%2F"><img src="http://www.esustain.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://www.esustain.com/blog/performance_engineering/using-gdb-to-find-memory-leaks-in-hp-unix/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
