<?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; Technical</title>
	<atom:link href="http://www.ardentperf.com/category/technical/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ardentperf.com</link>
	<description>Jeremy's Oracle Resources and Ramblings</description>
	<lastBuildDate>Wed, 20 May 2009 20:27:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Five Reasons to do RAC Attack at Collaborate</title>
		<link>http://www.ardentperf.com/2009/04/06/five-reasons-to-do-rac-attack-at-collaborate/</link>
		<comments>http://www.ardentperf.com/2009/04/06/five-reasons-to-do-rac-attack-at-collaborate/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 12:17:34 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=738</guid>
		<description><![CDATA[Last week Dan broke the news that we&#8217;re bringing RAC Attack back to Collaborate! We&#8217;ve run this workshop several times now: it&#8217;s gotten better every time and we&#8217;ve always received overwhelmingly positive feedback. This is going to be a great workshop in Orlando that you don&#8217;t want to miss!
A Short History
We first ran the RAC [...]]]></description>
			<content:encoded><![CDATA[<p>Last week <a href="http://www.dannorris.com/2009/03/30/adv-rac-attack-hands-on-event-at-collaborate09/">Dan broke the news that we&#8217;re bringing RAC Attack back to Collaborate</a>! We&#8217;ve run this workshop several times now: it&#8217;s gotten better every time and we&#8217;ve always received overwhelmingly positive feedback. This is going to be a great workshop in Orlando that you don&#8217;t want to miss!</p>
<h4>A Short History</h4>
<p>We first ran the RAC Attack <a href="http://iougew.prod.web.sba.com/displaymod/SearchEvents.cfm?code=739&#038;detail=1&#038;conference_id=52&#038;searchType=8">last year at Collaborate in Denver</a>. On the first day of Collaborate we heard that one of the computer labs was going to be sitting empty for several hours on Wednesday. Being such a fervent believer in hands-on learning, this sounded like a terrible waste!  So at the last minute we arranged to deliver the RAC Attack hands-on lab <a href="http://iougew.prod.web.sba.com/displaymod/SearchEvents.cfm?code=739&#038;detail=1&#038;conference_id=52&#038;searchType=8">during the open slot</a>.  If I remember right, we had something like 20 people and everyone seemed to really come away having learned something new. The lab focused on getting a running system.</p>
<p>In August when we ran <a href="http://www.ioug.org/networking/SIGs/RACAttackInformation.cfm">RAC Attack as a standalone workshop in Chicago</a>. In addition to having several excellent speakers, we dramatically expanded the scope of the lab to include topics like backup &#038; recovery, services, and clusterware. During the full day allocated, only a few people completed every possible exercise.</p>
<h4>Five Reasons To Sign Up</h4>
<p>This year <a href="http://www.ioug.org/collaborate09/attending/university.cfm#u18">at Collaborate we&#8217;re doing it again</a>. The lab will again be expanded and improved when we bring it to Orlando. Furthermore, <strong>I&#8217;m taking requests</strong> &#8211; if there&#8217;s a topic you&#8217;d like to learn about then leave a comment and I&#8217;ll try to get it included!  I&#8217;m not sure how quickly the session will fill, but I know that there are a limited number of seats &#8211; so you should sign up soon.</p>
<p>Here are five reasons I think you should come:</p>
<ol>
<li>
<p>Get exposure to and practice on all of the latest software, including VMware Server 2.0.1, Oracle Enterprise Linux (same as RedHat) 5.3, and Oracle RAC 11.1.0.7</p>
</li>
<li>
<p>There are hands-on challenges for every experience level. Meticulous step-by-step guide for beginners (with the choice to skip difficult steps), start-from-scratch or instant running environment for masters.</p>
</li>
<li>
<p>Learn from professionals with years of RAC experience. Several of us will be on-hand to answer questions and assist with the labs. If you have never touched a cluster database then we are here to help you complete the labs and understand what you&#8217;re doing!</p>
</li>
<li>
<p>Choose your own adventure. ASM or OCFS2. Parallel SQL or clusterware callouts. Got something specific you want to learn about? Leave a comment and I&#8217;ll try to get it included.</p>
</li>
<li>
<p>Walk out with a lab binder that tells you how to do it all on your own laptop after you get home. It won&#8217;t be possible to finish all the labs during the timeslot we have at Collaborate, but you can finish them later!</p>
</li>
</ol>
<p>Finances are tight and many companies are cutting training budgets &#8211; but remember that generally speaking, Collaborate is one of the best value opportunities for Oracle training that&#8217;s available in the United States. You have world-class educational sessions and networking opportunities, complimented by top notch deep-dive university seminars such as RAC Attack.  (Well&#8230; I&#8217;m a little biased about this session!)  And with a slightly greater degree of independence you won&#8217;t just hear the corporate messages &#8211; it&#8217;ll be a little easier to find real-life users telling the great, the good, the bad and the ugly.</p>
<p>Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2009/04/06/five-reasons-to-do-rac-attack-at-collaborate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASM Negative Free Space</title>
		<link>http://www.ardentperf.com/2009/03/17/asm-negative-free-space/</link>
		<comments>http://www.ardentperf.com/2009/03/17/asm-negative-free-space/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 13:03:57 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=717</guid>
		<description><![CDATA[In the last post I showed mathematically how ASM calculates the free usable space that it displays. However one of the first questions I received after presenting that internally was from someone concerned about all of the unusable space being saved just in case we lose a disk. (In my worked example it was 1/6 [...]]]></description>
			<content:encoded><![CDATA[<p>In the last post I showed mathematically how ASM calculates the free usable space that it displays. However one of the first questions I received after presenting that internally was from someone concerned about all of the unusable space being saved just in case we lose a disk. (In my worked example it was 1/6 of the disk capacity! And what if we don&#8217;t care about restoring redundancy before we replace the failed disk?) </p>
<p>But it turns out that ASM actually handles this quite nicely &#8211; the &#8220;usable space&#8221; is used only for display and alerting. If a datafile needs to autoextend or if an archivelog needs to be created then ASM will keep using space until it completely exhausts everything physically available. It will go ahead and use the &#8220;reserved space&#8221; and just report a negative amount of free space! Here&#8217;s the output of my test confirming this behavior:</p>
<pre><code>SQL&gt; alter database datafile
2&gt;  '+TEST01/js1_rh5lab20/datafile/filler.256.681667743' resize 18G;

Database altered.

.

rh5lab20$ asmcmd dgs
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB
MOUNTED  NORMAL  N         512   4096  1048576     38561     1529

  Req_mir_free_MB  Usable_file_MB  Offline_disks  Name
             7844           -3157              0  TEST01/

.

rh5lab20$ asmdf
Filesystem        SizeKB     UsedKB    AvailKB    Use% Mounted on
+TEST01         15727104   18959872   -3232768 120.56% TEST01</code></pre>
<p>There is also a second way to get negative usable space in ASM. If you do experience a failure, then ASM will restore your redundancy level making new copies of the data that was on the failed disk(s). It will use the &#8220;reserved space&#8221; on your disks. After the rebuild is complete, ASM will recalculate the amount of reserved space it needs to protect from a <em>second</em> failure. If you were using most of the space before the first failure then ASM might report a negative amount of usable space after the rebuild.</p>
<p>It&#8217;s important for you to remember that negative free space doesn&#8217;t mean your data isn&#8217;t safe &#8211; you just won&#8217;t be able to restore redundancy after the failure. In other words, if you have negative free space then you cannot physically survive <em>two</em> subsequent failures without data loss (or three with high redundancy/triple mirroring). But ASM allows the negative numbers because it&#8217;s smart enough not to hang your database when it can be avoided (for example if archivelogs fill up the reported usable space).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2009/03/17/asm-negative-free-space/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASM Space Calculations and Hot Spares</title>
		<link>http://www.ardentperf.com/2009/03/12/asm-space-calculations-and-hot-spares/</link>
		<comments>http://www.ardentperf.com/2009/03/12/asm-space-calculations-and-hot-spares/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 18:16:08 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=710</guid>
		<description><![CDATA[This is quick and dirty. I hope to get a more polished write-up of what it means and how it works, but since I&#8217;m so busy right now I don&#8217;t know if I&#8217;ll get to it soon. In the meantime someone just might find this useful or informative so I&#8217;m just going to put it [...]]]></description>
			<content:encoded><![CDATA[<p>This is quick and dirty. I hope to get a more polished write-up of what it means and how it works, but since I&#8217;m so busy right now I don&#8217;t know if I&#8217;ll get to it soon. In the meantime someone just might find this useful or informative so I&#8217;m just going to put it out there as it is.</p>
<p>This is an worked-through example of how ASM reports free space, taking into consideration &#8220;hot spare capacity&#8221; that is reserved to restore redundancy after the largest failure group dies.</p>
<pre><code>ASM has 46 local disks attached to 6 controllers
- two controllers have 6 disks, other four have 8
- ASM has failure groups by controller

===========================================================================

Each disk is partitioned. Get the size of the ASM partition according to
the Linux kernel. All partitions are the same size.

# sfdisk -s /dev/sdav1
401624968

Now get the size info from ASM.

ASMCMD&gt; lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB   Free_MB
MOUNTED  NORMAL  N         512   4096  1048576  18041706  18041326
Req_mir_free_MB  Usable_file_MB  Offline_disks  Name
        3137688         7451819              0  DATA01/

===========================================================================

-- size of individual disk in MB is kernel-reported KB divided by 1024
401624968 /1024 = 392211.8828125 M

-- ASM can't use partial AU's so truncate and we get Total_MB
392211 * 46 = 18041706

-- largest failure group [controller] has 8 disks so get Req_mir_free_MB
     (amount of "hot spare" capacity that is reserved to restore redundancy
     after a controller failure)
392211 * 8 = 3137688

-- asm reports that some space is used; use "Free_MB" to see total free space
= 18041326

-- with normal-mirroring, usable space is (totalfree-spare)/2
(18041326 -  3137688) / 2 = 7451819</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2009/03/12/asm-space-calculations-and-hot-spares/feed/</wfw:commentRss>
		<slash:comments>0</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</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 this [...]]]></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>4</slash:comments>
		</item>
		<item>
		<title>Oracle ASM Stripe Size</title>
		<link>http://www.ardentperf.com/2008/12/10/oracle-asm-stripe-size/</link>
		<comments>http://www.ardentperf.com/2008/12/10/oracle-asm-stripe-size/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 21:48:35 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.ardentperf.com/?p=665</guid>
		<description><![CDATA[Right now I&#8217;m working on some internal documentation and referencing Oracle 11g&#8217;s Storage Administrators Guide (ASM manual). And I think there&#8217;s a bit of a contradiction here about the stripe size. ASM uses a variable &#8220;data extent&#8221; size when allocating space for files (like any sane filesystem) &#8211; the first 20000 data extents are equal [...]]]></description>
			<content:encoded><![CDATA[<p>Right now I&#8217;m working on some internal documentation and referencing Oracle 11g&#8217;s <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/toc.htm">Storage Administrators Guide (ASM manual)</a>. And I think there&#8217;s a bit of a contradiction here about the stripe size. ASM uses a variable &#8220;data extent&#8221; size when allocating space for files (like any sane filesystem) &#8211; the first 20000 data extents are equal to the diskgroup allocation unit (AU), the next 20000 are AU*8, etc. But it&#8217;s a little unclear to me how the stripe size is determined. Seems to me that you&#8217;d stripe &#8220;data extents&#8221; rather than allocation units and I think I&#8217;ve even heard before that &#8220;<em>extents</em> are mirrored [and presumably striped]&#8221; in ASM. In fact the illustration in the manual shows the stripes in exactly that manner:</p>
<p><center><div id="attachment_666" class="wp-caption alignnone" style="width: 310px"><a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/asmcon.htm#BABHCCDB"><img src="http://www.ardentperf.com/wp-content/uploads/2008/12/extents-300x194.gif" alt="ASM Extents" title="extents" width="300" height="194" class="size-medium wp-image-666" /></a><p class="wp-caption-text">ASM Extents</p></div></center></p>
<p>However the manual states that the opposite is true &#8211; striping based on AU instead of data extent &#8211; in two different places on that page. <span id="more-665"></span> First, <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/asmcon.htm#BABCGDBF">just before the illustration</a>:</p>
<blockquote><p>The ASM coarse striping is always equal to the disk group AU size, but fine striping size always remains 128KB in any configuration (not shown in the figure). The AU size is determined at creation time with the allocation unit size (AU_SIZE) disk group attribute. The values can be 1, 2, 4, 8, 16, 32, and 64 MB.</p></blockquote>
<p>And again <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/asmcon.htm#CJHCFBBI">right after it</a>:</p>
<blockquote><p>To stripe data, ASM separates files into stripes and spreads data evenly across all of the disks in a disk group. The stripes are equal in size to the effective AU. The coarse-grained stripe size is always equal to the AU size. The fine-grained stripe size always equals 128 KB; this provides lower I/O latency for small I/O operations such as redo log writes.</p></blockquote>
<p>As far as I can tell, it seems to be a contradiction in the manual. I commented on the documentation page and I&#8217;ve opened an SR; I&#8217;ll post an update when I get a reply.</p>
<p><strong>Update 4:45pm:</strong></p>
<p>The SR got answered very quickly (less than an hour) &#8211; and said that striping is based on the data extent size. The usage of the term &#8220;allocation unit&#8221; was what I found confusing (even in the SR resolution)&#8230; but at least we have an answer. :)</p>
<p>Suppose you have a diskgroup with 1MB AU size. After a particular file has 20000 extents, <em>the allocation unit for that file</em> becomes 8MB.</p>
<pre><code>allocation unit = extent size
40000&gt;extent&gt;20000 =&gt; FILE_AU=DISKGROUP_AU*8.</code></pre>
<p>Here&#8217;s the definitive quote from the SR: &#8220;[After 20000 extents] the 8meg AU will be striped, with the first 8meg AU on disk one, the second 8meg AU on disk 2 and so on.&#8221;</p>
<p>This would apply for both striping and mirroring. My gut feeling was right; I was just a bit confused by the <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/asmcon.htm#sthref33">definitions of extents and allocation units in the manual</a> (which are incorrect).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardentperf.com/2008/12/10/oracle-asm-stripe-size/feed/</wfw:commentRss>
		<slash:comments>3</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</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</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>4</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</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 [...]]]></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</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 &#8216;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>7</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</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 [...]]]></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" /></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>&#8217;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>
	</channel>
</rss>

<!-- Dynamic page generated in 0.712 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-11 20:56:43 -->
<!-- Compression = gzip -->