Feed on
Posts
Comments

Another screwed up installation!  Enough already.  I’m going to tell you one way of doing this right.

It is a good idea for Oracle’s ASM binaries to have its own Oracle Home.  Time and time again, I’ve come across installations where stuff is just broken because of this.  It isn’t that ASM shouldn’t be in its own Oracle Home, it is just that people screw the installations.  

Consider a RAC installation.  I’m talking 10gR2 here.  Oracle is going to start up the listener using the information in ASM’s Oracle Home, not the information in the DB Home.  Setting TNS_ADMIN might alter that behavior, but that isn’t my point.  My point is that binaries from both DB and ASM homes are going to be running.  They both use the same infrastructure (listener), and each instance has expectations about where configurations files are going to be, etc.  Where should those configuration files live?

When I created a database using dbca, where does my init.ora file end up?  In ?/dbs you might say.  Sometimes you’d be right.   If you happen to run the dbca that is in the ASM Home, that file will end up in the ASM Home, even if your ORACLE_HOME is set to the DB HOME.  I don’t know if this is a bug or a feature, but it is annoying.  For all I know is that it has been fixed, but I don’t care, because I wonder what other executables are making assumptions about Oracle Homes. 

The solution is simple.  When doing ASM or listener activities, set ORACLE_HOME to the ASM Home, and make sure that the binaries in the ASM Home are used.  And set ORACLE_HOME to the DB Home when working with the DBs.  Putting this into practice can be a pain in the butt.  It just so happens that I’ve created some aliases that make dealing with this very simple.  I’m happy to share if there is any interest. 

Have a guess?

Singularity?

This guys been taking a photo per day for over 8 years and has spliced them together for a time-lapsed portrait of himself:

8 years

This guy hasn’t been going as long:

Noah

But Homer takes the cake:

Homer

I need AIR

I’m really enjoying how easy it is to bang out an user interface with FLEX and AIR.  This coupled with J2E allows me to quickly create front-end applications for customers to see how they might interact with one of my Oracle databases.  My recent laptop inferno left me with a new system, and while I had backups of my data, I need to reinstall the FLEX and AIR software. 

The documentation for installing the development environment is made available by Adobe, but one of their objectives is the sell the FLEX Bulder IDE.  Their command-line installation instructions are not the best.  I’ve documented the steps that I followed on the FLEX/AIR link of this blog.  I’m sure my instructions aren’t the best either.  I walk the reader through the steps to setup and then build one of Adobe’s sample AIR projects.

Enjoy the AIR. 

A new neighbor

Early this morning over breakfast, my son was gazing out the window.

Dad, have a look at this.

I looked out and there she was - a new neighbor indeed. She is definitely both a looker and an attention grabber. She wasn’t very animated — seemed like she must be into some sort of meditation. It was like she was waiting for something.

It can be a bit of a nervous proposition, this new neighbor thing. I hope it works out for the best.

When she wasn’t looking (at least I don’t think she was), I snapped a picture of my new neighbor as a personal keepsake of our first meeting.

So the question was posed, and the potential buyer of the storage system was perplexed. His team was evaluating replacement systems and storage and comparing it to their existing production system. What they couldn’t figure out was why the old storage system was out performing the new.

Both old and new were running Oracle databases. There were architectural changes in place, with the old being a single Oracle 9i instance with direct attached stroage, and the new being a Oracle 10g RAC cluster with an NFS appliance on the back-end.

I wasn’t involved with the old or the new infrastructure. I was brought in to help them understand the perplexing results.

Because they wanted to only test the storage performance, their test consisted of the iterations of the mkfile command. After investigating the issue themselves, they learned that the performance problem was related to a required mount option - forcedirectio. When this option wasn’t used on the new system, they saw the type of performance both consistent with the older system and desirable. The next questions were, what was this option for, why was it required, and why would anyone want such an option that slowed down performance? Did it have to do with data integrity? They had tried push back on the vendors about this option but no one could tell them exactly what it did - only that it was required.

What this option means in Solaris is that all IO for this mount point will be performed using Direct IO. In this mode, the file buffer cache is bypassed. Writes go directly to storage, and reads are read directly from the storage subsystem. There are a number of benefits to using Direct IO that help with performance related to access serialization, access alignment, and double-buffering. With Direct IO, it is professed that near RAW device performance can be achieved. So why was it still slower?

The fundamental reason is that the test was flawed. The test was not testing storage performance. While mkfile was creating a file on disk, the writes generated by the command were being acknowledged as complete by the OS as soon as it was copied into the file buffer cache. They weren’t testing the storage performance. When I suggested that they use the same mount option on the existing system and rerun the tests, they found that indeed, they were experiencing better performance on the new storage system.

The question still remained as to why they would anyone want this option, because what was being observed was in fact worse performance? Data integrity isn’t an issue because that is related to the use of the O_DSYNC option which means that data goes to disk before the write is acknowledged as complete.

This option isn’t always a great option. For database systems, it usually is. The reason is that we can give that file buffer cache memory to the database instead. The database is better at buffering its blocks than the OS. When the DB issues a read, the data should go directly from disk to DB cache. On a write, we want it to go directly from DB cache to disk. We’d expect better overall performance with this configuration. For databases systems that experience high concurrency, we are in even better shape for good performance because writers to the data files aren’t blocking out readers. Access to the data isn’t serialized.

It becomes easier to see how a database system can benefit from Direct IO. Of course, there is no substitute for actually testing the application, and that is really the only time when we can feel better about things, isn’t it. If only things always worked out as I thought they should.

One situation that I can think of where Direct IO might not be a good idea is for a database system that doesn’t have high-concurrent access and can’t take advantage of larger cache sizes. If it is limited to a 32 bit memory footprint, but the system has much more than that available, then the performance might be better by having the OS cache those file buffers.

If there is a moral to the story, I suppose it might be that when testing performance of a new system, test the performance of the applications that are actually going to be running. That is what matters in the end, no?

I’ll be teaching a a tutorial on System Topics in Oracle Database Administration at the USENIX LISA ‘07 Conference in Dallas, TX on November 11, 2007.

 

Over the past couple of releases of Oracle database, the line has been blurring between that of an SA and a DBA. This blur has been created by the inclusion of system’s software from Oracle where all things are normally the domain of the DBA. Now the DBA has access to volume management and clustering software among other things.

 

Each organization is going to assign responsibility differently, but I’ve been working with Oracle clusterware, Oracle ASM, and Oracle RAC for a long while now and I’ve learned a few things in the process. Whoever is going to be implementing these things needs to know what they are getting into. These topics are usually covered at Oracle database conferences. The SA’s need a way to learn about this technology as well, at that is one reason why I will be presenting the tutorial.

 

It is only a half day tutorial and there is going to be a ton of information. I’ve presented each of these topics on their on. Together for a half day only, this is going to be like drinking from a fire hose. It is going to quite a day. I am looking forward to it.

We’ll see if this means I blog more often!

One concern expressed by some about Oracle clusterware is how it does fencing. Some have expressed concern about the fact that it doesn’t use SCSI-3 reservations to implement IO fencing.At COLLABORATE 07 I spoke with an Oracle employee who works in Oracle RAC product-line about this topic. I was told that in part the decision was made to not use SCSI-3 because it isn’t needed and because requiring it, requires the use of higher-end (expensive) storage. When I asked how Oracle RAC could guard against corruption, I was told that what Oracle RAC does is sufficient to guard against database corruption and wouldn’t they be the best people to make that assessment?I pressed further and was told that no writes were going to happen unless the appropriate lock is held, and with Oracle RAC, even with split brain, that lock is going to be held by only one instance.That is hard for me to believe without seeing the code. What if no lock is held on a block before split brain and then each half of the “brain” requests a lock for the same block?I’ve worked on many RAC implementations that have used only Oracle clusterware and knock on wood… Time will tell. Would be nice to not need third-party integration.

Older Posts »