1837191 Members
2427 Online
110114 Solutions
New Discussion

Re: Memory usage

 
Norman Lowe
Frequent Advisor

Memory usage

We have just installed an extra 2Gb RAM in our RP5430 to add to the existing 2Gb. Prior to this, physical memory usage was at or near 100%. After a very short while, memory utilisation is once again near 100%. While there are a fair number of processes running on the system, none of them appear to be terribly big. There are 6 Oracle databases, but all of their shared memory areas are quite small. How can I find exactly what is using all the memory?
11 REPLIES 11
Paula J Frazer-Campbell
Honored Contributor

Re: Memory usage

Hi

Glance - there is a 60 day trial version on the install cds.

Paula
If you can spell SysAdmin then you is one - anon
Jairo Campana
Trusted Contributor

Re: Memory usage

send output vmstat 5 5 , iostat, sar -u 5 5 , sar -q 5 3 , see log of STM/EMS
etc.

more data
legionx
James R. Ferguson
Acclaimed Contributor

Re: Memory usage

Hi:

You can create a list of the virtual sizes of processes on the system with the following:

# UNIX95= ps -e -o "user,vsz,pid,ppid,args" | awk 'NR>1' | sort -rnk2

Note the blank (space) character after the equal sign and before the 'ps' command. This kimits the setting of UNIX95 to this command only.

Note, however, that the virtual size (vsz) is in kilobyte size pages (see the 'ps' man pages) and excludes buffer cache and other shared components such as shared libraries and shared memory regions.

Remember, too, that if a program calls free() to free memoary it has allocated, that memory is only freed for the program's use until such time as it terminates. This may account for your near 100% overall utilization.

Regards!

...JRF...


Hai Nguyen_1
Honored Contributor

Re: Memory usage

Norman,

Do you know the value of your kernel parameter dbc_max_pct is? If not, run the command below and post its output:

# kmtune -q dbc_max_pct

If your dbc_max_pct is 50 (default value), you should bring it down to around 8 (based on 4GB RAM).

Hai
Michael Steele_2
Honored Contributor

Re: Memory usage

Glance advisor is probably best. Here's shared memory :

glance -adviser_only -syntax shmem.syntax -iterations 2 2>/dev/null

Cross reference with NATTCH in 'ipcs'.

Here's a good thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc27046ff9277d511abcd0090277a778c,00.html


Support Fatherhood - Stop Family Law
Shannon Petry
Honored Contributor

Re: Memory usage

Well, since my memory is exhausted, I forgot what to say....


just kidding, Glance is great at evaluation of problems like this. It will pinpoint where the problem is, as well as list the hogs. Many times, it is not one thing causing problems, but several.

Install the trial version from CD if you have not already. Then buy it from HP. Not a better tool I can think of for HP-UX.

Regards,
Shannon
Microsoft. When do you want a virus today?
Paddy_1
Valued Contributor

Re: Memory usage

Just wanted to add something that makes sense from your oracle perspective.Oracle comes with a package called STATSPACK which is of good use when you run memory usage stats.

That is it will show you SGA,PGA and other memory metrics from Oracle's perspective.

From the system perspective as people said use Glance.I use perfView which is another excellent tool from HP.

hope this helps
The sufficiency of my merit is to know that my merit is NOT sufficient
Caesar_3
Esteemed Contributor

Re: Memory usage

Hello!

You must understand this that OS try to use
the RAM and when running processes could stay
in the RAM and not go to swap the OS leave
them in RAM so the time of write/read from swap
not exist so your process run faster.
It's not mater the OS do the work of swapping
so don't wory.

To see which process take what size use the
top or for more info use glance plus.

Caesar
Sandip Ghosh
Honored Contributor

Re: Memory usage

Hi Norman,

I also support as told by Hai. I think your dbc_max_pct is still at the default value (50%).
If that is the case change it as early as possible to 8%. By the way, what is the output of sar -b 5 10. If the %rcache is near 100% you can bring down to 7% also. What ever you do the %rcache should not go down below 90%.

Sandip
Good Luck!!!
Norman Lowe
Frequent Advisor

Re: Memory usage

dbc_max_pct is 50.

sar -b 5 10 shows rcache at 100%

I will try changing dbc_max_pct to 8 and see how the system is then.
Hai Nguyen_1
Honored Contributor

Re: Memory usage

Norman,

For sure, after you have set dbc_max_pct down to 8, you will notice the change (for better) in memory utilization. With the default setting, dbc_max_pct gradually eats up RAM until it reaches the maximum allowed (50% or 2GB in your case.) HP recommends dbc_max_pct be set up to 300MB on a system. In addition, your oracle DBs already have their own SGAs and do not depend on dynamic buffer cache.

Hai