Sunteți pe pagina 1din 3

~~~~~~~

If you are running Oracle on AIX and experiencing high memory usage and
swapping, there are 2 things that could help you on reducing the
consumption.

1) Setting environment variables


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Oracle always recommends using system thread scope for running Oracle
(please check note 259779.1).
Additionally, on AIX 5.2 or newer versions of AIX this will also result in
significantly less memory being allocated per process.
On AIX 4.3 and AIX 5.1 system thread scope is also recommended, but on
these systems it will have a less significant impact on memory usage per
process. On AIX 4.3 and AIX 5.1 you can additionally set the environment
variable NUM_SPAREVP to 1 for Oracle processes. This will significantly
reduce the memory allocated per Oracle process.
Use the following commands to set these environment variables prior to
starting the Oracle instance and the listener:
Add the following command into the script you use to set the Oracle
environment variables (for example where ORACLE_HOME and ORACLE_SID
are set).
* Bourne, Bash, or Korn shell:
Script is typically ~/.profile or /usr/local/bin/oraenv
$ AIXTHREAD_SCOPE=S; export AIXTHREAD_SCOPE
On AIX 4.3 and AIX 5.1 also add the following:
$ NUM_SPAREVP=1; export NUM_SPAREVP
* C shell:
Script is typically ~/.login or /usr/local/bin/coraenv
$ setenv AIXTHREAD_SCOPE S
On AIX 4.3 and AIX 5.1 also add the following:
$ setenv NUM_SPAREVP 1

2) applying APAR IY49415 and relinking Oracle


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This alternative requires more work and everytime an Oracle patch is applied,
this procedure has to be repeated.
This solution is available only for AIX 5.2 due to new functionality on
that OS version.
Cause
~~~~~
Current versions of AIX (AIX versions prior to AIX 5.2 + APAR IY49415) and the C
for AIX Compiler (versions prior to VAC 6 with APAR IY50551) have a restriction
that CONST data which contains pointers have to be loaded in a RW section (.data
)
of memory. The size of the .data section used by the oracle binary can be determ
ined
using the AIX command: `size -f $ORACLE_HOME/bin/oracle`.
Solution
~~~~~~~~
Long term solution: Future enhancements to AIX and the C for AIX Compiler will
eliminate this restriction, allowing CONST data containing pointers to be
located in the RO section (.text). Future Oracle versions compiled with this
enhancement will use less total memory for the Oracle processes because the
.text memory section is shared between multiple processes.
Short term solution: To reduce the memory requirement for the current Oracle
releases which were built without the compiler enhancement IBM has provided
APAR IY49415. APAR IY49415 allows the existing 9iR2 oracle executable to be
relinked with the CONST data structures containing pointers moved from the
.data to the .text section, reducing the RW (.data) memory requirement of each
Oracle process by approximately 1MB. APAR IY49415 is available from the IBM AIX
fix
distribution website. The relinking package available via ARU 5336110 (bug 30286
73).
ARU 5336110 contains a relinking script and a list of Oracle symbols which the
relinking script will move from the .data section to the .text section.
After you install APAR IY49415 and reboot the system you should follow these
steps to relink the oracle executable:
You can download the relinking script from:
https://updates.oracle.com/ARULink/PatchDetails/process_form?aru=5336110
Relink the oracle binary
~~~~~~~~~~~~~~~~~~~~~~~~
1) save your current version of $ORACLE_HOME/oracle
2) create a working directory $ORACLE_HOME/relink
3) cd to $ORACLE_HOME/relink
4) unzip the relinking package
5) link $ORACLE_HOME/bin/oracle to ./oracle0
6) run the script ./genscript to generate some required files and scripts
7) run ./relink.sh to generate the new oracle binary oracle0.new.$$
8) copy oracle0.new.$$ to $ORACLE_HOME/bin/oracle and verify that the
permissions match the original oracle binary.
Note that although IY50551 is addressing the compiler issue for AIX 5.2,
Oracle will take advantage of this only in future releases. Currently,
production releases will have to follow this procedure to circumvent this issue,
and do not require APAR IY50551.

References
~~~~~~~~~~
bug 3028673

Related
--------------------------------------------------------------------------------
Products
--------------------------------------------------------------------------------
Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - En
terprise Edition
Keywords
--------------------------------------------------------------------------------
COMPILER

S-ar putea să vă placă și