<?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>Remote DBA Experts &#187; Performance Problems</title>
	<atom:link href="http://www.remotedbaexperts.com/Blog/tag/performance-problems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.remotedbaexperts.com/Blog</link>
	<description>Remote DBA Experts Blog</description>
	<lastBuildDate>Tue, 07 Feb 2012 14:42:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Let’s Get Technical! – Using Deductive Reasoning and Communication Skills to Identify and Solve Performance Problems</title>
		<link>http://www.remotedbaexperts.com/Blog/2009/11/let%e2%80%99s-get-technical-%e2%80%93-using-deductive-reasoning-and-communication-skills-to-identify-and-solve-performance-problems/</link>
		<comments>http://www.remotedbaexperts.com/Blog/2009/11/let%e2%80%99s-get-technical-%e2%80%93-using-deductive-reasoning-and-communication-skills-to-identify-and-solve-performance-problems/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 17:00:33 +0000</pubDate>
		<dc:creator>Chris Foot</dc:creator>
				<category><![CDATA[Tips from the Oracle Ace]]></category>
		<category><![CDATA[Application Architecture]]></category>
		<category><![CDATA[DBA Best Practices]]></category>
		<category><![CDATA[Let's Get Technical]]></category>
		<category><![CDATA[Oracle Ace]]></category>
		<category><![CDATA[Performance Problems]]></category>

		<guid isPermaLink="false">http://www.remotedbaexperts.com/Blog/?p=716</guid>
		<description><![CDATA[Those that excel at tuning understand that the tuning process starts with an understanding of the problem and continues with the DBA collecting statistical information. Information collection begins at a global level and then narrows in scope until the problem is pinpointed. Part 1 of this series provides hints and tips that can be used [...]]]></description>
			<content:encoded><![CDATA[<p>Those that excel at tuning understand that the tuning process starts with an understanding of the problem and continues with the DBA collecting statistical information. Information collection begins at a global level and then narrows in scope until the problem is pinpointed. Part 1 of this series provides hints and tips that can be used to determine what architectural component is causing the problem. In subsequent blogs, we’ll learn how to use the toolsets provided in Oracle9I, Oracle10G and Oracle 11G to continue the investigation.</p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>Introduction</strong><br />
Remember the old days? When the applications our customers used were simple and problem determination was easy? The days of true client server application architectures that consisted of a fat client application running on the PC, a network and a database. High-level performance problem determination was a breeze. It was either the PC, the network or the database. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">Well, we all know those days are looong gone. We can also agree that application complexity will continue to grow and continue to complicate the problem determination process. From Service Oriented Architectures and BPEL to advanced disk drive hardware configurations (and everything in-between), our environments are growing more challenging by the moment.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>Performance Problem Analysis &#8211; System Triage</strong><br />
One of the common mistakes that is often made during a tuning exercise is not gathering enough high level information during the initial stages of the problem determination process. I often have the same issue. I get an inkling of what I think the problem is and jump right in. As I stated in my introduction, the key to success is to begin the analysis at a high level and then continue by narrowing the scope of information collection until the problem is identified. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">Once the problem is identified, we tune and tweak, record the same statistics we used to identify the problem and compare the before and after information. This iteration of recording/changing/recording comparing is done again (and again) until the problem is corrected. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>Asking the Right Questions to Help Identify the Problem</strong><br />
OK, so you have been called about a performance problem. What do you do? Suggestion &#8211; blame the network! OK, I&#8217;m kidding. What you need to do is contact the parties affected by the problem and perform a little detective work.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">Before we continue, let&#8217;s take a quick look at the <a href="http://www.remotedbaexperts.com/Blog/wp-content/uploads/2009/11/data_flow.gif">application architecture diagram </a>for the sample application that we&#8217;ll be using in this discussion. It is a simple multi-tier application that uses a lightweight application on the PC, a workload balancer (CoyotePoint, HydraWeb, etc.), one or more web/application servers and finally, an Oracle database back end. Denver and Atlanta are remote sites while the application hardware, additional business users and you are located in Dallas. Like most applications, each site runs a common set of programs with a few programs that are site specific. We also can assume that most load balancers are configured to transfer connections to the least utilized web/application server.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">It&#8217;s 2:30 PM on Friday. You are counting down to the weekend. You&#8217;re thinking to yourself &#8220;this week wasn&#8217;t so bad&#8221; when the phone rings. It&#8217;s Mike the applications manager telling you that users are complaining about poor database performance and you need to fix it. The first question that comes to your mind is &#8220;Why does everyone always assume that it is a database problem?&#8221;</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>The DBA Detective</strong><br />
You decide to begin your detective work by going straight to the end-user (or users) experiencing the problem.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">You ask Mike the manager for the end-user&#8217;s contact information. He gives you the number for the business team lead in Denver. You make the call and begin your interrogation. Your first question is as follows:</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">How many users are affected by the problem?</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>If it is all users at a specific site:</strong><br />
You continue your investigation by calling the other remote site to determine if they are also affected by the problem. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">If the other remote site is not experiencing the problem, continue you&#8217;re your own investigation but you should also place an emergency call to your friendly network specialists and ask them for help. Explain to them that you have one remote site that is running fine, while the other site is affected by poor application performance.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">If the other remote site is also experiencing the problem, call one of your favorite users in Dallas. Since the hardware for the application is also in Dallas, this is an easy way to determine if the problem is localized to just the remote sites. Ask the user in Dallas if they can run the application. If the Dallas users are running fine, the performance of the remote network is now a suspect. Once again, continue your own investigation but also ask assistance from network support.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>If all sites are affected:</strong><br />
The list of possible suspects now grows. It could be any piece of the puzzle &#8211; network, load balancing, application server, database, hardware server. One of the tricks I have used to assist in my analysis of performance sensitive applications is to talk with the application developers and ask them to send me a half dozen to a dozen performance sensitive SQL statements from their application that don&#8217;t perform data updates. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">I will try and mimic the application as closely as possible. If the application is using stored procedures, it&#8217;s easy, I&#8217;ll create my own stored procedure. If the application uses bind variables, I&#8217;ll code my program to use bind variables. Here&#8217;s <a href="http://www.remotedbaexperts.com/Blog/wp-content/uploads/2009/11/input_variables.txt">an example</a> of how to use inline input to SQL bind variables that will be executed in SQL*PLUS. Please note that executing a SQL statement in SQL*PLUS requires that you define both input and output variables. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">I&#8217;ll run the statement when performance is good with timing on in SQL*PLUS to get a baseline. When I&#8217;m troubleshooting a performance problem, I&#8217;ll execute the SQL statements and compare their performance against my baseline. I like to run the statements twice, once from my PC and another execution on the database server itself. If it runs fine on the database server yet runs poorly from my PC, the network is once again one of my prime suspects.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">I&#8217;ll l continue my own quick database ecosystem (database, operating system, hardware server) triage before contacting other units. I&#8217;ll be looking at CPU, memory and disk utilization and identifying processes that are consuming large amounts of resources. I&#8217;ll log on to the database itself and look at top SQL, session waits, locking and system event statistics for more information. If the database is 10G/11G, I&#8217;ll use an entirely different set of tools than I would with 9I. I&#8217;ll cover the different toolsets in upcoming blogs. I want to continue to focus on high-level investigation activities in this blog.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">If the statements run close to the baseline from both my PC and on the database server and my initial review of the database ecosystem looks like it is working as it should, I don&#8217;t immediately rule it out as the cause. But it will affect the way I continue my analysis. Before I begin my own more detailed database ecosystem performance analysis, I will contact the technicians responsible for the application and network tiers. All groups involved can work in unison to identify the problem. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">I&#8217;ll ask the folks responsible for the application tier to log on to their web/application servers and review the same CPU, memory and disk utilization statistics that I would on a database server. The application tier folks can also review connection input/output queues. I will also ask them to compare performance statistics amongst all hardware components of the web/application tier. If one web/application server is at 100% utilization while the others are at 20%, the workload balancer now becomes one of the suspects. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">I will also ask the network and server specialists to review network performance of all hops from the database server to the remote and local sites. As I stated previously, I don&#8217;t arbitrarily rule out the database ecosystem if the SQL statement runs fine on the server, but I know that other components of the application also need to be investigated.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;"><strong>If it is a select group of users having a problem:</strong><br />
If Mike the Manager states that only a subset of users is experiencing a problem, you will need to identify the specific transactions they are executing. It&#8217;s time to talk one-on-one with a business user that is having the problem. If only one user is experiencing the problem, ask them if they can log on to the application using a fellow user&#8217;s computer and execute the same transaction. If performance is acceptable, ask the user to run other transactions. If they continue to run with acceptable performance, ask them to log on to their original PC and run an additional workload. If performance is once again poor, their PC and/or network connection could be the culprits.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">If it is a group of users, or the user continues to experience poor performance on all PCs they try, it&#8217;s time to get the developers involved and ask a few more questions:</span></p>
<ul>
<li><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">Is it the entire application running slow or just specific screens/transactions?</span></li>
<li><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">How much slower is it?</span></li>
<li><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">Is the problem intermittent or continuous?</span></li>
<li><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">Has this problem occurred before?</span></li>
<li><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">If so, is it getting worse?</span></li>
<li><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">Does the problem occur at the same time every day?</span></li>
</ul>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">After the line of questioning is complete, you will need to determine exactly what transaction is causing the problem. It&#8217;s a relatively simple process if all users come in with unique accounts and/or program identifiers. Log on to Grid Control or 9I OEM, ask the user to log on and look at the sessions or top sessions screens. Both 9i OEM and GRID Control provide components that allow you to drill down and identify what SQL statements a specific transaction is executing. In addition, both toolsets provide screens that show database locking information. </span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">An application that uses a common ID and program complicates the problem identification process. Having an application developer on hand that knows the SQL being executed by the various transactions can be invaluable. Oracle 9I, Oracle 10G and Oracle11G provide components that allow you to monitor the current SQL being executed. More on that later&#8230;</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">As I stated previously, I don&#8217;t&#8217; want to get too in-depth in this blog. In upcoming blogs, we&#8217;ll take a look at what tools you can use to identify poor performance when you find out that it is your database causing the problem.</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">The intent of this blog was not to persuade you to follow the steps it provides verbatim, it was to provide you with a few high-level recommendations to help you quickly determine what component is causing the problem. Look for more detailed information in upcoming blogs.<br />
</span></p>
<p><span style="font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;">Thanks for Reading,</span></p>
<p><strong>Chris Foot<br />
Oracle Ace<img style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 100%; vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; max-width: 100%; background-position: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" title="ace_2" src="http://www.remotedbaexperts.com/Blog/wp-content/uploads/2009/07/ace_2.gif" alt="ace_2" width="12" height="12" /><br />
Director Of Service Delivery</strong><br />
<img style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 100%; vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: transparent; max-width: 100%; background-position: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" src="http://www.remotedbaexperts.com/Blog/wp-content/uploads/2009/07/RDBAELOGO.gif" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.remotedbaexperts.com/Blog/2009/11/let%e2%80%99s-get-technical-%e2%80%93-using-deductive-reasoning-and-communication-skills-to-identify-and-solve-performance-problems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

