Operating System - HP-UX
1752797 Members
5965 Online
108789 Solutions
New Discussion юеВ

Re: swapinfo showing wrong memory info

 
SOLVED
Go to solution
balaji_vvv
Frequent Advisor

swapinfo showing wrong memory info

We have system with 16G physical memory. But swapinfo -tam showing only 12G? But glance and other commands showing right memory 16g?
OS is 11iv1 on PA-risc

Mb Mb Mb PCT START/ Mb

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME

dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2

dev 12000 0 12000 0% 0 - 2 /dev/vg01/lvol11

reserve - 5033 -5033

memory 12724 9210 3514 72%

total 28820 14243 14577 49% - 0 -

Here is part of glance memory output

Total VM : 5.29gb Sys Mem : 2.57gb User Mem: 3.57gb Phys Mem: 16.0gb

Active VM: 2.75gb Buf Cache: 8.00gb Free Mem: 1.86gb
9 REPLIES 9
Patrick Wallek
Honored Contributor
Solution

Re: swapinfo showing wrong memory info

The 'memory' line of swapinfo does NOT mean the total memory in the system.

Have a look at the 'swapinfo' man page. Basically the memory line is the amount of memory used for 'pseudo-swap', which is roughly 75% of the total RAM in the system.

So if you have 16GB of RAM, the approximately 12GB value in the memory line is absolutely correct.
balaji_vvv
Frequent Advisor

Re: swapinfo showing wrong memory info

Thank you, that make sense. But in my other servers i'm seeing my physical memory and swapinfo memory matches. I need to tune the buffer cache anyways, its too much 8g?
Patrick Wallek
Honored Contributor

Re: swapinfo showing wrong memory info

>>Thank you, that make sense. But in my
>>other servers i'm seeing my physical
>>memory and swapinfo memory matches. I need
>>to tune the buffer cache anyways, its too
>>much 8g?

Examples, please? I've never seen an instance where the 'memory' line in swapinfo matches the amount of RAM in the system.

Also, this has nothing to do with buffer cache. The 'memory' line is 'pseudo-swap' which is enabled by the 'swapmem_on' kernel parameter being set to '1' (at least up to HP-UX 11.23 -- I think it is always on in 11.31).

Having buffer cache set to 8GB may be fine for you, but you should check the usage. You can check your read and write buffer cache activity by using 'sar -b' ('man sar' for details).
Ismail Azad
Esteemed Contributor

Re: swapinfo showing wrong memory info

Balaji,

The answers are absolutely right. The mem column of swapinfo is always pseudo swap when memory paging is enabled and is always enabled in HPUX 11iv3. Therefore it should not be reflecting the complete physical memory. Glance and the other commands are real time monitoring tools and will show you the right output and so will the commands machinfo and print_manifest.
Read, read and read... Then read again until you read "between the lines".....
balaji_vvv
Frequent Advisor

Re: swapinfo showing wrong memory info

Thanks you all.
See above
Michael Steele_2
Honored Contributor

Re: swapinfo showing wrong memory info

a)
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME

dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 12000 0 12000 0% 0 - 2 /dev/vg01/lvol11
reserve - 5033 -5033
memory 12724 9210 3514 72%
total 28820 14243 14577 49% - 0 -

Here is how you find your total swap:

dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 12000 0 12000 0% 0 - 2 /dev/vg01/lvol11

(* make sure you add up all the 'dev' swap not just line 2 *)

b) Tuning Buffer Cache

Question: Do users complain of the system hanging for a few seconds?

This is often an indication of a need for buffer cache tuning. Use sar -b and check these parameters:

%rcache >= 90, and %wcache >= 70%

You can also adjust the kernel parameters:
'dbc_min_pct' from (* 2 -to- 5 *) & 'dbc_max_pct' (* 5 -to- 10 *) kernel parameters.

Tune until the users say the hesitation goes away (* or gets as low as you can get it. *)

Note: This is problem is also often fixed by have the DBA re-indexing his database, especially in Oracle, which uses it's own cache in the SGA as well as the O/S system cache.

Also note that raw logical volumes have no buffer cache since the database is now performing reads and writes and the oupput from sar -b will be fairly worthless.

And finally note that unordered data, like a filesystem dedicated to writing oracle archive logs, will never see high cache hit rates because it is a flat file and not an ordered realational database.

Support Fatherhood - Stop Family Law
balaji_vvv
Frequent Advisor

Re: swapinfo showing wrong memory info

see above
Michael Steele_2
Honored Contributor

Re: swapinfo showing wrong memory info

As long as you learned how to add, np.
Support Fatherhood - Stop Family Law

Re: swapinfo showing wrong memory info

Hi (especially Patrick),

I have at least 4 systems where the memory line in swapinfo shows the whole physical memory.

System Hardware
Model: ia64 hp server rx4640
Main Memory: 8160 MB

HP UX B.11.23

borpd021:/homeroot# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 12288 115 12173 1% 0 - 1 /dev/vg00/lvol2
reserve - 5148 -5148
memory 8161 2674 5487 33%
total 20449 7937 12512 39% - 0 -
Regards,
Roland