<?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>Ardent Performance Computing &#187; Linux</title>
	<atom:link href="http://www.ardentperf.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ardentperf.com</link>
	<description>Jeremy Schneider</description>
	<lastBuildDate>Mon, 16 Jan 2012 06:04:02 +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>RAC Attack &#8211; Oracle Cluster Database at Home</title>
		<link>http://www.ardentperf.com/2011/05/17/rac-attack-oracle-cluster-database-at-home/</link>
		<comments>http://www.ardentperf.com/2011/05/17/rac-attack-oracle-cluster-database-at-home/#comments</comments>
		<pubDate>Tue, 17 May 2011 15:17:13 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=1219</guid>
		<description><![CDATA[First of all, the RAC Attack deep dive at Collaborate went great &#8211; thanks to everyone who participated! The room was full (20 participants) and I got evaluations from about half of them. Here&#8217;s a summary of the eval results: 100% class met expectations, would recommend to others 66% easy to follow, could use skills [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, the RAC Attack deep dive at Collaborate went great &#8211; thanks to everyone who participated!  The room was full (20 participants) and I got evaluations from about half of them. Here&#8217;s a summary of the eval results:</p>
<ul>
<li>100% class met expectations, would recommend to others</li>
</ul>
<ul>
<li> 66% easy to follow, could use skills in working environment</li>
</ul>
<ul>
<li> 100% already familiar with oracle, 90% use oracle daily</li>
</ul>
<ul>
<li> 0 negative reviews of instructor (phew!)</li>
</ul>
<ul>
<li> 1 negative review of curriculum: said practice exercises weren&#8217;t relevant but training manual was still above average.</li>
</ul>
<ul>
<li>0 negative &#8220;comments&#8221;</li>
</ul>
<p>There were several positive comments such as this: &#8220;I would recommend this class to others. This setup is perfect to     pick up new skills and expose what ifs w/out worrying about pressing     the wrong button.&#8221;</p>
<p>There were also some suggestions for improvements which I&#8217;ve taken note of. The most common suggestion was this: &#8220;More time to practice / explore new concepts.&#8221;</p>
<h4>What&#8217;s Next</h4>
<p>The RAC Attack curriculum has been around for over three years now &#8211; and I&#8217;m still getting requests to put it on.  Seems that a number of people have felt that it&#8217;s a decent quality class and handbook.  I talked to several other Oracle instructors and speakers at Collaborate this year about the RAC Attack curriculum &#8211; including an in-depth conversation with <a href="http://arup.blogspot.com/">Arup Nanda</a>.</p>
<p>As a result of these conversations, I did some careful thinking and I&#8217;ve been very busy for the past few weeks since Collaborate.  And I now have three major announcements about RAC Attack:</p>
<p><span id="more-1219"></span></p>
<ol>
<li>Last week, I published an <a href="http://www.ardentperf.com/downloads/">updated RAC Attack Lab Handbook</a>.  The handbook is now <strong>completely self-contained for home use</strong>.  I&#8217;ve added significant new content:
<ul>
<li>Detailed hardware requirements (taking into consideration optimal I/O and memory configuration)</li>
<li>How to install and setup VMware environment (including networking and storage)</li>
<li>How to create the RAC Attack Classroom DVD (this is actually scripted now)</li>
</ul>
</li>
<p>This means that you can now (finally) setup RAC Attack on your own computer &#8211; without needing any external assistance!</p>
<li>Although I created most of the labs for RAC Attack, some labs were also contributed by <a href="http://www.dannorris.com/">Dan Norris</a> and Parto Jalili.  Last week I also obtained their permission to move all RAC Attack content under a Creative Commons Attribution-ShareAlike license &#8211; which you will see in the latest handbook.The RAC Attack lab handbook has now been <strong>donated to the Oracle professional community</strong> with a solid copyleft license.
<ul>
<li>New DBAs are invited to use this material at home.</li>
<li>Experienced DBAs are invited to make corrections and enhancements to the textbook.  Also you can add your own labs which work on the RAC Attack &#8220;platform&#8221;.</li>
<li>Instructors are invited to use this material partially or completely in their own classes, as they wish.  You can even run your own class based solely on this material &#8211; without needing anyone&#8217;s permission.  Also, you can charge for these classes &#8211; there isn&#8217;t a &#8220;non-commercial&#8221; limitation on the terms of our license.</li>
</ul>
</li>
<p>On a related note, all code related to RAC Attack (including the jumpstart scripts and supplemental DVD build script) is now under the GPL and has been published on <a href="https://github.com/ardentperf/racattack">github</a> for easy downloading, copying and branching.</p>
<li>Finally&#8230; how are you supposed to make corrections, enhancements and additions if you&#8217;ve only got a PDF version?  Right now the textbook sources are in OpenOffice format (with a master document and about 50 lab documents).  Although this is very well suited to print media, it&#8217;s difficult to coordinate with very many authors or editors.  I&#8217;ve decided that the best way to truly encourage collaboration with other teachers &amp; instructors is to use the best platform on the web for collaborative open-content textbook projects: <strong>the RAC Attack lab textbook has a new home on wikibooks</strong>.
<p><a href="http://en.wikibooks.org/wiki/RAC_Attack_-_Oracle_Cluster_Database_at_Home">http://en.wikibooks.org/wiki/RAC_Attack_-_Oracle_Cluster_Database_at_Home</a></p>
<p>I&#8217;m just getting started now &#8211; but I&#8217;m hoping to have all existing RAC Attack content on this wiki textbook by the end of the month.  Please have a look at the project page and consider getting involved!</li>
</ol>
<h4>Feedback</h4>
<p>I consider these to be some major changes.  I&#8217;ve put some careful thought into them, and I&#8217;m excited about the new direction for this class.  Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2011/05/17/rac-attack-oracle-cluster-database-at-home/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mysterious Oracle Net Errors</title>
		<link>http://www.ardentperf.com/2010/09/08/mysterious-oracle-net-errors/</link>
		<comments>http://www.ardentperf.com/2010/09/08/mysterious-oracle-net-errors/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 18:53:00 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=1028</guid>
		<description><![CDATA[Yesterday, I had a fight to the death with a nasty Oracle Net problem. The battle consumed a little more of the day than I intended&#8230; but it was worthwhile for the sweet taste of victory. Everything started with this short, innocent-seeming instant message: there is something wrong with a 10g server config. connecting to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I had a fight to the death with a nasty Oracle Net problem. The battle consumed a little more of the day than I intended&#8230; but it was worthwhile for the sweet taste of victory.</p>
<p>Everything started with this short, innocent-seeming instant message:</p>
<blockquote><p>there is something wrong with a 10g server config. connecting to it from windows works, the linux instant client returns ORA-28547. the same linux client can connect to 9g installation though. google is not helpful, does anyone have an idea?</p></blockquote>
<p>Seems like a simple question!  But we ended up chatting on-and-off throughout the whole day as I helped troubleshoot the problem.  We finally found the problem at the end of the day &#8211; and I promise you that it would have taken Oracle Support weeks (or even months) to find this problem.  Yikes!</p>
<h4>Troubleshooting Summary</h4>
<p>The client was php on a linux box.  This client was connecting to the database server over a network connection which includes a VPN tunnel.  The database is being upgraded from 9i to 10g &#8211; and the new database is already running on a new server.  The client can connect to the 9i database but it can&#8217;t connect to the 10g database.  The developer also has a windows box with an oracle client; this windows box can connect to the 10g database over the network link just fine.  TNSNAMES is not used, and all connect strings are identical except for the IP addresses.  The 11g instant client for Linux is being used.</p>
<p>Our investigation process involved a lot of trial-and-error.  We repeated this cycle: gather data, postulate a theory, suggest an action.  We knew that we were close because often the error messages would change &#8211; but they didn&#8217;t go away!  For posterity (and google), here are the errors we encountered:</p>
<ul>
<li>ORA-28547: connection to server failed, probable Oracle Net admin error</li>
<li>ORA-12170: TNS:Connect timeout occurred</li>
<li>ORA-03113: end-of-file on communication channel</li>
<li>WARNING: inbound connection timed out (ORA-3136)</li>
<li>Fatal NI connect error 12170.</li>
<li>TNS-12535: TNS:operation timed out / ns secondary err code: 12606</li>
<li>ntt2err:Read unexpected EOF ERROR on 7</li>
<li>ORA-12537 or TNS-12537: TNS: connection closed  / ns2: 12560</li>
</ul>
<p>We started with simple changes before looking into deep logs or tracefiles.  I didn&#8217;t have any access to the actual system, just a chat connection to the developer.  And of course I was hoping for a quick fix&#8230; though it didn&#8217;t end up happening.  But FWIW, here&#8217;s everything we tried:<span id="more-1028"></span></p>
<ul>
<li>Double-check that TNSNAMES or connection string is correct</li>
<li>If RAC, then check REMOTE SERVER connect string in LSNRCTL output (this comes from local_listener/remote_listener settings)</li>
<li>Add server hostname to local client DNS.  (Connect string used IP, but server might pass back hostname for re-connect during connection process.)</li>
<li>Check if DB server is behind a firewall, client seeing IP address different than server &#8211; see metalink note 270096.1 (can possibly address on 10g+ with DIRECT_HANDOFF_TTC_ in listener.ora or USE_SHARED_SOCKET in windows registry)</li>
<li>Attempt to <strong>disable</strong> shared-socket/direct-handoff.  (Trace revealed that the working 9i connection didn&#8217;t bequeath its connection but broken 10g connection did.)</li>
<li>Downgraded instant client from 11g to 10g (to match target database)</li>
<li>Check if there&#8217;s a software firewall active on the database server</li>
</ul>
<p>To gather data, of course we first just captured error messages from the client.  Later, we checked the server sqlnet.log, alert log, bdump/udump, and windows OS event log for messages.  The developer I was working with was very savvy, so I actually had him generate some client trace files fairly early on &#8211; from both working and non-working connections.</p>
<p>We heavily leveraged the two working connections (linux->9i and windows->10g) by comparing tracefiles.  In the end, these tracefiles tipped us off to the real problem.</p>
<h4>Infuriating</h4>
<p>I expected a quick, easy answer &#8211; but it wasn&#8217;t.  It drove me crazy all day.</p>
<p>From the beginning it was obviously some kind of networking problem.  The database was running on a windows server, so my first thought was that it was related to the re-connect that happens when the listener hands off the connection to the database process.  But the trace file revealed that 10g was actually bequeathing (or rather, sharing) the connection &#8211; shame on me for not keeping up to speed with Oracle/Windows developments!!  (I usually work with unix environments.)</p>
<p>Generating a client trace is easy &#8211; you just edit (or create) the text file sqlnet.ora and add two lines TRACE_DIRECTORY_CLIENT and TRACE_LEVEL_CLIENT <a href="http://www.juliandyke.com/Diagnostics/Trace/NetTrace.html">(detailed description)</a>.  If you&#8217;re using the instant client then you can set the environment variable TNS_ADMIN to the directory containing this file.</p>
<p>Here are a few lines from the client trace we generated:</p>
<pre><code>2010-09-07 20:41:00.451918 : nscall:connecting...
2010-09-07 20:41:00.452854 : nsopen:opening transport...
2010-09-07 20:41:00.453086 : nttcni:Tcp conn timeout = 60000 (ms)
2010-09-07 20:41:00.504377 : nttcni:connected on ipaddr 10.10.0.97
2010-09-07 20:41:00.506948 : nscon:doing connect handshake...
<span style='background-color:#DFDFDF'>2010-09-07 20:41:00.506979 : nscon:sending NSPTCN packet</span>
2010-09-07 20:41:00.507113 : nttwr:socket 7 had bytes written=233
2010-09-07 20:41:00.567169 : nttrd:socket 7 had bytes read=8
<span style='background-color:#DFDFDF'>2010-09-07 20:41:00.567434 : nscon:got NSPTRS packet
2010-09-07 20:41:00.567692 : nscon:sending NSPTCN packet</span>
2010-09-07 20:41:00.567817 : nttwr:socket 7 had bytes written=233
2010-09-07 20:41:00.617139 : nttrd:socket 7 had bytes read=32
<span style='background-color:#DFDFDF'>2010-09-07 20:41:00.617362 : nscon:got NSPTAC packet</span>
2010-09-07 20:41:00.617453 : nscon:connect handshake is complete
<span style='background-color:#DFDFDF'>2010-09-07 20:41:00.620093 : nsdofls:sending NSPTDA packet</span>
2010-09-07 20:41:00.620253 : nttwr:socket 7 had bytes written=156
2010-09-07 20:41:00.667129 : nttrd:socket 7 had bytes read=127
<span style='background-color:#DFDFDF'>2010-09-07 20:41:00.667359 : nsrdr:got NSPTDA packet</span>
2010-09-07 20:41:00.670112 : nttfpwr:socket 7 had bytes written=47
2010-09-07 20:41:00.717287 : nttfprd:socket 7 had bytes read=181
2010-09-07 20:41:00.719612 : nttfpwr:socket 7 had bytes written=2011
2010-09-07 20:41:00.720401 : nttfpwr:socket 7 had bytes written=666
<span style='background-color:#DFDFDF'>2010-09-07 20:42:01.577217 : ntt2err:Read unexpected EOF ERROR on 7</span></code></pre>
<p>The presence of NSPTRS indicates that the connection is being bequeathed/shared on the server.  Metalink notes 270096.1 and 1007807.1 are very helpful for understanding this handshake process.  Here&#8217;s a brief outline of what&#8217;s happening:</p>
<table>
<tr>
<th>Client</th>
<th>Server</th>
</tr>
<tr>
<td>Connect (nsptCN)</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Re-Send (nsptRS)</td>
</tr>
<tr>
<td>Connect (nsptCN)</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Acknowledge (nsptAK)</td>
</tr>
<tr>
<td>Data (nsptDA)</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Data (nsptDA)</td>
</tr>
<tr>
<td>DEATH!!</td>
<td>DEATH!!</td>
</tr>
</table>
<p>One other important piece of information we eventually unearthed was this error in sqlnet.log on the <strong>server</strong>:</p>
<pre><code>Fatal NI connect error 12170.
...
  Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12606</code></pre>
<p>Both the server and client were seeing the connection spontaneously die!  Yet the client connects fine to a 9i database, and a different client connects fine to this database!!  Right about now, I was thinking of two possible root causes:</p>
<ol>
<li>Rogue firewall somewhere that&#8217;s killing the connection for some unknown reason.  But the developer is pretty sure that there&#8217;s no firewall killing connections.</li>
<li>Bug?!</li>
</ol>
<h4>Breakthrough</h4>
<p>At this point I asked the developer to run a level 16 client trace (which includes packet dumps) and I started reading through the dump.  Then I noticed two important things.</p>
<ol>
<li>There is a 60 second pause before the client detects the dead connection.  This is equal to the TCP connection timeout.  I suddenly realized that the client &#8220;EOF&#8221; error was not from the server terminating the connection &#8211; the client was <em>timing out</em> while waiting for the server.  And then I realized that the server was doing the same thing &#8211; waiting for the client!</li>
<li>I looked a lot closer at a certain section of the tracefile that immediately precedes this timeout.  In particular, I looked at the packet contents and sizes &#8211; and I compared with the working 9i connection.</li>
</ol>
<p>Here&#8217;s a snip from the diff between the working 9i connection and the broken 10g connection:</p>
<pre><code><span style='background-color:#DFDFDF'> nttfpwr:socket 7 had bytes written=47</span>
-nttfprd:socket 7 had bytes read=164
-nscontrol:Vect I/O support: 02010-09-07 20:48:06.447554 : nscontrol:cmd=44, lcl=0x0
-nttfpwr:socket 7 had bytes written=1080
-nttfprd:socket 7 had bytes read=949
-nttfpwr:socket 7 had bytes written=213
-nttfprd:socket 7 had bytes read=22
<span style='background-color:#DFDFDF'>+nttfprd:socket 7 had bytes read=181
+nscontrol:Vect I/O support: 02010-09-07 20:52:12.267498 : nscontrol:cmd=44, lcl=0x0
+nttfpwr:socket 7 had bytes written=2011
+nttfpwr:socket 7 had bytes written=666
+ntt2err:Read unexpected EOF ERROR on 7</span></code></pre>
<p>When I looked at the packet contents for the broken connection, it was immediately evident that those TWO packets (2011 bytes and 666 bytes) were ONE message.  The message was too large for one packet so it had been fragmented.</p>
<p>However the first big message sent to the 9i database is 1080 bytes.  It gets sent in a single packet.</p>
<p>I asked the developer, what&#8217;s the max packet size on the Linux box?  He replied that the MTU was 1456.</p>
<p><strong>WILD guess&#8230;</strong> I wondered, was the big packet getting dropped somewhere?  (Windows client trace shows the large packet getting through without any problem, but still&#8230;)</p>
<h4>Oracle is Better than MySQL</h4>
<p>&#8230;ok, maybe the standard MySQL client has this functionality too &#8211; I actually don&#8217;t know.  I just wrote that title because it&#8217;s provocative!!  But when it comes to tweaks, Oracle really does shine.  It has more switches and knobs than you&#8217;d believe.</p>
<p>It&#8217;s very simple to reduce the max packet size in the Oracle client: just add &#8220;(SDU=####)&#8221; to the connect string.  The default is 2048 &#8211; which explains the fragment sizes we observed.</p>
<p>Here&#8217;s what transpired next in my chat (please excuse the language):</p>
<blockquote><p>f**k me<br />
just tried with 1024 and it worked
</p></blockquote>
<p>Seems that we identified the problem!  And most importantly, we have a working connection so that this developer can get back to what&#8217;s important &#8211; coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2010/09/08/mysterious-oracle-net-errors/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>RAC Investigation on Low-Memory Linux</title>
		<link>http://www.ardentperf.com/2010/09/02/rac-investigation-on-low-memory-linux/</link>
		<comments>http://www.ardentperf.com/2010/09/02/rac-investigation-on-low-memory-linux/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 19:05:44 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=987</guid>
		<description><![CDATA[Back in the Oracle 9i days, I was one of those people who got on eBay to buy firewire PCI cards and disks that could do non-exclusive login.  Remember that?  The first time a little test cluster could be cheap enough for the home enthusiast?  I still have the parts in my closet. Of course, [...]]]></description>
			<content:encoded><![CDATA[<p>Back in the Oracle 9i days, I was one of those people who got on eBay to buy firewire PCI cards and disks that could do non-exclusive login.  Remember that?  The first time a little test cluster could be cheap enough for the home enthusiast?  I still have the parts in my closet.</p>
<p>Of course, we all know what happened after that &#8211; virtualization.  It didn&#8217;t take long before my home-built test clusters were running on VMware.  (Personally, I think that virtualization really started because of those NES and SNES emulators.  Most great achievements start with a geek who wants to play more video games.)  There are lots of people now who run RAC on virtual environments and it&#8217;s easy to find tutorials on the web for many different OS and VM combinations.</p>
<h4>Low-Memory Linux</h4>
<p>Something I haven&#8217;t seen many other people do is RAC with a very small memory configuration.  Like 760M of memory per server.  (!)  Of course you&#8217;d only do this for a hobby setup &#8211; never on a system where you want any kind of support.  But I&#8217;m kinda cheap&#8230; and running RAC on these small VMs means that I don&#8217;t have to go buy an expensive new home computer.  My current gateway laptop with Vista Home does the job quite nicely!</p>
<p>10.2 and 11.1 RAC will install and run on servers with 760M of memory.  But things were a little unstable at first.  Now I&#8217;m the curious type&#8230; I like to fiddle with things&#8230; so I investigated a little bit.</p>
<h4>Basic Unix Investigation</h4>
<p>There are two basic investigation scenarios:</p>
<table>
<tr>
<td>what happened in the past</td>
<td>My main tool is <strong>sar</strong> (System Activity Reporter).  Or <a href="http://sourceforge.net/projects/ksar/">Java-based ksar</a> on my desktop &#8211; it gets data via ssh and graphs it.</td>
</tr>
<tr>
<td>what is happening now</td>
<td>My starting point is <strong>vmstat</strong> and <strong>top</strong>.  To dig a little deeper, I might then use other tools like <strong>ps</strong>, <strong>free</strong>, <strong>iostat</strong> or <strong>netstat</strong>.</td>
</tr>
</table>
<p>In this particular case, I noticed pretty quickly from the <strong>top</strong> utility that one process was consuming over 30% of the system&#8217;s memory!  <span id="more-987"></span><em>(Note: in <strong>top</strong>, you can press the &#8216;&lt;&#8217; and &#8216;&gt;&#8217; keys to move the sort column left and right.  The initial sort column is %CPU.  I moved it one column to the right, sorting by %MEM.)</em></p>
<pre><code>top - 18:41:13 up  5:28,  3 users,  load average: 0.04, 0.35, 0.60
Tasks: 180 total,   2 running, 178 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.7%us,  3.7%sy,  0.0%ni, 89.4%id,  6.3%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    767020k total,   754296k used,    12724k free,     7084k buffers
Swap:  1540088k total,   654696k used,   885392k free,   361800k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
<span style='background-color:#DFDFDF'>17435 oracle    RT   0  230m 229m  31m S  0.3 30.6   0:26.21 /u01/crs/oracle/product/11.1.0/crs/bin/ocssd.bin</span>
 7765 oracle    15   0  464m 111m 102m S  0.0 14.9   0:04.52 ora_smon_RAC1
 7743 oracle    -2   0  445m  90m  83m S  0.0 12.1   0:12.01 ora_lms0_RAC1
 7783 oracle    15   0  440m  70m  66m S  0.0  9.4   0:05.35 ora_mmon_RAC1
20321 oracle    15   0  438m  48m  45m S  0.0  6.5   0:00.88 oracleRAC1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
 8676 oracle    16   0  437m  46m  45m S  0.0  6.2   0:02.69 oracleRAC1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
 8801 oracle    15   0  440m  44m  41m S  0.0  6.0   0:04.57 ora_cjq0_RAC1</code></pre>
<p>This process (ocssd) is Oracle&#8217;s <em>Cluster Synchronization Services</em> Daemon.  It&#8217;s the process that sends and receives heartbeats from other nodes.  Any delays sending or receiving those heartbeats can cause node evictions (a.k.a. server reboots) &#8211; so it&#8217;s a pretty important process!  That&#8217;s why it runs with realtime (RT) scheduling priority, as you can see in the above output from <strong>top</strong>.</p>
<p>I was surprised that CSS uses so much physical memory &#8211; usually Linux is very good at memory management.  In <strong>top</strong>, the VIRT column shows how much total memory each process is using, while the RES column shows how much actual physical memory Linux has allocated to it.  It&#8217;s clear that Linux is pretty actively managing the physical memory for other processes.</p>
<p>A quick glance at <strong>vmstat</strong> shows that although we are actively swapping, it seems under control.  This is about what I&#8217;d expect when we&#8217;re idle and all of the processes except CSS are sharing only 500M of memory:</p>
<pre><code>collabn1:/home/oracle[RAC1]$ vmstat 5
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0 604144  14024  34948 300632    0    0    32    86 1044 1797  1  8 84  7  0
 2  1 603912  11224  34968 303968   87    0   763    81 1083 1902  3 11 56 30  0
 0  0 604840  12660  34912 303904   25    0   253    38 1050 1975  2 11 69 18  0
 0  0 604840  12728  34924 303900    0    0    68   106 1043 1975  1  9 82  8  0
 0  0 604784  14536  34936 304140   19    0    89    71 1043 2042  1  5 81 13  0
 1  0 604752  14168  34944 304496    6    0   119    21 1040 2016  2  8 80 11  0
 0  1 604736  18732  35020 306212    0    0   384    73 1050 2489  1 10 70 19  0
 1  1 604736  11144  35232 311252  104    0  1209   128 1074 2024  2 12 38 47  0
 3  1 607900   8056  30788 307352   77 1500   504  1661 1055 2642  9 16 56 19  0
 0  0 607900   9836  30800 307360    0    0    71    70 1031 1798  1  6 85  8  0
 1  0 607884  10536  30812 307400    8    0    44    93 1031 1832  1  4 87  8  0</code></pre>
<p>The SO column tells us when memory is written to disk (and removed from physical).  The SI column tells us when memory is read from disk (and put back in physical).  On a side note, remember that on a healthy Unix system the free memory is always small.  Sometimes this is confusing at first.</p>
<h4>Linux Process Memory Investigation</h4>
<p>Nonetheless, I&#8217;m not happy that CSS is using 30% of my physical memory in this highly-constrained hobby environment.  Why is Linux allowing this?  The first clue comes simply from the output of the familiar unix <strong>ps</strong> utility:</p>
<pre><code>collabn1:/home/oracle[RAC1]$ ps v -C ocssd.bin
  PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
17435 ?        SLl    0:08      7   588 235331 234840 30.6 /u01/crs/oracle/product/11.1.0/crs/bin/ocssd.bin</code></pre>
<p>On Linux, the &#8220;v&#8221; flag tells ps to give information relevant to virtual memory.  TRS and DRS tell me how much physical (resident) memory is used for machine executable code (text) and data, respectively.  But more importantly &#8211; the STAT column gives some informative BSD-style flags about the process.  That capital-L indicates that CSS has some pages that are locked into physical memory.  Bingo.</p>
<p>If I have root access, then I can get a very detailed report on process memory usage with the <strong>pmap</strong> command.  The output was a little long, so I&#8217;ve abbreviated it here:</p>
<pre><code>[root@collabn1 ~]# pmap -x 17435
17435:   /u01/crs/oracle/product/11.1.0/crs/bin/ocssd.bin
Address   Kbytes     RSS    Anon  Locked Mode   Mapping
00110000     656       -       -       - r-x--  libhasgen11.so
001b4000       8       -       -       - rwx--  libhasgen11.so
<span style='background-color:#DFDFDF'>  ... 37 more library blocks</span>
02a0d000     100       -       -       - rwx--    [ anon ]
02a26000       4       -       -       - --x--    [ anon ]
02a27000   10240       -       -       - rwx--    [ anon ]
03427000       4       -       -       - --x--    [ anon ]
03428000   10240       -       -       - rwx--    [ anon ]
<span style='background-color:#DFDFDF'>  ... 10 more anonymous blocks, half are 10240K</span>
08048000     592       -       -       - r-x--  ocssd.bin
080dc000       4       -       -       - rwx--  ocssd.bin
<span style='background-color:#DFDFDF'>  ... 30 more anonymous blocks, half are 10240K</span>
bfe40000     148       -       -       - rwx--    [ stack ]
bfe65000       8       -       -       - rw---    [ anon ]
-------- ------- ------- ------- -------
total kB  235920       -       -       -</code></pre>
<p>Interestingly, the linux <strong>pmap</strong> utility does not indicate any locked memory!  I don&#8217;t know whether that output column is non-functional or if it refers only to some particular kind of locking.  But at any rate, I know <em>something</em> is locked.  I couldn&#8217;t think of anything better, so the next place I looked was in the Linux /proc pseudo-filesystem.</p>
<pre><code>collabn1:/home/oracle[RAC1]$ grep Vm /proc/17435/status
VmPeak:   235924 kB
VmSize:   235920 kB
<span style='background-color:#DFDFDF'>VmLck:    235920 kB</span>
VmHWM:    234844 kB
VmRSS:    234840 kB
VmData:   202272 kB
VmStk:       156 kB
VmExe:       592 kB
VmLib:     31960 kB
VmPTE:       268 kB</code></pre>
<p>Now we&#8217;re talking. The process has a total of 235920 kB of memory &#8211; and it&#8217;s <em>ALL</em> locked.  On a normal RAC system you&#8217;d want this. Generally, important realtime processes should be locked so that they are never delayed by paging or swapping.  (Remember how that could cause node reboots?)</p>
<p>But I personally doubt that all of the memory really NEEDS to be locked, and I think that Linux will actually do a decent job of not swapping the most important parts.  And my highly constrained hobby environment will probably run much smoother if Linux has more flexibility when managing a measly 760M of memory.</p>
<h4>Unlocking Linux Process Memory</h4>
<p>But is it actually possible to unlock the process memory?  As far as I know, Oracle provides no option to disable CSS memory locking.  (For good reason.)  There is the <a href="http://linux.die.net/man/2/munlockall">system call munlockall()</a> &#8211; which unlocks all of a particular processes&#8217; memory.  But the CSS process itself would have to call this function.  And of course it will not.  Or will it?</p>
<p>If you&#8217;ve got root, then there&#8217;s a hacker-back-door way of doing this.  Remember, you&#8217;d be crazy to try this anywhere besides a dark closet at home.  And if you type too slow then CSS could reboot your machine.  </p>
<p>But watch this&#8230;</p>
<pre><code>[root@collabn1 ~]# grep Vm /proc/17435/status
VmPeak:   235924 kB
VmSize:   235920 kB
VmLck:    235920 kB
VmHWM:    234844 kB
VmRSS:    234840 kB
VmData:   202272 kB
VmStk:       156 kB
VmExe:       592 kB
VmLib:     31960 kB
VmPTE:       268 kB

[root@collabn1 ~]# gdb -p 17435 &lt;&lt;EOF
&gt; call munlockall()
&gt; quit
&gt; EOF

GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu".
Attaching to process 17435
Reading symbols from /u01/crs/oracle/product/11.1.0/crs/bin/ocssd.bin...done.
<span style='background-color:#DFDFDF'>  ... 17 more Reading/Loading symbols.</span>
[Thread debugging using libthread_db enabled]
[New Thread 0xb7f629f0 (LWP 17435)]
<span style='background-color:#DFDFDF'>  ... 19 more New Threads.</span>
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libnsl.so.1...done.
<span style='background-color:#DFDFDF'>  ... 13 more Loaded/Reading symbols.</span>
0x008e7402 in __kernel_vsyscall ()
(gdb) $1 = 0
(gdb) The program is running.  Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /u01/crs/oracle/product/11.1.0/crs/bin/ocssd.bin, process 17435

[root@collabn1 ~]# grep Vm /proc/17435/status
VmPeak:   235924 kB
VmSize:   235920 kB
VmLck:         0 kB
VmHWM:    234844 kB
VmRSS:    234840 kB
VmData:   202272 kB
VmStk:       156 kB
VmExe:       592 kB
VmLib:     31960 kB
VmPTE:       268 kB</code></pre>
<p>Ha. This is something you won&#8217;t find on metalink. After generating some activity on the system, the <strong>top</strong> utility shows me that Linux has significantly reduced the physical memory used by CSS.</p>
<p>These days I&#8217;ve actually scripted this for my home and classroom VM environments.  I haven&#8217;t done a careful comparison or analysis, but it really has seemed to me that my low-memory Linux systems run noticeably smoother.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2010/09/02/rac-investigation-on-low-memory-linux/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Future of OCFS2</title>
		<link>http://www.ardentperf.com/2009/02/05/future-of-ocfs2/</link>
		<comments>http://www.ardentperf.com/2009/02/05/future-of-ocfs2/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 01:01:16 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=698</guid>
		<description><![CDATA[At the company where I&#8217;m working right now, I&#8217;m part of an architecture effort to come up with our standard design for RAC on Linux across the firm. There will be dozens or possibly hundreds of deployments globally using the design we settle on. We&#8217;re internally debating whether or not we should include OCFS2 in [...]]]></description>
			<content:encoded><![CDATA[<p>At the company where I&#8217;m working right now, I&#8217;m part of an architecture effort to come up with our standard design for RAC on Linux across the firm. There will be dozens or possibly hundreds of deployments globally using the design we settle on.</p>
<p>We&#8217;re internally debating whether or not we should include OCFS2 in this design right now, and I&#8217;m curious if anyone has arguments one way or the other to share. Our standard design on Solaris does utilize a cluster filesystem and we would welcome a similar design, but there are some concerns about the readiness, stability and future of OCFS2.</p>
<p>OCFS2 is being considered for these four use cases:</p>
<ul>
<li>database binaries (vs local files or NFS)</li>
<li>diag top (11g) or admin tree (10g) (vs local files or NFS)</li>
<li>archived logs</li>
<li>backups</li>
</ul>
<p><br/></p>
<p>Other files will be stored in ASM.</p>
<p>I have seen mention in blogs such as <a href="http://bigdaveroberts.wordpress.com/ ">http://bigdaveroberts.wordpress.com/</a> of something called ASMFS in 11gR2 and I&#8217;m wondering &#8211; will this feature (if included) have any impact on Oracle&#8217;s commitment to OCFS2 development? Could Oracle conceivably develop a whole new cluster filesystem and put their full weight behind it as they did for ASM storage, leaving OCFS2 as a lower priority for new features and improvements? Has Oracle demonstrated significant commitment to OCFS2 development and support in the past, and is this a mature enough technology for wide-scale deployment?</p>
<p>Just looking for opinions. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2009/02/05/future-of-ocfs2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Robust Software Version Numbering</title>
		<link>http://www.ardentperf.com/2008/12/05/robust-software-version-numbering/</link>
		<comments>http://www.ardentperf.com/2008/12/05/robust-software-version-numbering/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 01:55:51 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=658</guid>
		<description><![CDATA[This article isn&#8217;t directly database-related, but I think it&#8217;s a great software engineering topic so it seemed worth writing about. Right now I&#8217;m involved in a project that involves releasing software packages of a few different flavors. Some of them are other people&#8217;s software that we&#8217;re re-packaging (like oracle database binaries) and some are code [...]]]></description>
			<content:encoded><![CDATA[<p>This article isn&#8217;t directly database-related, but I think it&#8217;s a great software engineering topic so it seemed worth writing about. Right now I&#8217;m involved in a project that involves releasing software packages of a few different flavors. Some of them are other people&#8217;s software that we&#8217;re re-packaging (like oracle database binaries) and some are code that was completely written and is maintained in-house. And as we&#8217;ve been working through the software development process this question has recently come to mind: how should we assign version numbers?</p>
<p>Actually it&#8217;s part of a bigger question of how we develop elegant software &#8211; other related design issues in this project are clear end-to-end traceability (requirement -> source code version -> released binary package), solid change control, integrated testing framework and readiness for automation (build and test). But the one I&#8217;m interested in right now is this: how can I develop a robust version numbering strategy?</p>
<p>First of all, there really isn&#8217;t a one-size-fits-all &#8220;correct&#8221; version numbering scheme. The best way to choose version numbers is influenced by your <a href="http://en.wikipedia.org/wiki/List_of_software_development_philosophies">software development philosophy</a> (and resultant <a href="http://en.wikipedia.org/wiki/Software_development_process">development lifecycle</a>), <a href="http://en.wikipedia.org/wiki/Project_management">project management approach</a> and development team. (Globally distributed informal volunteer network or local engineers on payroll?) So the best solution for my current project might not be the best solution for my next project.</p>
<p>But lets take a closer look at this project. First, a little background on the art of version numbering. <span id="more-658"></span> In the open-source world, <a href="http://lists.xml.org/archives/xml-dev/200112/msg00327.html">many projects follow a three-digit version</a>: <em>MAJOR.MINOR.PATCH</em>. Also, it&#8217;s clear that <a href="http://hubpages.com/hub/Software_Version_Numbers_Explained">the version number is closely tied to the development lifecycle</a>. You can find plenty of example discussion from open-source projects such as <a href="http://kerneltrap.org/Linux/Kernel_Release_Numbering_Redux">the Linux kernel</a>, <a href="http://arstechnica.com/articles/paedia/track-linux.ars/1">Linux desktop distros</a>,  <a href="http://wiki.eclipse.org/index.php/Version_Numbering">Eclipse</a>, <a href="http://apr.apache.org/versioning.html">Apache APR</a> and <a href="http://blog.daemon.com.au/archives/000276.html">FarCry CMS</a>. Before the 2.6 series the linux kernel used an even-odd scheme to distinguish between unstable and stable releases but that has now been abandoned and most people seem to regard this as a good thing.</p>
<p>The best overview of the topic that I could find was <a href="http://en.wikipedia.org/wiki/Software_versioning">the wikipedia article on Software Versioning</a>. The section about pre-release versions does a good job of describing one requirement of my current project. I also found the section about internal version numbers interesting; I&#8217;ve worked on projects in the past with that strategy.</p>
<p>I found an <a href="http://www.linux.com/feature/45507">article on linux.com written by Nathan Willis a few years ago</a> offering some principles. I agree with his first and third suggestions: &#8220;Pick a numbering scheme, then don&#8217;t change it. Ever.&#8221; and &#8220;Make friends with infinity.&#8221; Best to think this thing out at the front end of a project (before 1.1) and you shouldn&#8217;t be bothered by big version numbers. However I don&#8217;t buy his second point about the meaning of the decimal; I think most everyone today is used to the meaning of the decimal in version numbers.</p>
<p>For some alternate viewpoints I came across <a href="http://www.panix.com/~zackw/exbib/2002/June/20">something Zack Weinberg wrote back in 2002</a>. He states strongly that the decimal point isn&#8217;t mathematical, which I agree with. However contrary to his article, in our development lifecycle the test releases do need version numbers. But he has an interesting suggesting of using date-based numbers for development snapshots &#8211; that&#8217;s an interesting idea which I&#8217;ll have to think about. His list if ways to do it wrong has a good point about distinguishing between version x and version x.0 although I&#8217;m not in full agreement with the other list items. I actually find <a href="http://www.gnu.org/prep/maintain/maintain.html#Test-Releases">the GNU suggestion for numbering test versions</a> very interesting &#8211; I&#8217;ll have to give that some thouht. (Tests versions for 4.6 are numbered 4.5.90 &#8211; 4.5.99)</p>
<p>Ultimately I don&#8217;t think either of these two sets of guidelines is robust enough for me &#8211; especially for repackaging the oracle database binaries.  Some of these might seem obvious, but I thought a good place to start might be by listing what I would consider to be requirements for an elegant and robust version numbering scheme:</p>
<ol>
<li>
elegant, clear, understandable version numbers that are as simple as possible
</li>
<li>
support for single-digit or double-digit versions (1,2,3,4 or 1.0, 1.1, 1.2 ,2.0)
</li>
<li>
versions for pre-release builds such as test builds (for the quality process) and early-access beta builds.
</li>
<li>
very clear difference between pre-release and release versions, so someone doesn&#8217;t mistakenly install a pre-release build when they want a production build.
</li>
<li>
names need to sort correctly &#8211; pre-release before release. it&#8217;s critical that RPM and RHN sort them right; it would be nice if unix &#8220;ls&#8221; did too.
</li>
<li>
support for continuing development.  after release 1.0, the 2.0-beta version should sort after release 1.0 and before release 2.0
</li>
<li>
support for special branch versions &#8211; version 1.0+patch12345, where patch12345 is not included in version 2.0 which has different patches
</li>
<li>
clear difference between pre-release and release versions on special branches.
</li>
</ol>
<p><br/></p>
<p>I have to be honest &#8211; this is tough. I&#8217;ll be giving it some thought over the next few weeks. Let me know if you have any suggestions. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2008/12/05/robust-software-version-numbering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsing LISTENER.ORA with awk and sed</title>
		<link>http://www.ardentperf.com/2008/11/28/parsing-listenerora-with-awk-and-sed/</link>
		<comments>http://www.ardentperf.com/2008/11/28/parsing-listenerora-with-awk-and-sed/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 02:18:38 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=640</guid>
		<description><![CDATA[Happy Thanksgiving to everyone in the US! And happy belated thanksgiving to everyone in Canada since you celebrated back at the beginning of October. :) I&#8217;ve been doing a lot of scripting work lately. Although I can&#8217;t write about everything I&#8217;m doing, I would like to post a pattern that I thought could be useful [...]]]></description>
			<content:encoded><![CDATA[<p>Happy Thanksgiving to everyone in the US! And happy belated thanksgiving to everyone in Canada since you celebrated <a href="http://www.thanksgivingnovember.com/canadian-thanksgiving.html">back at the beginning of October</a>.  :)</p>
<p>I&#8217;ve been doing a lot of scripting work lately. Although I can&#8217;t write about everything I&#8217;m doing, I would like to post a pattern that I thought could be useful to other folks. I needed to update some properties in the LISTENER.ORA file from a shell script. The problem is that basically you have to clobber it or properly parse it! Even though I initialized this listener file myself, there is always the possibility that a DBA could manually edit it &#8211; so I didn&#8217;t want to clobber the contents. That means that I had to parse it.</p>
<p>So how do you parse a listener file from a shell script? I came up with a nifty way to tokenize and parse the file through a simple awk script combined with sed &#8211; and it seemed rather useful so I refactored it a few times to apply to more general use cases. I think someone else could use something like this too so I&#8217;m posting it &#8211; do me a favor and keep the reference to ardentperf in there if you copy the code.</p>
<p>There&#8217;s two functions that are basically the same pattern: the first will read an attribute and the second will set one. I&#8217;ve included some examples at the bottom of the post. I&#8217;ve tried to make the awk code portable but so far I&#8217;ve only tested it with gawk and mawk on a few flavors of Linux.<br />
<span id="more-640"></span></p>
<h4>Reading an Attribute</h4>
<pre><code># get a property from stdin (listener.ora format) for a specific listener and
# print it on stdout. this awk script will tokenize the listener file so that
# it can find the property no matter what format the file is in. it will only
# print the first match (for example an address).
#   param 1: top-level property filter (e.g. listener name)
#   param 2: leaf property to get (e.g. host, port, protocol)
# by Jeremy Schneider - ardentperf.com
getlistenerproperty() {
  sed -e 's/=/`=/g' -e 's/(/`(/g' -e 's/)/`)/g'|awk 'BEGIN{level=1} {
    wrote=0
    split($0,tokens,"`")
    i=1; while(i in tokens) {
      if(tokens[i]~"^[(]") level++
      if(tokens[i]~"^[)]") level--
      if(level==1&amp;&amp;i==1&amp;&amp;tokens[i]~"[A-Za-z]") TOP=tokens[i]
      if(toupper(TOP)~toupper("^[ \t]*'"$1"'[ \t]*$")) {
        if(propertylvl) {
          if(level&gt;=propertylvl) {
            if(tokens[i]~"^="&amp;&amp;level==propertylvl) printf substr(tokens[i],2)
              else printf tokens[i]
            wrote=1
          } else propertylvl=0
          found=1
        }
        if(!found&amp;&amp;toupper(tokens[i])~toupper("^[(]?[ \t]*'"$2"'[ \t]*$")) propertylvl=level
      }
      i++
    }
    if(wrote) printf "\n"
  }'
}</code></pre>
<h4>Setting an Attribute</h4>
<p>This uses essentially the same pattern but it sets an attribute instead of reading one. It outputs the new LISTENER.ORA file on stdout.</p>
<pre><code># read stdin (listener.ora format) and change a property for a specific listener,
# writing the updated file on stdout. the function will tokenize the listener file
# on stdin so that it can find the property no matter what format the file is in.
# it will only replace the first match (for example an address).
#   param 1: top-level property filter (e.g. listener name)
#   param 2: leaf property to set (e.g. host, port, protocol, address, etc)
#   param 3: new value of the property
# by Jeremy Schneider - ardentperf.com
setlistenerproperty() {
  sed -e 's/=/`=/g' -e 's/(/`(/g' -e 's/)/`)/g'|awk 'BEGIN{level=1} {
    wrote=0
    split($0,tokens,"`")
    i=1; while(i in tokens) {
      if(tokens[i]~"^[(]") level++
      if(tokens[i]~"^[)]") level--
      if(level==1&amp;&amp;i==1&amp;&amp;tokens[i]~"[A-Za-z]") TOP=tokens[i]
      if(toupper(TOP)~toupper("^[ \t]*'"$1"'[ \t]*$")) {
        if(propertylvl) {
          if(level&gt;=propertylvl) {
            if(!found) {
              if(tokens[i]~"^="&amp;&amp;level==propertylvl) printf "= '$3'"
                else printf "'$3'"
              wrote=1
            }
          } else { printf tokens[i]; wrote=1; propertylvl=0 }
          found=1
        } else { printf tokens[i]; wrote=1 }
        if(!found&amp;&amp;toupper(tokens[i])~toupper("^[(]?[ \t]*'"$2"'[ \t]*$")) propertylvl=level
      } else { printf tokens[i]; wrote=1 }
      i++
    }
    if(wrote||i==1) printf "\n"
  }'
}</code></pre>
<h4>Examples</h4>
<p>First I&#8217;ll setup a sample LISTENER.ORA file that I can use to demonstrate a few different uses:</p>
<pre><code>jeremy@debianvm:~/lsnr$ cat list-ardent.ora
TRACE_LEVEL_ARDENTL1 = ADMIN
TRACE_FILE_ARDENTL1 = listener
TRACE_DIRECTORY_ARDENTL1 = /u01/app/oracle/product/10.2.0/db_1/network/trace
LOG_FILE_ARDENTL1 = listener
LOG_DIRECTORY_ARDENTL1 = /u01/app/oracle/product/10.2.0/db_1/network/log
LOGGING_ARDENTL1 = ON

#SSL_CLIENT_AUTHENTICATION = FALSE
ARDENTL1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.9.8.33)(PORT = 1522))
    (ADDRESS = (PROTOCOL = TCPS)(HOST = 10.9.8.33)(PORT = 2485))
  )

SID_LIST_ARDENTL1 =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = JTEST1)
      (SID_NAME = JTEST1)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
    )
  )

WALLET_LOCATION = (
  SOURCE=
    (METHOD = FILE)
    (METHOD_DATA =
      (DIRECTORY=/home/oracle/Wallet_server))
  )</code></pre>
<p>Now lets look at a few examples of reading properties. Note that &#8211; by design &#8211; it only reads the <em>first</em> match.</p>
<pre><code>jeremy@debianvm:~/lsnr$ cat list-ardent.ora|getlistenerproperty ardentl1 host
 10.9.8.33
jeremy@debianvm:~/lsnr$ cat list-ardent.ora|getlistenerproperty ardentl1 port
 1522
jeremy@debianvm:~/lsnr$ cat list-ardent.ora|getlistenerproperty ardentl1 address
 (PROTOCOL = TCP)(HOST = 10.9.8.33)(PORT = 1522)
jeremy@debianvm:~/lsnr$ cat list-ardent.ora|getlistenerproperty ardentl1 description

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.9.8.33)(PORT = 1522))
    (ADDRESS = (PROTOCOL = TCPS)(HOST = 10.9.8.33)(PORT = 2485))

jeremy@debianvm:~/lsnr$ cat list-ardent.ora|getlistenerproperty ardentl1 ardentl1

  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.9.8.33)(PORT = 1522))
    (ADDRESS = (PROTOCOL = TCPS)(HOST = 10.9.8.33)(PORT = 2485))
  )
jeremy@debianvm:~/lsnr$ cat list-ardent.ora|getlistenerproperty log_directory_ardentl1 log_directory_ardentl1
 /u01/app/oracle/product/10.2.0/db_1/network/log
jeremy@debianvm:~/lsnr$ </code></pre>
<p>And finally, a few examples of changing properties. Note that the entire file is always displayed but I&#8217;ve only shown the relevant excerpts.</p>
<pre><code>jeremy@debianvm:~/lsnr$ cat list-ardent.ora|setlistenerproperty ardentl1 host 1.2.3.4
...
#SSL_CLIENT_AUTHENTICATION = FALSE
ARDENTL1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 1.2.3.4)(PORT = 1522))
    (ADDRESS = (PROTOCOL = TCPS)(HOST = 10.9.8.33)(PORT = 2485))
  )
...

jeremy@debianvm:~/lsnr$ cat list-ardent.ora|setlistenerproperty ardentl1 address "(HOST=1.2.3.4)(PORT=999)"
...
#SSL_CLIENT_AUTHENTICATION = FALSE
ARDENTL1 =
  (DESCRIPTION =
    (ADDRESS = (HOST=1.2.3.4)(PORT=999))
    (ADDRESS = (PROTOCOL = TCPS)(HOST = 10.9.8.33)(PORT = 2485))
  )
...

jeremy@debianvm:~/lsnr$ cat list-ardent.ora|setlistenerproperty logging_ardentl1 logging_ardentl1 OFF
TRACE_LEVEL_ARDENTL1 = ADMIN
TRACE_FILE_ARDENTL1 = listener
TRACE_DIRECTORY_ARDENTL1 = /u01/app/oracle/product/10.2.0/db_1/network/trace
LOG_FILE_ARDENTL1 = listener
LOG_DIRECTORY_ARDENTL1 = /u01/app/oracle/product/10.2.0/db_1/network/log
LOGGING_ARDENTL1 = OFF

#SSL_CLIENT_AUTHENTICATION = FALSE
ARDENTL1 =
...

jeremy@debianvm:~/lsnr$ cat list-ardent.ora|
&gt; setlistenerproperty ardentl1 host 1.2.3.4|
&gt; setlistenerproperty ardentl1 port 9999
...
#SSL_CLIENT_AUTHENTICATION = FALSE
ARDENTL1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 1.2.3.4)(PORT = 9999))
    (ADDRESS = (PROTOCOL = TCPS)(HOST = 10.9.8.33)(PORT = 2485))
  )
...</code></pre>
<p>And that&#8217;s about it. Leave me a comment and let me know if you find this useful. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2008/11/28/parsing-listenerora-with-awk-and-sed/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Oracle Fully Automated Install and Patch</title>
		<link>http://www.ardentperf.com/2008/10/22/oracle-fully-automated-install-and-patch/</link>
		<comments>http://www.ardentperf.com/2008/10/22/oracle-fully-automated-install-and-patch/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 23:08:30 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=625</guid>
		<description><![CDATA[Before I started consulting, I was an Oracle engineer in a very large software development organization. The company had a number of major products and the one I worked with was used by hospitals and radiology offices world-wide. (These guys are one of the biggest companies worldwide in the field.) Our product included the hardware [...]]]></description>
			<content:encoded><![CDATA[<p>Before I started consulting, I was an Oracle engineer in a very large software development organization. The company had a number of major products and the one I worked with was used by hospitals and radiology offices world-wide.  (These guys are one of the biggest companies worldwide in the field.)  Our product included the hardware and software; you could order it with Sun or HP hardware (Solaris or Linux). It had an Oracle backend and a web-based middle tier built with lots of C++ and Java code.</p>
<p>Any software engineer who has worked on large projects &#8211; industry or community &#8211; can tell you the importance of solid change control processes. So&#8230; since everything for the build had to be checked into clearcase&#8230; yes, we checked Oracle 10g into the repo. A 2G tarball. And whenever there was a 1K patch to the oracle install? A brand new 2G tarball.  The clearcase guys loved me.</p>
<p>And that was how I started thinking about an automated build process. I don&#8217;t need to check B24792-01_1of5.zip into the repository because it&#8217;s straight off edelivery. I can skip p7150622_10203_Linux-x86-64.zip since it&#8217;s direct from metalink. The only thing missing was a solid, simple, flexible program for automating the oracle install, patchset, CPUs and oneoffs &#8211; taking Oracle&#8217;s official bits as input.</p>
<p>Anyone else out there who could use a program like this? How about for rapid provisioning of servers? (Like all that grid buzz.) Grid Control does some basic stuff (if you can make it work) and there are advanced kits for the big data centers &#8211; but there have to be more people than just me who would love to have this program.</p>
<h3>Proposing orainstall</h3>
<p>That&#8217;s why I&#8217;m proposing to write a bit of software called <strong>orainstall</strong>. It would be script-based and cross-platform and intended for community use. I have some ideas for a design but I&#8217;m really interested to hear how you might use something like this and what features might be useful to you. Do you think it&#8217;s a good design? I&#8217;d also be interested in hearing if you&#8217;d be interested to use it or to help test it.</p>
<p>The program would be launched by running <span id="more-625"></span>the main executable &#8220;orainstall&#8221;.  The syntax could look something like this:</p>
<pre><code>Command line syntax:
  ./orainstall &lt;stepfile&gt; [-oh &lt;ORACLE_HOME&gt;] [-tmp &lt;ORAINST_TMP&gt;]

Example:
  ./orainstall ora10203.sf -oh /u01/app/oracle/product/10.2.0/db_1 -tmp /u01/app/oracle/tmp

Return Value:
  0 - success
  1 - invalid stepfile
  2 - installation error
  3 - patching error</code></pre>
<h3>The Stepfile</h3>
<p>What I&#8217;m thinking is that the install process is defined in an input file called the <strong>stepfile</strong>.  The stepfile needs to accomodate a large variety of organizational requirements.  Here&#8217;s my first draft for what a stepfile would look like:</p>
<pre><code># This stepfile instructs the oracle auto-installer how to setup the oracle
# home. Each line is executed in order from top to bottom.
#
# There are ten defined directives for this stepfile:
#   ORACLE_HOME - required
#     This will cause a search-replace of each response file to explicitly
#     define the oracle home. It must be defined before any open, install or
#     patch directives and it can only be defined once per stepfile.
#       Order of precedence:
#         1. command line
#         2. stepfile
#         3. environment variable
#   ORAINST_TMP - optional
#     Top-level temp directory for extracting contents of Oracle installers
#     and patches. Each installer or patch will be extracted into a
#     subdirectory of this temp location. It must be defined before any
#     open or patch directives. It can be defined multiple times in a
#     stepfile.
#       Order of precedence:
#         1. command line
#         2. stepfile
#         3. environment variable
#         4. "/tmp/orainstall"
#   OPEN /path/to/zip
#     Path to a zip file with database installer or major patchset which
#     requires use if OUI. The file is unzipped into a temporary location.
#     If several INSTALL directives are encountered in a row then they are
#     all unzipped into the same location; if there is another directive in
#     between then the next INSTALL is unzipped into a new temporary
#     location.
#   INSTALLPATH Disk1/runInstaller
#   INSTALLRSP install.rsp
#      "runInstaller -waitForCompletion -silent -responseFile &lt;install.rsp&gt;"
#     INSTALLPATH is optional - if not specified then the script will search
#     for it in the most recently created temp location. If there is more
#     than one runInstaller then it will use the first one it finds; search
#     order is undefined.
#     If no path is specified for the response file then orainstall will
#     search for it in this order:
#       1. current working directory (pwd) when orainstall was launched
#       2. same directory as orainstall binary (dirname $0)
#   OPATCH/path/p8000.zip
#     Path to special "OPatch" update - contents are unzipped directly to
#     ORACLE_HOME.
#   PATCH /path/p2345.zip
#     Path to a patch. Contents are unzipped to a temporary location then
#     applied by calling "opatch" from the ORACLE_HOME.
#   NPATCH /path/p1234.zip
#     Path to a patchset with multiple subpatches which need to be applied
#     with "napply" (such as a CPU). Contents are unzipped to temp location
#     then applied properly to the ORACLE_HOME.
#   CLEAN_TMP
#     Deletes all files from the current top-level temp directory.
#   REMOVE /path/to/file
#     Runs "rm -rf $ORACLE_HOME/path/to/file" - use carefully! Some sites
#     may require  removal of components for security requirements.
#
# If there are any errors (install or patch) then the process will fail.
#
#oracle_home /u01/app/oracle/product/10.2.0/db_1
orainst_tmp /u01/app/oracle/installers.tmp
open /net/rh5lab12/u10/stage/ora10201/B24792-01_1of5.zip
open /net/rh5lab12/u10/stage/ora10201/B24792-01_2of5.zip
open /net/rh5lab12/u10/stage/ora10201/B24792-01_3of5.zip
open /net/rh5lab12/u10/stage/ora10201/B24792-01_4of5.zip
open /net/rh5lab12/u10/stage/ora10201/B24792-01_5of5.zip
installpath database/runInstaller
installrsp /net/rh5lab12/u10/stage/rsp/database10201.rsp
installpath companion/runInstaller
installrsp /net/rh5lab12/u10/stage/rsp/companion10201.rsp
open /net/rh5lab12/u10/stage/ora10203/p5337014_10203_Linux-x86-64.zip
installrsp /net/rh5lab12/u10/stage/rsp/patchset10203.rsp
clean_tmp
orainst_tmp /u01/app/oracle/patches
opatch /net/rh5lab12/u10/stage/patch10203/p6880880_10203_Linux-x86-64.zip
patch /net/rh5lab12/u10/stage/patch10203/p5892355_10203_Linux-x86-64.zip
patch /net/rh5lab12/u10/stage/patch10203/p6455161_10203_Linux-x86-64.zip
npatch /net/rh5lab12/u10/stage/patch10203/p7150622_10203_Linux-x86-64.zip
remove /htmldb</code></pre>
<h3>Program Flow</h3>
<p>The program flow would be pretty basic; it would validate the stepfile then execute it one line at a time.  I thought of six things to validate before starting execution:</p>
<ol>
<li>can read stepfile</li>
<li>one oracle_home, defined before open/install/patch, can create/write</li>
<li>orainst_tmp defined before open/install/patch, can create/write each</li>
<li>clean_tmp not defined before orainst_tmp</li>
<li>can read all open/install/patch input files</li>
<li>free space in oracle_home is greater than size of input files</li>
</ol>
<h3>Feedback</h3>
<p>Maybe there aren&#8217;t as many people as I think who would use this. After all &#8211; most DBAs don&#8217;t install the database software very often; they just want to keep it running! But please let me know if it interests you. I&#8217;ll factor in the feedback I receive as I&#8217;m developing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2008/10/22/oracle-fully-automated-install-and-patch/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>ASMLIB Performance vs Udev</title>
		<link>http://www.ardentperf.com/2008/10/08/asmlib-performance-vs-udev/</link>
		<comments>http://www.ardentperf.com/2008/10/08/asmlib-performance-vs-udev/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 09:28:40 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=615</guid>
		<description><![CDATA[Is asmlib obsolete on a modern Linux system? I&#8217;m still undecided but starting to lean toward &#8220;yes&#8221;. Everybody knows that asmlib was very useful when it was first introduced with Oracle 10.1 to simplify a host of issues on Linux: direct async device access without raw devices, file permissions &#038; ownership without custom code, and [...]]]></description>
			<content:encoded><![CDATA[<p>Is asmlib obsolete on a modern Linux system?  I&#8217;m still undecided but starting to lean toward &#8220;yes&#8221;.</p>
<p>Everybody knows that asmlib was very useful when it was first introduced with Oracle 10.1 to simplify a host of issues on Linux: direct async device access without raw devices, file permissions &#038; ownership without custom code, and persistent device naming without devlabel.</p>
<p>But I&#8217;m now involved in setting some standards to be used across a large organization for Oracle 10.2 on RHEL5 and I&#8217;m wondering if there&#8217;s still a case for using asmlib.  So I did a little trolling for info &#8211; which was suprisingly sparse.  Had a hard time finding much, but after a lot of digging I think I&#8217;ve compiled a useful bit of information about benefits and drawbacks.</p>
<h4>Benefits</h4>
<p>It seems to me that the ASMLIB API was originally introduced to do more than just simplify file permissions &#8211; sounds like it was an alternative I/O API to the standard unix one, allowing ASM to access the underlying storage more efficiently and completely.  I don&#8217;t think it&#8217;s just an &#8220;extra layer&#8221; &#8211; it&#8217;s an alternative code path to the std unix I/O libs.  Like an ODM for block devices &#8211; and the idea was that there could be additional vendor implementations.  And Oracle released an initial generic implementation on Linux under the GPL.<br />
<span id="more-615"></span></p>
<p>Some theoretical benefits of ASMLIB API:</p>
<ul>
<li>
always uses direct, async i/o
</li>
<li>
solves persistent device naming, even if underlying device moves across reboots
</li>
<li>
solves file permissions and ownership
</li>
<li>
reduced user mode to kernel mode context switches during I/O, possibly reducing CPU usage
</li>
<li>
reduced file handle usage
</li>
<li>
pass metadata such as I/O prioritization to storage device (don&#8217;t think this is implemented in the Linux version)
</li>
</ul>
<p><br/></p>
<h4>Drawbacks</h4>
<p>However from what I can tell, the ASMLIB API didn&#8217;t quite catch on.  Wim recommends it (as of Apr &#8217;07) but Closson doesn&#8217;t really talk about it on his blog but has one disparaging off-hand reference about pitying people who use it.  There have been no vendor implementations that I could find.  (But I wonder what&#8217;s going on now with exadata and &#8220;iDB&#8221; which has I/O prioritization and predicate pre-filtering &#8211; could they have used the API here?)  Wim&#8217;s post on Oracle Forums says that there isn&#8217;t &#8220;much of an io performance benefit&#8221; added by the linux ASMLIB implementation. And the OTN page hasn&#8217;t been updated for almost two years.</p>
<p>A RedHat consultant I&#8217;m working with recommended against using it and one of his reasons was that it introduces an unnecessary additional layer and dependency in the kernel.  There have been a small number of past bugs in asmlib and it doesn&#8217;t seem to be frequently updated (once this year according to the changelogs)… but then it&#8217;s very simple code (mostly in a single small file).</p>
<h4>Conclusions</h4>
<p>After all of this, I&#8217;m not convinced that it&#8217;s worth installing ASMLIB if you&#8217;re comfortable with udev.  On Linux, udev is definitely a better solution to handle persistent device naming and permissions and I don&#8217;t see enough benefits in asmlib to outweigh the very slight additional overhead.</p>
<p>So right now my preference would be to only install asmlib on old systems &#8211; Oracle 10.1 or Linux 2.4 &#8211; but to use udev and block devices for 10.2 and newer on 2.6 kernels.  But the case isn&#8217;t closed and I&#8217;d love to hear from anyone who agrees or disagrees&#8230; thoughts?</p>
<h4>References:</h4>
<ul>
<li>
Wim&#8217;s brief remarks on Oracle Forums &#8211; <a href="http://forums.oracle.com/forums/thread.jspa?threadID=498215">http://forums.oracle.com/forums/thread.jspa?threadID=498215</a>
</li>
<li>
In-depth information from ASM reference book &#8211; <a href="http://books.google.co.uk/books?id=HB453L86Q6AC&#038;pg=RA1-PA142&#038;lpg=RA1-PA142&#038;dq=asmlib+api&#038;source=web&#038;ots=bEP4epFbp5&#038;sig=47aLUWW9o73Snr1tcnvz_1h3prU&#038;hl=en&#038;sa=X&#038;oi=book_result&#038;resnum=1&#038;ct=result#PRA1-PA142,M1 ">http://books.google.co.uk/books?id=HB453L86Q6AC&#038;pg=RA1-PA142&#038;lpg=RA1-PA142&#038;dq=asmlib+api&#038;source=web&#038;ots=bEP4epFbp5&#038;sig=47aLUWW9o73Snr1tcnvz_1h3prU&#038;hl=en&#038;sa=X&#038;oi=book_result&#038;resnum=1&#038;ct=result#PRA1-PA142,M1</a>
</li>
<li>
Uses submit_bio() call &#8211; source code &#8211; <a href="http://oss.oracle.com/viewvc/oracleasm/trunk/kernel/driver.c?view=markup">http://oss.oracle.com/viewvc/oracleasm/trunk/kernel/driver.c?view=markup</a>
</li>
<li>
cdos newsgroup thread with speculation about performance &#8211; <a href="http://groups.google.com/group/comp.databases.oracle.server/browse_thread/thread/905296d0aba00b84?pli=1">http://groups.google.com/group/comp.databases.oracle.server/browse_thread/thread/905296d0aba00b84?pli=1</a>
</li>
<li>
tim hall was going to investigate though he didn&#8217;t publish results &#8211; <a href="http://www.oracle-base.com/blog/2006/05/01/asm-with-asmlib-or-raw-devices/">http://www.oracle-base.com/blog/2006/05/01/asm-with-asmlib-or-raw-devices/</a>
</li>
<li>
kevin closson doesn&#8217;t say much but makes this off-hand remark &#8211; <a href="http://kevinclosson.wordpress.com/2006/11/02/dbwr-efficiency-aio-io-libraries-with-asm/">http://kevinclosson.wordpress.com/2006/11/02/dbwr-efficiency-aio-io-libraries-with-asm/</a>
</li>
<li>
short anonymous comment possibly by closson &#8211; <a href="http://archives.devshed.com/forums/databases-124/asmlib-1157660.html">http://archives.devshed.com/forums/databases-124/asmlib-1157660.html</a>
</li>
<li>
OTN official site for ASMLIB &#8211; <a href="http://www.oracle.com/technology/tech/linux/asmlib/index.html">http://www.oracle.com/technology/tech/linux/asmlib/index.html</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2008/10/08/asmlib-performance-vs-udev/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Collaborate Wrapup, RAC 11g/VMware Lab</title>
		<link>http://www.ardentperf.com/2008/04/24/collaborate-wrapup-rac-11gvmware-lab/</link>
		<comments>http://www.ardentperf.com/2008/04/24/collaborate-wrapup-rac-11gvmware-lab/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 13:50:43 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/2008/04/24/collaborate-wrapup-rac-11gvmware-lab/</guid>
		<description><![CDATA[So Collaborate is over and I&#8217;m back in Chicago&#8230; home sweet home. I thoroughly enjoyed the week in Denver, in spite of the snow! Thursday, the last day, was especially fun. First was a panel debate &#8220;To RAC or Not To RAC: What’s Best for HA.&#8221; Dan Norris invited me to participate in this panel [...]]]></description>
			<content:encoded><![CDATA[<p>So Collaborate is over and I&#8217;m back in Chicago&#8230; <a href="http://www.youtube.com/watch?v=xuRhaDrnlWo">home sweet home</a>.  I thoroughly enjoyed the week in Denver, in spite of the snow!  Thursday, the last day, was especially fun.</p>
<p>First was a panel debate &#8220;To RAC or Not To RAC: What’s Best for HA.&#8221;  <a href="http://www.dannorris.com">Dan Norris</a> invited me to participate in  this panel along with <a href="http://www.pythian.com/blogs/author/alex">Alex Gorbachev</a> (Pythian), <a href="http://www.predictive-technologies.com/">Neil Greene</a> (Predictive Technologies) and <a href="http://www.gridapp.com/about/m_zito.php">Matt Zito</a> (GridApp) &#8211; I certainly felt privileged to take part.  Here are a few of the things that I took away from the debate&#8230; feel free to discuss:<br />
<span id="more-589"></span></p>
<ul>
<li>
<p>There are no silver bullets.  And if there were, RAC wouldn&#8217;t be one.  :)  Many RAC implementation problems can be traced to poorly set expectations; knowing your requirements and RAC&#8217;s capabilities will go a long way towards making any project successful.</p>
</li>
<li>
<p>RAC really shines when solving scalability problems.  The simple act of moving an application from single-instance to RAC is more likely to improve throughput than service time.  (Of course, improvement isn&#8217;t guaranteed: as Dan pointed out during our conversation it depends on where the bottlenecks are.)</p>
</li>
<li>
<p>There are two major application design areas that need to be addressed when moving to RAC: (1) scalability and (2) connectivity.  (There are other issues too but these are probably the biggest.)  Regarding scalability, small inefficiencies will become major bottlenecks when you move your app to a cluster.  Look out for any points of contention or serialization whether they&#8217;re logical (like an ID field that must be sequential) or physical (like free space management).  On the connectivity front, there is both initial connection and load balancing to worry about.</p>
</li>
<li>
<p>When it comes to HA, I personally think that failover clusters should get more serious consideration then they do.  I think that there are essentially two differences between a failover cluster and RAC: (1) a few minutes of downtown each year, and (2) the prices for licenses &#8211; probably tens or hundreds of thousands of dollars minimum.  You can even still use TAF with a failover cluster &#8211; it&#8217;s not much different than using it with Data Guard.  The few apps that need extremely fast failover often can&#8217;t even wait a few minutes &#8211; they commonly run parallel systems in tandem to avoid failover altogether.  Most other apps can tolerate an extra 60 seconds during failover, if we&#8217;re honest.</p>
</li>
</ul>
<p>At any rate, I thought that the debate was informative and that Alex, Neil and Matt were each very well spoken.  Alex also has <a href="http://www.pythian.com/blogs/951/alex-gorbachev-at-collaborate-08">a good write-up on his Pythian blog</a>.</p>
<div class=""><a href="http://www.ardentperf.com/wp-photos/20080418-155143-1.jpg" onclick="window.open('http://www.ardentperf.com/wp-photos/20080418-155143-1.jpg','full_size_image','toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=1,height=660,width=500');return false;"><img src="http://www.ardentperf.com/wp-photos/thumb.20080418-155143-1.jpg" alt="0417081104.jpg" title="0417081104.jpg" style="" class="postie-image alignleft" /></a></div>
<p>After the debate panel I slipped over to hear Alex&#8217;s 11g New Features presentation (which was actually <a href="http://www.pythian.com/blogs/author/kutrovsky/">Christo</a>&#8216;s presentation but Alex delivered it since Christo wasn&#8217;t able to fly over from Dubai).  The presentation went great even though Alex hadn&#8217;t written it himself and I snapped this pic with my cell phone while I was there.</p>
<p>Alex&#8217;s session was the last one of the conference, so afterwards we grabbed a bite to eat and spent some time catching up.  Dan joined us a bit later and then we made our way to the airport to have dinner and catch our respective flights.  Thanks for the great company guys!</p>
<div style="clear:left"></div>
<h4>RAC 11g/VMware Lab</h4>
<p>One last thing: on Wednesday we had a lab session where we went through the step-by-step process of setting up 11g RAC in a VMware Server virtual environment with OEL5 and ASM.  I have uploaded the class to the <a href="/publications">publications section</a> of this website.</p>
<p>If you have a 2Ghz processor, 2GB of memory and 20G of disk space, then you can download all of the software for free and try out <a href="/publications">this lab</a> for yourself:</p>
<ul>
<li>
VMware Server &#8211; <a href="http://www.vmware.com/download/server/">http://www.vmware.com/download/server/</a>
</li>
<li>
Oracle Enterprise Linux (OEL) 5 &#8211; <a href="http://edelivery.oracle.com/linux">http://edelivery.oracle.com/linux</a>
</li>
<li>
Oracle Database Enterprise Edition 11g &#8211; <a href="http://www.oracle.com/technology/software/products/database/index.html">http://www.oracle.com/technology/software/products/database/index.html</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2008/04/24/collaborate-wrapup-rac-11gvmware-lab/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle Services on RAC at Collaborate</title>
		<link>http://www.ardentperf.com/2008/04/16/oracle-services-on-rac-at-collaborate/</link>
		<comments>http://www.ardentperf.com/2008/04/16/oracle-services-on-rac-at-collaborate/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 23:56:49 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/2008/04/16/oracle-services-on-rac-at-collaborate/</guid>
		<description><![CDATA[Just a quick post to say that I&#8217;ve uploaded the slides from my services presentation at Collaborate and you can find them over on the publications page. Thanks to everyone who attended!! Great questions and comments throughout the session. Next time I&#8217;ll try to get through everything faster so that there&#8217;s more time for Q&#038;A! [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to say that I&#8217;ve uploaded the slides from my services presentation at Collaborate and you can find them over on the <a href="/publications">publications page</a>.  Thanks to everyone who attended!!  Great questions and comments throughout the session.  Next time I&#8217;ll try to get through everything faster so that there&#8217;s more time for Q&#038;A!</p>
<p>Next week sometime I expect to upload the instructions from today&#8217;s Hands-on Lab (11g RAC on VMware with ASM and OEL5).  I want to clean it up a bit first.  For anyone who didn&#8217;t hear the story, I heard on Sunday evening that they had a room with about 50 computers which was going to sit empty during a few timeslots.  And to me that seemed like a tragedy &#8211; how often do I wish I could have a chance to try something new with a bit of guidance and without worrying about hosing my laptop?!  So I decided to write a hands-on lab for 11gRAC/VMware.  I pretty much spent all day yesterday putting it together but it came out great!</p>
<p>Also I&#8217;m thinking about repeating that RAC/VMware lab around Chicago sometime&#8230; is there anyone around the Chicago area who might be interested in something like this?</p>
<p>Guess I should also mention that I&#8217;ve been rather enjoying myself at Collaborate so far too!  (Even though I spent pretty much all day yesterday making that Hands-on Lab&#8230;)  Got a chance to meet <a href="http://www.rittmanmead.com/author/peter-scott/">Peter</a> <a href="http://pjsrandom.wordpress.com/">Scott</a> Monday night &#8211; that was fun!  Somehow he spotted my name badge and then I got to finally put a face to someone I&#8217;d only known as a blogger.  :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2008/04/16/oracle-services-on-rac-at-collaborate/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
