Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Controlling size of processes
A copy of this was sent to Arno Schaefer <Arno.Schaefer_at_lhsystems.com>
(if that email address didn't require changing)
On Wed, 16 Sep 1998 09:40:23 +0200, you wrote:
>Hi all,
>
>is there any way to control the size of oracle client processes running
>on the server (Sun Solaris or Unix)? At the moment they need about 60M
>of memory.
>
>Thanx, Arno
don't forget to subtract the size of your SGA from that -- Consider:
ps and top are extremely unreliable when considering applications that use shared memory. The following is cut and pasted from TOP. Consider my processes:
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
3006 oracle73 33 0 26M 1812K sleep 0:36 0.00% 0.00% oracle 3004 oracle73 34 0 26M 1364K sleep 0:05 0.00% 0.00% oracle 3002 oracle73 34 0 26M 1312K sleep 0:05 0.00% 0.00% oracle 3000 oracle73 34 0 26M 1308K sleep 0:03 0.00% 0.00% oracle 2948 oracle73 23 0 3192K 800K sleep 0:00 0.00% 0.00% tnslsnr 446 oracle73 29 0 2060K 652K sleep 0:00 0.00% 0.00% oraweb21 3008 oracle73 34 0 26M 1760K sleep 0:00 0.00% 0.00% oracle
So, each oracle process takes 26 meg and we see 5 of them -- thats 130meg (but wait my system only has 64meg on it! See:
Memory: 58M real, 2176K free, 76M swap, 399M free swap
76M swap + 58M real = 134M but you have to consider that I have other things running on here as well like 2 other oracle instances and 2 webservers. Something doesn't add up!
Ok, lets change the size of my sga and bounce that database. I changed FROM:
SVRMGR> show sga
Total System Global Area 14724056 bytes Fixed Size 39816 bytes Variable Size 8122448 bytes Database Buffers 6553600 bytes Redo Buffers 8192 bytes
TO:
SVRMGR> startup
ORACLE instance started.
Total System Global Area 30028856 bytes Fixed Size 39816 bytes Variable Size 9500848 bytes Database Buffers 20480000 bytes Redo Buffers 8192 bytesDatabase mounted.
Now, top shows me:
Memory: 58M real, 972K free, 91M swap, 369M free swap
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
4521 oracle73 28 0 42M 808K sleep 0:00 0.80% 0.31% oracle 4517 oracle73 33 0 42M 976K sleep 0:00 0.26% 0.10% oracle 4515 oracle73 34 0 42M 936K sleep 0:00 0.14% 0.05% oracle 4513 oracle73 33 0 42M 900K sleep 0:00 0.12% 0.05% oracle 4523 oracle73 25 0 42M 788K sleep 0:00 0.11% 0.05% oracle 4519 oracle73 33 0 42M 916K sleep 0:00 0.11% 0.04% oracle 2948 oracle73 23 0 3192K 796K sleep 0:00 0.00% 0.00% tnslsnr 446 oracle73 29 0 2060K 648K sleep 0:00 0.00% 0.00% oraweb21
so, we added about 16meg to our SGA and all of a sudden, we added 16meg (26meg from before + 16meg = 42meg) to each of our processes! --- wrong, these tools don't discriminate between shared memory and and 'process' memory. The SGA is added in to each and every process. You need to take it out (so the 42 is really 42-30 = 12m *however* only a portion of that is RESident (and thats what you care about) but you cannot discrinimate between SGA pages attached and active in the RES and the actual malloc'ed memory a process has. the tools are letting you down here as ps will not tell you the difference between shared memory and process memory.
v$sesstat is the way to get to get memory used by a session.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Sep 16 1998 - 09:22:29 CDT