Trying to determine how much memory, if any, is allocated at OS level for oracle processes outside PGA/SGA and shared libraries
So that when estimating memory sie for a Linux server processes*x is taken into account
i.e: RAM *.8 >= SGA + PGA + processes*X
X is the number I'm trying to estimate...
So: 11g Database, Using Huge Pages ASMM - RHEL 6
I connect an session to database and get:
oracle level:
SID Oracle User O/S User Session Program Machine PGA Memory (Kb) PGA Memory Max (Mb) UGA Memory (Kb) UGA Memory MAX (Mb)
--- ------------ --------- ------------------ -------- --------------- ------------------- --------------- -------------------
204 USRX USRX sqlplusw.exe WIN0010 1977 2 370 1
so right at connect time, it's some 2Mb PGA
And OS side:
cat /proc/17880/status
VmPeak: 1288268 kB
VmSize: 237644 kB
VmLck: 0 kB
VmHWM: 23856 kB
VmRSS: 23856 kB
VmData: 3816 kB
VmStk: 144 kB
VmExe: 183512 kB
VmLib: 15024 kB
VmPTE: 396 kB
VmSwap: 0 kB
and about same numbers if I use pmap -x
Then I execute some PL to allocate some 3GB PGA
declare
type myarray is table of varchar2(255) index by binary_integer;
x myarray;
begin
for i in 1 .. 10000000 loop x(i) := rpad('x',255,'x'); end loop;
end;
/
As expected, once PL completes I see:
SID Oracle User O/S User Session Program Machine PGA Memory (Kb) PGA Memory Max (Mb) UGA Memory (Kb) UGA Memory MAX (Mb)
--- ------------ --------- ------------------ -------- --------------- ------------------- --------------- -------------------
164 USRX USRX sqlplusw.exe WIN0010 3257 2970 498 1
So we used some 3Gb, and gave it back to OS upon completion
So far so good... Now Os level
While PL is running (PGA being used) I see:
VmPeak: 4382556 kB
VmSize: 2479964 kB
VmLck: 0 kB
VmHWM: 3069708 kB
VmRSS: 2229752 kB
VmData: 3816 kB
VmStk: 160 kB
VmExe: 183512 kB
VmLib: 15024 kB
VmPTE: 4712 kB
VmSwap: 0 kB
Threads: 1
So VmRSS: 2229752 kB, shows PGA is being accounted as such...
As expected, after PL completes we get:
VmPeak: 4382556 kB
VmSize: 239452 kB
VmLck: 0 kB
VmHWM: 3069708 kB
VmRSS: 32040 kB
VmData: 3816 kB
VmStk: 160 kB
VmExe: 183512 kB
VmLib: 15024 kB
VmPTE: 452 kB
VmSwap: 0 kB
Threads: 1
So VmRSS noticeably came down
Yet others like VmData, VmStk stayed put
Would it be correct to say that PGA goes in VmRSS and VmData + VmStk (4Mb) is that non shared "extra"os memory each single process would use?
thanks