Ask The Real Tom

November 1, 2010

Oracle Unbreakable Enterprise Linux Kernel – Info Pice

Filed under: operating system,oracle — Tags: , , , — admin @ 2:47 pm

I am just search since hours for the oracleasm-2.6.32 package … an just coulnd find it.

Now I just came across this pice of information. Maybe it shortens my search 🙂

Be advised that you will have to re-install oracleasm and ocfs2 if you want to revert to the previous PV kernel. Unbreakable Enterprise Kernel itself already includes ocfs2 and oracleasm, so the separate RPMs are not needed.

July 30, 2009

Solaris System Commands for Oracle DBA’s

Filed under: operating system,oracle — Tags: , , , , , — admin @ 8:21 am

During my work as Oracle DBA with the focus on performance tuning I have to check often stuff on the system level.

Here I like to share my command list for checking importent stuff on solaris 10.

cpu count

psrinfo -v

cpu info

 mpstat  #report per-processor statistics


/usr/sbin/prtconf | grep Mem
Memory size: 16384 Megabytes

64 or 32 bit

isainfo -v # available
uname -a   # running
isainfo -kv #active

show system error codes

man -s2 intro

Edit / Show process priority


Installed Software

 pkginfo | grep VERITAS


getfacl foo
setfacl -m user:jeff:rw- foo

Trace process

truss -p <pid>

Summary about system calls

truss -c -p <pid>

Follow forked childs

truss -f <cmd>

Prozess wait statistics

truss -c -p <pid>

DTrace dynamic tracing compiler and tracing utility


Examples dtrace

# New processes with arguments,
dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }'

# Files opened by process,
dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'

# Syscall count by program,
dtrace -n 'syscall:::entry { @num[execname] = count(); }'

# Syscall count by syscall,
dtrace -n 'syscall:::entry { @num[probefunc] = count(); }'

# Syscall count by process,
dtrace -n 'syscall:::entry { @num[pid,execname] = count(); }'

# Disk size by process,
dtrace -n 'io:::start { printf("%d %s %d",pid,execname,args[0]->b_bcount); }'   

# Pages paged in by process,
dtrace -n 'vminfo:::pgpgin { @pg[execname] = sum(arg0); }'

Dtrace References

report user-level lock statistics


report kernel lock and profiling statistics


Print the /proc tracing flags, the pending and held signals, and other /proc status information for each lwp in each process.


process tree


sysdef – output system definition

sysdef -i

ex. max processe kernel parameter

user@abc:/tmp $ sysdef -i |grep proc
  30000        maximum number of processes (v.v_proc)
  29995        maximum processes per user id (v.v_maxup)
  100  max undo entries per process (SEMUME)
  250  max attached shm segments per process (SHMSEG)
% prtconf | grep Mem
Memory size: 32760 Megabytes

% id -p
uid=59008(oracle) gid=10001(dba) projid=3(default)

% prctl -n project.max-shm-memory -i project 3
project: 3: default
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
        privileged      7.84GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
 prctl -n project.max-shm-memory -i project oracle

solaris 10

kernel parameter check

Take a userprocess id (ps -ef |grep ..)

prctl  <pid>

all parameter

prctl -i project oracle

Management Commands

Commands for managing project attributes include the following:

   * projects: Displays project memberships for users, lists projects from the project database, prings information on given projects.
   * newtask: Executes the shell or command in a new task in the current project.
   * projadd: Adds a new entry to the /etc/project entry.
   * projmod: Modifies information for a project in /etc/project.
   * projdel: Deletes a project from /etc/project.
   * rctladm: Displays/modifies global state of active resource controls, sets logging or actions.
   * prctl: Displays/modifies local resource controls.
   * ipcs: Identifies which IPC objects are being used in a project.
   * rcapadm: Manages rcapd memory-capping daemon.
   * prstat -J: Displays resource consumption on a per-project basis
   * priocntl -i project-name: Sets/displays scheduling parameters of the project.
   * poolbind -i project-name: Assigns a project to a resource pool.

process info

Memory by process (rss in kb)

ps -e -o pid,vsz,rss,comm |grep <cmdname>

Sumarize memory of a set of processes

ps -e -o pid,vsz,rss,comm |grep java|awk '{sum = sum + $2} END {print sum}'
ps -ly

GUI – top


May 15, 2009

Restore, Copy, Delete – the Script of the Day

Filed under: operating system,oracle — Tags: , , , , , — admin @ 7:38 am

Today, I want to share a short but genius script with you.

The script restored a backup pice from vertias netbackup and moves it to another server.
Simple, but very useful if you can just restore to production host, but no space for all files is availiable.
After the restore I need to do a dupicate of the production database.

while read line
# change namfe file
#grep "$line" renamefile > renamefile2
echo "get file $line from tape"
# restore datafile
bprestore -B -R /u05/db_backup/TXXXX01/dup/renamefile -p XXXX_F3d -C hostnbname-bck -s 04/12/09 -e 04/20/09 -L /tmp/restore.$$.log $line
# new filename
file2=`echo $line |sed -e 's/TXXXX01\//TXXXX01\/dup\//'`
# wait for file exists
echo "exists file2 check .."
while [ ! -f $file2 ]; do sleep 15; done
# wait for no process is accessing the file
echo "no process access on $file2 check .."
while [ $(fuser $file2 2>&1| awk '{FS=":"; print $2}' | wc -m) -gt 1 ]; do sleep 15; done
# copy to remote site
echo "copy file $file2 "
scp $file2 oracle@hostnameXY:/u00/app/oracle/admin/TXXXX01/backup/
# delete file
echo "delete file $file2 "
rm $file2
done < $FILE exit 0

On tricky thing is to read the man page of bprestore and understand the format for the renamefile

The content of the file has to be formated like this:

change /u05/bacukp/TXXXX01/ctl_TXXXX01_2009-04-12_22-01-26_s107189_p1 to /u05/db_backup/TXXXX01/dup/ctl_TXXXX01_2009-04-12_22-01-26_s107189_p1

May 4, 2009

Is Sun’s ZFS ready for Production (with Oracle Databases)?

Filed under: operating system,oracle — Tags: , , , , — admin @ 9:38 am

Answer: No!


  1. There are lot of things to tune, to get ZFS running with similar perfomance as on vxfv or ASM
  2. We hat frequent system hanging issues on several high load Oracle 10g Databases (only reboot hepled)
  3. Sun doe not really publish a real bug list, everthing you find form sun are maketing paper which tell you how cool ZFS is
  4. To find the truth you have search for blogs, forums, mailinglist with thousands of people reporting problems with ZFS
  5. No advantage of using ZFS. vxfs runs stable for more than 10 year, ASM runs stable for more than 5 years, ZFS still full of bugs

ZFS = Code + lots of Marketing

Run Oracle on vxfs or ASM (if you use solaris)

Update: The official bug list from Sun is here,

There are currently two bug listet (where are alle the others ?)

May 15, 2008

Solaris error 12, not enough space

Filed under: operating system — Tags: , , , , , — admin @ 11:37 pm

Who don’t know the Solaris errors:

  • unable to fork a process
  • Solaris error 12, not enough space
  • TNS-12500, TNS-12540, TNS-12560, TNS-00510

This errors are memory or swap related. Spezially swap allocation seems to be a mystery under solaris.
A description about solaris system errors is avaliable with the command:

man -s2 intro

So the question is: How much swap space do I need on solaris to run a oracle database?

An extract from somewhere describing solaris swap allocation:

The Virtual Swap Reserved is 12 gigabytes. This is the same as the application memory
size shown in the prtmem output. This is because for each application page a
corresponding backing storage is reserved on disk even though it is not being used. This
storage is just in case the system reaches critical shortage and the page has to be copied
out to disk during a write.

So if don’t want to deal with this error, just allocate at leas as much swap space as you have physical memory. Even your system administrator tell you something else (he don’t know).

May 14, 2008

Multi CPU bzip2

Filed under: operating system — Tags: , , , , — admin @ 9:08 pm

Not really oracle related, but a interesting thing and it’s performance related (which is my nr.1 passion)

Haven’t you been upset that bzip2 takes sooo long? Is CPU intensive but just uses 1 CPU (or core).

The solution is pbzip2 which can use multiple cpu’s

My Teste:

CPU: ntel(R) Core(TM)2 CPU 4400 @ 2.00GHz (cache: 2048 KB)

FIle: (mysql dump)

562M 2008-05-14 21:30 shopprod200805132200.dmp

bzip2 run

time bzip2 shopprod200805132200.dmp

real 3m23.115s
user 3m14.252s
sys 0m2.632s

time bunzip2 shopprod200805132200.dmp.bz2

real 1m43.184s
user 1m38.118s
sys 0m2.748s

pbzip2 run

time pbzip2 shopprod200805132200.dmp
real 2m29.084s
user 4m0.855s
sys 0m8.561s
time pbzip2 -d shopprod200805132200.dmp.bz2

real 0m59.406s
user 1m46.087s
sys 0m5.744s

So on my machine compression is about 36% faster. Decompression about 76 % faster.

Powered by WordPress