Re: Calculating Physical memory for Oracle Sessions

  • From: "Jared Still" <jkstill@xxxxxxxxx>
  • To: "Jesse, Rich" <Rich.Jesse@xxxxxx>
  • Date: Thu, 30 Nov 2006 11:18:37 -0800

On 11/30/06, Jesse, Rich <Rich.Jesse@xxxxxx> wrote:

 Jared, wouldn't your formula multiply shared memory (e.g. Oracle SGA size
as reported by "ipcs -ma") by the number of Oracle processes (except for
procs that don't connect to the instance, like the listener)?  I think using
ps output that way would be like saying that adding 25% of "X" and 25% of
"Y" must equal 50% of "X+Y".

While I've never taken the time (had the time?) to dealve into it, I think
that pmap is accurate iff shared memory is accounted for.  The trick is to
determine if any other process is accessing that shared memory.


Which is another way of saying that pmap is not accurate.  ;)

My knee jerk is that this could be accomplished by making a "master" list of
shared memory (possibly using pmap outputs) to evaluate against whatever
subset of processes you would want to see.


I do it with ipcs and /proc/*/maps

This blog item mentions this problem, but doesn't really offer a solution:


http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-linux.html


I've probably already read that blog.

Kinda wierd that no one's thought of a solution (even if it's only a 99%
one) to this, ain't it?



I have a solution (for linux) that comes fairly close.

It involves a perl script to get a list of process ID's from ps, then
calculates the memory usage from raw data in /proc/*/maps. There
is also a small C program to get pagesize.

--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Other related posts: