Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Memory usage of an Oracle instance?

Go to solution
Timmy Sin

Memory usage of an Oracle instance?

Hi All,

Would someone know how to determine the memory usage of an Oracle instance in a HP-UX box?

I have tried the following:
1. "ipcs -mb" to determine the size of the SGA
2. Look up the RSS value for each background processes in glance.

It seems that total value obtained above is much bigger than the increase in "memory util" reported in glance.

Otherwise, whenever an Oracle instance starts, the total % of "swapinfo -t" will increase from 11 to 36 while there is still free memory. Is it normal?

Is there any way to tune down the memory usage of the background processes or it is platform-dependent?

Timmy Sin
Stefan Farrelly
Honored Contributor

Re: Memory usage of an Oracle instance?

1. is correct. This is the size of the SGA.
2. RSS values are not strictly accurate - remember most of the oracle daemons will be sharing memory - code will all be shared, only data and stack will be different. Try using this command instead for the size of the oracle daemons;
UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | more

You will see the oracle damons near the top. Size is in blocks. Its a bit more accurate but again not strictly 100%. Ignore swapinfo output - its to do with swap - NOT memory usage (memory line from swapinfo is swap - not memory usage). Use vmstat to see the most accurate figure for free memory (free column in pages * 4096 for Mb).

The most accurate way to see how much memory oracle is using is;
1. reboot
2. check free memory from vmstat
3. start oracle db (no users)
4. check free memory from vmstat. Compare to 2. This is how much memory oracle is using. Deduct SGA size from it and whats left is how much memory the oracle daemons are using collectively (remembering they share a lot).
And I dont belive you can adjust this - its dependant on the oracle version you are running (size of the binaries).
Im from Palmerston North, New Zealand, but somehow ended up in London...
Brian Crabtree
Honored Contributor

Re: Memory usage of an Oracle instance?

You should query the v$sga view to find the information on the SGA size. The size for the "ps -ef" will show the size of used blocks, but also show information for shared text blocks. Querying the database will give you the correct information you are looking for.

Esteemed Contributor

Re: Memory usage of an Oracle instance?

Hi Timmy,

Configure MTS mat help tuning down the memory usage.
Cause Momory was allocate to a dedicate process , even it idle.
MTS is shared server process that , user process can share server process.
but you need to tune the number of dispatcher and share server process.
enjoy any little thing in my life