1835920 Members
4021 Online
110088 Solutions
New Discussion

Re: Memory usage.

 
samir hamshari
Occasional Contributor

Memory usage.

Hi,
I am an oracle DBA, we currently have 4 Oracle Apps instances running on HP/UX 11.0, N-Class. We are planning on adding one more Oracle instance to the server. Currently the server is 4 CPU with 6GB of Physical Memory.
I am trying to find out if we need to add more RAM to the server. I got hold of this command
UNIX95= ps -e -o "user,vsz,pid,ppid,args" , made up a script to sum up all "memory" usage.
During off hours, all instances are up, but not to much activity the sum was almost 8GB. During peak time the sum was close to 13GB.
My questions,
1- Is this a valid approach to decide whether we need to add more RAM?
2- What is vsz really presents? How could my sum be 13 GB while I only have 6 GB physical?

Thanks.
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Memory usage.

First of all, you could have 13GB or even 30GB's of process space with only 1GB of physical memory as long as you had plenty of swap. The machine would barely perform but it could be done. You are not limited by the amount of physical memory but rather the amount of virtual memory.

vsz is actually made of stack space, text space, and data space (including shared memory). It's very possible to have your kinds of totals because many processes (imagine 10 vi's running) would use the same code space (text) and shared libraries but would have unique data and stack spaces. ps counts each of those text spaces even though there is really only one. The same is true is many processes (like oracle) are attached to common shared memory segments.

A better gauge of memory is glance or use vmstat and only pay attention to pageout's (po). If those are anything other than very small number, you are feeling memory pressure.



If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: Memory usage.

I personally would try running RDA from Oracle to check your system.

Glance would be helpful. You can try it out on a 60 day license, even if your company doesn't want to pay for it.

If not, do a sar analysis. I'm trying to attach an adjustable data collection script that will let you determine now long to collect the data.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sridhar Bhaskarla
Honored Contributor

Re: Memory usage.

Hi Samir,

The best way to calculate the free memory on the server is to use vmstat if you don't have glance installed.

Run vmstat and note the value under free column. This listed in pages. So multiply that number with 4k (page size) and you will get the free memory on the system approximately. If it is very low and if you see a good number in po column of vmstat, then you may be in short of memory.

Glance will give you a very good picture of memory utilization. Run glance and type "m" to get the memory report.

Also make sure you are not running with the default dbc_max_pct kernel parameter. Run kmtune -l -q dbc_max_pct. Make sure you set it to a percent to get around 400MB.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
paul courry
Honored Contributor

Re: Memory usage.

Remember, memory is the cheapest performance enhancer you can buy. When in doubt, more is better than less.