Monthly Archives: April 2012

Little things I didn’t know: difference between _enable_NUMA_support and numactl

In preparation for a research project and potential UKOUG conference papers I am researching the effect of NUMA on x86 systems.

NUMA is one of the key features to understand in modern computer organisation, and I recommend reading “Computer Architecture, Fifth Edition: A Quantitative Approach” from Hennessy and Patterson (make sure you grab the 5th edition). Read the chapter about cache optimisation and also the appendix about the memory hierarchy!

Now why should you know NUMA? First of all there is an increasing number of multi-socket systems. AMD has pioneered the move to a lot of cores, but Intel is not far behind. Although AMD is currently leading in the number of cores (“modules”) on a die, Intel doesn’t need to: the Sandy-Bridge EP processors are way more powerful on a one-to-one comparison than anything AMD has at the moment.

Continue reading


Limit nmon to certain disks

I am often working on systems with large number of LUNs, going into the hundreds. Trying to keep track is difficult at best. Sometimes though you might want to limit yourself to a specific number of disks-I knew about the dskfilt option in collectl but only today learned about a similar feature in nmon. The following is a very greatly simplified example of course, but it gives you the idea.

Assume you are interested in 4 disks-sd{a,b,c,d}. Let’s further assume that your disks are used for 2 ASM disk groups, DATA and RECO. You could create a file “disks.dat” with the following contents:

DATA sda sdb
RECO sdc sdd

Then pass that file to nmon with the -g flag. When you type “g” now, you are shown IO stats for those disks.

─────────────────Hostname=test──────────────────────Refresh= 2secs ───15:13.02─┐
│ Disk-Group-I/O ──────────────────────────────────────────────────────────────│
│ Name          Disks AvgBusy Read|Write-KB/s  TotalMB/s   xfers/s BlockSizeKB │
│ DATA               2   0.0%       0.0|0.0          0.0       0.0    0.0      │
│ RECO               2   0.0%       0.0|0.0          0.0       0.0    0.0      │
│ Groups= 2 TOTALS   4   0.0%       0.0|0.0          0.0       0.0             │

That is terrific, and very useful to hunt for bottlenecks. In addition, you have the “minimal mode” as well, which displays only busy disks and processors. Invoke it by pressing the “.” in interactive mode.

Grouping disks also works for the capacity planning mode. From the online help:

For Data-Collect-Mode = spreadsheet format (comma separated values)
 Note: use only one of f,F,z,x or X and make it the first argument
 -g <filename> User Defined Disk Groups (see above) - see BBBG & DG lines

Nothing stopping you now from benchmarking properly and focusing on the relevant detail! Don’t forget to run the raw file through nmon analyzer to get some eye-candy even a non-techie understands (it has lots of nice color!)

RMAN restore spfile from autobackup and compatible weirdness

Prompted by a recent interview I wanted to perform a little test with RMAN, and incrementally updated backups. I created a database on my Linux (OEL 5.5) test system and refreshed my understanding of this most useful rman feature (which is for another post).

So after I was happy with the working of the incrementally updated image copies I decided to see if I could restore my database with those. Time to use “drop database”, which removes spfile, data files, temp files and the control files. Tabula rasa!

But it didn’t matter I thought: I have controlfile/spfile autobackups and fully recovered image copies plus all the archived logs in the FRA. What could possibly go wrong? Well it took me 30 minutes to get the database back. Continue reading

WARNING: FAILED to load library: /opt/oracle/extapi/64/asm/orcl/1/

This post is long overdue, and it’s as much a reminder to myself as it is a post for you to find when scratching your head.

Here’s the situation: Oracle Restart on an Oracle Enterprise Linux 5.5 system with ASMLib in use. I have installed plus the latest PSU to bring database and Grid Infrastructure to far so good. I have used the non-GUI approach and everything seemed ok until I tried to create a database for some benchmarking. Continue reading

Exadata experience, what does that actually mean?

As an active member of the Oracle user community I really enjoy talking to delegates at user conferences and user group meetings. As such I was very lucky having had the opportunity to attend two of them recently. I have written about the OUGN spring conference in the post before this, and I also enjoyed the AIM meeting earlier in March.

One of the subjects that always seems to come up is Exadata. Many, many DBAs want to have Exadata experience, and if only to tick a box. Now Exadata means a significant investment, in other words not every company on the planet will have one. On the other hand it’s reasonably complex to administer, therefore recruiters and other HR personal are very interested in DBAs with “Exadata experience”. Now, the reason of this blog post is an open question to the readers: what do you consider as Exadata experience?

Continue reading

RMAN duplicate and read-only tablespaces

This one is to be filed under the “little things I didn’t really know until now” section: RMAN duplicate. Be honest to yourself: would you have known the answer to this question: what happens to tablespaces which are read-only on the source during an RMAN duplication (not for standby)?

Some background

I have started my career as a DBA on Oracle, and at the time not everyone fully embraced RMAN. OK, RMAN made it really hard at the time to fall in love with it. So when we “cloned” our production database to development, the following steps were followed:

  1. For each tablespace in the database, put it in hot backup mode and copy the files across to the destination location, then end the hot backup mode.
  2. Copy any archived logs generated in during the hot backup mode to DEV.
  3. Create a backup controlfile to trace.
  4. Edit the create controlfile statement (Set #2-resetlogs) and extract the “create controlfile” statement, adding the new database name in the “set” clause.
  5. Start DEV in nomount mode.
  6. Run create controlfile statement.
  7. Recover the database until cancel using the backup controlfile, applying all archived logs.
  8. Open the database with the resetlogs clause.

That worked ok, unless you had a data file offline or read only.

Continue reading