Operating System - HP-UX
1833788 Members
2686 Online
110063 Solutions
New Discussion

Memory - Glance vs. vmstat differences.

 
SOLVED
Go to solution
Gino Castoldi_2
Honored Contributor

Memory - Glance vs. vmstat differences.

Hi,

Svr: HPUX 11.11 2GB Ram Oracle 8.1.7.0 MC/SG 11.04 OVO 7.1 L3000

I am trying to determine how much free memory we have at any given point in time on our server. I am using glance and vmstat. I get two completly different numbers.

glance:
Free Mem: 270.3mb
vmstat:
r b w avm free
2 1 0 140078 69149

Any ideas as to what I should be using for metrics? (I want to gather some data for Oracle/kernel tuning purposes).

10 points to any good answer.
TIA, Gino
8 REPLIES 8
Geoff Wild
Honored Contributor
Solution

Re: Memory - Glance vs. vmstat differences.

Herfe's a c program that someone in the forumns wrote called memdetail.

Output like:

# memdetail
Memory Stat total used avail %used
physical 10080.0 3115.4 6964.6 31%
active virtual 657.2 534.5 122.7 81%
active real 313.3 220.8 92.5 70%
memory swap 7697.2 1771.9 5925.3 23%
device swap 26528.0 382.6 26145.4 1%


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: Memory - Glance vs. vmstat differences.

Gino,

I would always trust Glance over vmstat. The legacy tools like vmstat were developed years ago in the infancy of unix and don't always deal well with today's modern systems. Glance, on the other hand, has been designed, developed and improved over the years to give an accurate picture of what's really going on. That's why you spent the money for it, to trust it.


Pete

Pete
Gino Castoldi_2
Honored Contributor

Re: Memory - Glance vs. vmstat differences.

Hi,

Pete:
Makes sense, vmstat was not created when
multi-cpu, etc. were available.

Geoff:
Does that "c" program work with hp-ux 11.11?

10 points to any good answer.
TIA, Gino
Geoff Wild
Honored Contributor

Re: Memory - Glance vs. vmstat differences.

Yes it does - I run it on 11.11 and 11.0....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sridhar Bhaskarla
Honored Contributor

Re: Memory - Glance vs. vmstat differences.

Hi,

Glance: 270.3 MB
vmstat: 69149 pages = 69149*4 = 276596

That's almost equal??.

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

Re: Memory - Glance vs. vmstat differences.

Hi (Again),

I could have made it little better.

276596/1024 = 270.11 MB

Am I missing anything here?.

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

Re: Memory - Glance vs. vmstat differences.

Gurus,

Would it be Ok to get as follows?

echo "freemem/D"|adb -k /stand/vmunix /dev/kmem

There is no substitute to HARDWORK
Bill Hassell
Honored Contributor

Re: Memory - Glance vs. vmstat differences.

Free memory in HP-UX is never a simple question because HP-uX is a virtual memory system. Having truly free memory means that you're not using all the RAM you paid for. Often the question about free memory comes up from DBAs when they get cryptic Oracle (or Sybase, Informix, etc) error messages stating that the program is out of memory or not enough memory. I say cryptic because almost none of them define the memory category (ie, local or shared) and this makes troubleshooting difficult.

swapinfo -tm is the best way to see available memory. The total memory available is RAM + some % swap space. As mentioned, Glance shows actual memory usage and is much more accurate than vmstat or top.

There have been several posts here in the forums about Oracle and memory problems. Since you have only 2Gb of RAM, you are definitely going to feel performance pain with a lot of users. swapinfo will tell you (as well as Glance) how mush swap is being used. But also note that there are sysadmin safety fences (maxdsiz and ulimit -a) that will prevent programs from getting as much memory as they need. Read the memory and process management white papers (docs.hp.com) that talk about the limits for 32bit programs.


Bill Hassell, sysadmin