Академический Документы
Профессиональный Документы
Культура Документы
Rui Wang
Recently, we were experiencing memory usage problem while we created a domain index (Oracle
Text). The circumstance we are facing is that the memory was eaten up shortly after we started the
As we known, creating that domain index probably would takes over 2 days. It’s also what we’ve
been told by application vendor. After we started the process to create that domain index, we
monitored it by using solaris command “prstat” and noticed that the value of column ‘SIZE’ was
increasing continuously. The investigation we made in Toad also presented that the
“PGA_ALLOC_MEM” kept increasing crazily. And shortly, only this single process took over 8G on
Before we start to overcome it, we need to verify if that’s memory leaks first. Thanks for oracle
metalink article Note: 477522.1 How To Troubleshoot Memory Leaks on UNIX , we are able to easily
The first step is to create a solaris shell script as following, named mem.shl.
while true
do
done
sleep 30
done
And then, establish sqlplus connection to database and use SPID of this oracle session as input
29195
Okay, we are now ready to create domain index within above oracle session. Shortly after the
issuing of create index command, please start mem.shl script to monitor that process.
sh mem.shl
While the create index command is running, you’ll be noticed that there is output file created,
called ps.log.19704. The shell script mem.shl will produce memory calculation every 30 seconds
and write it to file ps.log.19704. The typical output of file ps.log.29195looks like below.
From output above (the column in color red), it’s very clear that the memory consumption is
For intuitive perspective, it’s better to create PivotTable in Microsoft Office Excel. Basically, the
figure 1 below shows typical memory leaks and figure 2 presents normal memory usage. Usually, the
memory leak process starts up and grows to specific amount of memory usage for a period of time
and, at one point of time, memory growth rises sharply to quite larger size of memory, like plotted
in figure 1.
For similar solution for other version of Unix, please refer to oracle metalink.
About the Author