System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

hp-ux 11.31 show "real" memory usage?

SOLVED
Go to solution
boje
Regular Advisor

hp-ux 11.31 show "real" memory usage?

Hi!

We use cacti to view system usage on our machines. Cacti shows that almost all memory is used by the system. We have 96GB of RAM in one machine and only one SAP system running on that machine. top shows the same amount of RAM usage as cacti. But someone told me that the hp-ux 11.31 os is not letting go of the memory before it is used. How could i know how much memory is really used? I have just moved this SAP system from a 11.23 machine with 40GB RAM, and it was fine on that. Why is top showing that almost all memory is used? It is the same on my other new 11.31 machines.

Br
Patrik
25 REPLIES
Dennis Handly
Acclaimed Contributor
Solution

Re: hp-ux 11.31 show "real" memory usage?

It wouldn't the output of top to determine memory usage. What does "swapinfo -tam" show?

>Why is top showing that almost all memory is used?

Using all of memory is a good thing.
What have you configured for filecache_max(5)?
boje
Regular Advisor

Re: hp-ux 11.31 show "real" memory usage?

Hi!

This is the results:
filecache_max 49032728576 Default Auto

: swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol2
dev 48000 0 48000 0% 0 - 2 /dev/vg00/lvol10
reserve - 49188 -49188
memory 93523 11604 81919 12%
total 149715 60792 88923 41% - 0 -


I know swap is not enough. But it should not swap anything. The goal is that non swapspace should be used.

Br
Patrik
Ganesan R
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

Hi,

Use kmeminfo tool to see the physical memory usage system and user process wise..
Best wishes,

Ganesh.
boje
Regular Advisor

Re: hp-ux 11.31 show "real" memory usage?

Hi!

How do i get the kmemtool fro hp-ux 11.31?

Br
Patrik
Fabio Ettore
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

Hi,

kmeminfo could be downloaded from here:

ftp://eh:spear9@hprc.external.hp.com

You have to download toolset.64bit.exe. When executing that you'll have kmeminfo tool.

Best regards,
Fabio
WISH? IMPROVEMENT!
Dennis Handly
Acclaimed Contributor

Re: hp-ux 11.31 show "real" memory usage?

>reserve - 49188 -49188
>memory 93523 11604 81919 12%
>total 149715 60792 88923 41%
>I know swap is not enough.

Why do you say that? You have plenty of memory (pseudo-swap), you don't need device swap.

>But it should not swap anything. The goal is that non swapspace should be used.

Exactly. It appears that when you did swapinfo, you weren't under memory pressure that you first mentioned.

boje
Regular Advisor

Re: hp-ux 11.31 show "real" memory usage?

Hi Dennis!

i only say so because everyone is talking about swap should be double the memory. But i do not understand why, because you do not want the machine to swap at all.

How do i read the swapinfo -tam right? to understand if memory is under pressure? As i said before the top command shows only 3,7GB of free ram.

Br
Patrik
Dennis Handly
Acclaimed Contributor

Re: hp-ux 11.31 show "real" memory usage?

>i only say so because everyone is talking about swap should be double the memory. But i do not understand why, because you do not want the machine to swap at all.

Exactly. If you read similar issues in the forum you'll see the experts poo-poo that double the memory cliche. Especially if you have 100 Gb.

>How do I read the swapinfo -tam right? to understand if memory is under pressure?

swapinfo shows only 12% of memory being used now.
Ganesan R
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

Hi,

swapinfo will not show anything related to physical memory usage. It will display the swap space details. The memory column in swapinfo is not the physical memory usage which people misinterpret. It is pseduo swap which is part of physical memory.

If you really want to know the physical memory usage use kmeminfo tool or glance.
Best wishes,

Ganesh.
VK2COT
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

Hello,

The old (archaic) rule of swap should be
1 or 2 x RAM is outdated.

By the way, it is a bad idea to
have multiple paging devices on the same
physical disks:

dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol2
dev 48000 0 48000 0% 0 - 2 /dev/vg00/lvol10

I do not know how many disks are in VG vg00,
but I hope your two paging devices are not
on the same PVs. That is one of the basic
rules when we teach HP-UX System and Network
Administration courses (SNA I and II).

Since you use HP-UX 11.31, I would only
have primary swap (small, 4 or in your case
8 GB)... The idea is not to swap ever :)

Cheers,

VK2COT



VK2COT - Dusan Baljevic
Ganesan R
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

boje
Regular Advisor

Re: hp-ux 11.31 show "real" memory usage?

Thank you all for your replies!

I have downloaded the toolset.64bit.exe but do not know how to extract it. Nothing happens. Should it be renamed?

VK2COT: Unfortunately this is on the same PV.
i could just remove the swapspace i added. Because it was 8GB before.

Br
Patrik
Fabio Ettore
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

Hi,

- take toolset.64bit.exe in /tmp;
cd /tmp
chmod 555 toolset.64bit.exe
./toolset.64bit.exe

You'll see kmeminfo and so:

./kmeminfo
./kmeminfo -user

Best regards,
Fabio
WISH? IMPROVEMENT!
boje
Regular Advisor

Re: hp-ux 11.31 show "real" memory usage?

Hi!

I am really tired today, tried to open the file in windows :)

kmeminfo shows the same result as top.

Br
Patrik
Don Morris_1
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

v3 is really no different than v1 or v2 in this respect. HP-UX historically favors caching for performance -- if there's no memory pressure, memory is allowed to remain in caches instead of being fully "Free" -- hence you can expect free memory to go down to and linger around 1%.

Given your filecache_max is the default 50%, and assuming filecache_min is also the default (5%) -- that's 45% of reservable memory (95% of RAM) likely in this cache if there isn't much load. [This is where kcusage or kmeminfo details are helpful... what amounts does it show for User? Kernel Dynamic? UFC?]

Your swapinfo output does show little in the memory swap category -- so your kernel dynamic shouldn't be very large. Hence, my suspicion that you're just using all of the file cache. Which is fine -- you'll get that memory back when and if you need it.
Fabio Ettore
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

Hi,

could you post the output of kmeminfo?

Best regards,
Fabio
WISH? IMPROVEMENT!
boje
Regular Advisor

Re: hp-ux 11.31 show "real" memory usage?

Hi!

I do not have glance installed. It has been reduced since it´s an extra cost. We run BASE OE on these machines.

Here is result from kcusage and kmeminfo:

: kcusage
Tunable Usage / Setting
=============================================
filecache_max 49011838976 / 49032728576
maxdsiz 29638656 / 1073741824
maxdsiz_64bit 536870912 / 103079215104
maxfiles_lim 210 / 4096
maxssiz 540672 / 8388608
maxssiz_64bit 2097152 / 1073741824
maxtsiz 7221248 / 100663296
maxtsiz_64bit 201326592 / 1073741824
maxuprc 83 / 4096
max_thread_proc 101 / 3000
msgmni 2 / 4096
msgtql 0 / 4096
nflocks 64 / 8192
ninode 1497 / 48192
nkthread 734 / 10000
nproc 311 / 4200
npty 0 / 60
nstrpty 6 / 60
nstrtel 0 / 60
nswapdev 2 / 32
nswapfs 0 / 32
semmni 126 / 8192
semmns 441 / 16384
shmmax 20401094656 / 103079215104
shmmni 33 / 512
shmseg 10 / 300


: ./kmeminfo -user
tool: kmeminfo 5.19
unix: /stand/vmunix 11.31 64bit IA64 on "asterix"
core: /dev/kmem live
link: Tue Apr 07 16:52:14 METDST 2009
boot: Tue Apr 7 16:56:50 2009
time: Fri Apr 17 14:49:05 2009
nbpg: 4096 bytes


----------------------------------------------------------------------
Summary of processes memory usage:

List sorted by physical size, in pages/bytes:

virtual physical swap
pid ppid pages / bytes pages / bytes pages / bytes command
7003 6863 1 4.0k 0 0.0k 0 0.0k disp+work
6992 1 1 4.0k 0 0.0k 0 0.0k oracle
8400 1 1 4.0k 0 0.0k 0 0.0k oracle
5459 1037 1 4.0k 0 0.0k 0 0.0k sshd
physical swap
pages / bytes pages / bytes
Total: 0 0.0k 0 0.0k

Also a full kmeminfo:

: ./kmeminfo
tool: kmeminfo 5.19
unix: /stand/vmunix 11.31 64bit IA64 on "asterix"
core: /dev/kmem live
link: Tue Apr 07 16:52:14 METDST 2009
boot: Tue Apr 7 16:56:50 2009
time: Fri Apr 17 15:35:06 2009
nbpg: 4096 bytes


----------------------------------------------------------------------
Physical memory usage summary (in page/byte/percent):

Physical memory = 25157963 96.0g 100%
Free memory = 862796 3.3g 3%
User processes = 0 0.0b 0% details with -user
System = 20 80.0k 0%
Kernel = 0 0.0b 0% kernel text and data
Dynamic Arenas = 1210620 4.6g 5% details with -arena
btree_chunk_are = 549753 2.1g 2%
vm_pfn2v_arena = 98640 385.3m 0%
BTREE_NODE_OLA_ = 63083 246.4m 0%
vx_global_kmcac = 50131 195.8m 0%
FCACHE_ARENA = 45252 176.8m 0%
Other arenas = 403761 1.5g 2% details with -arena
Super page pool = 15881 62.0m 0% details with -kas
Static Tables = 1382674 5.3g 5% details with -static
pfdat = 1228416 4.7g 5%
vhpt = 131072 512.0m 1%
text = 9186 35.9m 0% vmunix text section
bss = 5137 20.1m 0% vmunix bss section
nbuf = 4788 18.7m 0% bufcache headers
Other tables = 4073 15.9m 0% details with -static
Buffer cache = 20 80.0k 0% details with -bufcache


I do not get much from this information.

Br
Patrik
Don Morris_1
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

Just as a side comment, 5.19 is really old. That's likely why the User result is pretty obviously garbage (I seriously doubt there's no processes running, including kmeminfo itself). This also predates UFC, which is why you don't see where most of the memory is [kcusage shows that UFC is at 49011838976 or 45.6Gb]. The arenas contributing to kernel dynamic (which is pretty low as expected) are file/process related mostly (Btrees are sub-region VM metadata, pfn2v is just a per-page cost and unrelated, VxFS and Fcache is kind of obvious). Beyond that -- the Static costs are unavoidable, so don't worry about them.

Personally, I'd say leave the system alone -- it is working as expected and you'll get the memory back from the file cache when you need it.

If there's some pressing terrible reason you really want to see more free RAM you can reduce filecache_max to be closer to filecache_min -- forcing UFC to release the memory back to the system.
boje
Regular Advisor

Re: hp-ux 11.31 show "real" memory usage?

Thank you!

This has been a great thread for me. Really useful!
I will leave the system alone... :)
I just think it´s sad that i do not know how much more i can push the system. For example if i want to run another SAP system on this one. The only way to see if it can handle it, is to start SAP and see if the machine starts swaping?

Br
Patrik
Ganesan R
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

Hi,

You should use the latest version of kmeminfo tool. The output which you provided is not the actual one.

Not possible to come to a conclusion with this output. But from my experience kmeminfo is the great tool to analyse physical memory usage.

You can get the tool from HP if you could contact them.
Best wishes,

Ganesh.
Don Morris_1
Honored Contributor

Re: hp-ux 11.31 show "real" memory usage?

No -- you know that you have 3Gb laying around idle that another SAP could use... and you have 45% of memory (50% max - 5% min) which SAP can contend for. That won't cause paging [swapping is when processes are deactivated and should only happen under critically low memory situations] per se -- if the file-backed pages are unmodified, they'll just be dropped. If they were modified, they have to be sync'd eventually anyway.

A trivial way to test the effect of raising your workload by N Gb is to write a program with mlock privileges, allocate N Gb and mlock it -- then look at swapinfo (is any swap actually used), po in vmstat (may get a spike since UFC pageouts count, but should settle down), etc. But in essence -- the memory between max and min is available and fairly easily reclaimable for new workloads. No promises that less memory available for filecache won't affect performance of the system aftwerwards, of course if there's a lot of file I/O involved in said workloads.
UVK
Trusted Contributor

Re: hp-ux 11.31 show "real" memory usage?

Did you try using glance. Glace give you much moe detailed information.

Does you system has any zombi's ?
-------------------------------------------
Like it or worked !! Click kudos !!
Dennis Handly
Acclaimed Contributor

Re: hp-ux 11.31 show "real" memory usage?

>UVK: Does you system has any zombies?

Why do you care? They don't take memory/CPU resources.
boje
Regular Advisor

Re: hp-ux 11.31 show "real" memory usage?

Hi!

I do not have glance installed.

I will contact HP support for latest kmeminfo tool.

What´s a Zombie?

Br
Patrik