Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 


java pool advice tips

Oracle Database Tips by Donald BurlesonNovember 20, 2015

Question:  What does the Java pool do inside the Oracle SGA, and how di I sze the Java pool properly?

Answer: The java pool is a RAM region within the Oracle SGA and the java pool RAM is used to provide:

  • Parsing of Java code and scripts
  • Installation tasks related to Java applications with Oracle 11g
  • Java stored procedure code parsing

The JAVA Pool holds the JAVA execution code in a similar manner to the PL/SQL cache in the shared pool. The JAVA pool is used by many internal routines, such as import and export, and should be sized at approximately 60 megabytes if no other JAVA will be utilized in the user applications.

Tuning and sizing the Java pool

Like all Oracle pools, the Java Pool uses a least-recently-used algorithm to ensure that the most "popular" Java stays pinned in RAM.  If the Java pool is undersized, Java performance may degrade because of the need to re-claim RAM space which has been aged out of the Java Pool.

With the Oracle JVM (Java Virtual Machine, you can guarantee that Java stays in RAM by placing Java in an Oracle stored procedure and pinning the package in the SGA with dbms_shared_pool.keep.  See Pinning Packages Objects in the Shared Pool.

In order to tune the best size for the Java pool within Oracle, either the AMM feature can be deployed or manual tuning can be conducted via the v$javapool and v$java_pool_advice dynamic performance views as shown in the following example listings: 

SQL> desc v$javapool

 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------   CATEGORY                                           VARCHAR2(16)
 MEMUSED                                            NUMBER

SQL> select * from v$javapool;

CATEGORY            MEMUSED
---------------- ----------
                    8755260

The dynamic performance view v$java_pool_advice provides details for tuning the Java pool for different pool sizes. These sizes range from 10% of the current Java pool size all the way to up to 200% of the Java pool size.

SQL> desc v$java_pool_advice

 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------     JAVA_POOL_SIZE_FOR_ESTIMATE                        NUMBER
 JAVA_POOL_SIZE_FACTOR                              NUMBER
 ESTD_LC_SIZE                                       NUMBER
 ESTD_LC_MEMORY_OBJECTS                             NUMBER
 ESTD_LC_TIME_SAVED                                 NUMBER
 ESTD_LC_TIME_SAVED_FACTOR                          NUMBER
 ESTD_LC_LOAD_TIME                                  NUMBER
 ESTD_LC_LOAD_TIME_FACTOR                           NUMBER
 ESTD_LC_MEMORY_OBJECT_HITS                         NUMBER


select
   estd_lc_size,
   estd_lc_load_time_factor,
   estd_lc_load_time,
   java_pool_size_for_estimate,
   java_pool_size_factor
from
   v$java_pool_advice;

ESTD_LC_SIZE ESTD_LC_LOAD_TIME_FACTOR ESTD_LC_LOAD_TIME
------------ ------------------------ -----------------
JAVA_POOL_SIZE_FOR_ESTIMATE JAVA_POOL_SIZE_FACTOR
--------------------------- ---------------------
           0                        1               138
                         12                     1
 
           0                        1               138
                         16                1.3333
 
           0                        1               138
                         20                1.6667

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.