Performance/Slowness issues while executing OPatch commands could be due to the following reasons :

  1. Possible Issue with environment ( IO Time / Heap / Disk Space etc)
  2. Possible issue with opatch tool itself

1. Check Possible environment issue

Step 1 : (Check Network I/O)

Check network IO speed using dd (data duplicator). Less than15 MB/Sec indicates a problem in the environment.

Command :

dd if=/dev/zero of=$ORACLE_HOME/testfile bs=4096 count=15000 oflag=direct,sync

(where ORACLE_HOME is the location where ORACLE_HOME is mounted)

NOTE: You need to specify the NFS location in “of=” in the above command.

Step 2 : (Check system memory)

Check available system memory.

Command :

Use “free -g” command to check free system memory. You can use other system commands like “top”.

Step 3 : (Check Swap Space)

Swap space should be at least 500 MB

Command :

free -m | grep -i swap

Step 4 : (Check Disk Space)

Check available Disk Space (Should be more than 10GB) and the disk space consumed by ORACLE_HOME

Command :

df -h

du -sh ORACLE_HOME

 

2. Enable OPatch debug :

Step 1:

Create a file called log.properties with the following parameters :

com.oracle.cie.gdr.helpers.DaoHelper=FINEST
.level=FINEST
com.oracle.level=FINEST
oracle.level=FINEST
com.bea.level=FINEST

Step 2:

set OPATCH_DEBUG flag

Linux :
export OPATCH_DEBUG=TRUE

Windows :
set OPATCH_DEBUG=TRUE

Step 3:

Execute the following command :

Linux :
export JAVA_VM_OPTION=”$JAVA_VM_OPTION -Djava.util.logging.config.file=log.properties -Doracle.installer.logLevel=FINEST -Doracle.installer.logPath=<full path of log directory>”

Step 4:

Run the opatch command and redirect the output to a file as shown below :

./opatch lsinventory > opatch_debug.out

Step 5 :

Collect the following files/directories and upload it to SR for further troubleshooting :

  • <ORACLE_HOME>/cfgtoollogs
  • Provide the file generated in Step 4 (opatch_debug.out)
  • zip the log directory specified in Step 3 (-Doracle.installer.logPath=<full path of log directory>)
  • /WLS_SPB_xxxx/tools/spbat/generic/SPBAT/logs ( Provide this If you are experiencing slowness only while running SPBAT)