It’s a good practice to monitor your system memory from time to time especially in Oracle Applications E-Business Suite. Today we will focus on how to monitor performance the Java memory used by Oracle Applications.
You can query for top Java memory usage using the Unix script as below.
Multiply the result figure from first column with 4096 and divide by 1024 to obtain the value in kB.
Java Memory Monitoring
$ UNIX95= ps -eo vsz,ruser,pid,args | sort -rn | grep java | grep applprod
182332 applprod 4908 /opt/java1.4/jre/bin/PA_RISC2.0/java -DCLIENT_PROCESSID=4908
22588 applprod 24976 /opt/java1.4/jre/bin/PA_RISC2.0/java -DCLIENT_PROCESSID=24976
22588 applprod 14141 /opt/java1.4/jre/bin/PA_RISC2.0/java -DCLIENT_PROCESSID=14141
14396 applprod 24975 /opt/java1.4/jre/bin/PA_RISC2.0/java -DCLIENT_PROCESSID=24975
14396 applprod 14140 /opt/java1.4/jre/bin/PA_RISC2.0/java -DCLIENT_PROCESSID=14140
The output of the top Java memory doesn’t provide any details on what is the session that utilize lots of memory from the system.
You can use the query below to check and see what is the session that is tight to the running Java memory process.
Oracle Java Process Session
SELECT s.STATUS "Status",
s.logon_time "Connect Time",
SYSDATE - (s.last_call_et / 86400) "Last_Call"
FROM v$session s,
WHERE s.paddr = p.addr(+)
AND s.process = <REPLACE WITH Process ID FROM DCLIENT_PROCESSID>;
There are many ways of tuning the memory and we are still looking on the best practice on tuning Oracle Java memory such as tuning the memory heap size and using garbage collectors.
Next» Speed Up Blog With Apache .htaccess