Operating System - HP-UX
1753938 Members
9011 Online
108811 Solutions
New Discussion юеВ

where does the memory go?

 
SOLVED
Go to solution
Dirk Fieremans
Advisor

where does the memory go?

HP-UX 11.00, minimal 'bastion' install with 512MB RAM

top shows:
Load averages: 0.14, 0.11, 0.09
42 processes: 40 sleeping, 2 running
Cpu states:
LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0.14 1.2% 0.0% 1.4% 97.4% 0.0% 0.0% 0.0% 0.0%

Memory: 8980K (5580K) real, 6024K (4612K) virtual, 164976K free Page# 1/2

the following shows the actual memory usage for all processes:
# UNIX95= ps -e -o ruser,vsz,pid,args | sort -rnk2 | more
root 2956 612 /usr/sbin/swagentd -r
root 872 947 sshd: root@0
root 744 818 /opt/openssh2/sbin/sshd
root 548 964 -sh
root 456 2545 psmctd
root 452 1 init
root 332 2563 /usr/sbin/stm/uut/bin/tools/monitor/disk_em
root 324 2734 /usr/sbin/stm/uut/bin/tools/monitor/dm_core_hw
root 304 2489 /usr/sbin/stm/uut/bin/sys/diagmond
root 300 2996 /usr/sbin/stm/uut/bin/tools/monitor/sysstat_em
root 300 2808 /usr/sbin/stm/uut/bin/tools/monitor/dm_memory
root 224 2552 /etc/opt/resmon/lbin/registrar
root 224 2197 /etc/opt/resmon/lbin/emsagent
root 192 1126 ksh
root 128 454 /usr/sbin/netfmt -C -F -f /var/adm/nettl.LOG00 -c /var/adm/c
root 124 21668 /usr/sbin/inetd -l
root 124 2207 /etc/opt/resmon/lbin/p_client
root 124 635 ps -e -o ruser,vsz,pid,args
root 108 585 /usr/sbin/cron
root 80 422 /usr/sbin/syslogd -DN
root 68 24287 /usr/sbin/getty console console
root 60 451 /usr/lbin/ntl_reader 0 1 1 1 1000 /var/adm/nettl /var/adm/co
root 60 441 /usr/lbin/nktl_daemon 0 0 0 0 0 1 -2
root 44 20425 /usr/sbin/audomon -p 20 -t 1 -w 90
root 32 290 /usr/sbin/syncer
root 0 29 vxfsd
root 0 24 lvmschedd
root 0 23 lvmkd
root 0 22 lvmkd
root 0 21 lvmkd
root 0 20 lvmkd
root 0 19 lvmkd
root 0 18 lvmkd
root 0 12 ttisr
root 0 11 strfreebd
root 0 10 strweld
root 0 9 strmem
root 0 8 supsched
root 0 4 unhashdaemon
root 0 3 statdaemon
root 0 2 vhand
root 0 0 swapper
RUSER VSZ PID COMMAND

When I check now with:
# swapinfo -t
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1048576 0 1048576 0% 0 - 1 /dev/vg00/lvol2
reserve - 15440 -15440
memory 401936 285024 116912 71%
total 1450512 300464 1150048 21% - 0 -

it shows that 285MB is used???
Can anybody explain this? Are it processes that are not removed from memory?

Thanks,
Dirk
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: where does the memory go?

Hi:

You are reading something into top that is not there. Top only knows about memory used by processes. Memory used by kernel data structures like buffer cache is invisible to top. You also need to look at shared memory via ipcs -ma.

You really need a tool like Glance to get good memory statistics. You can install a 30-day trial version from your application CD's.

If it ain't broke, I can fix that.
Paula J Frazer-Campbell
Honored Contributor

Re: where does the memory go?

Dirk
Top is not a good tool for looking at system memory - Glane is recomended.

Example:-

Total VM : 1.48gb Sys Mem : 350.7mb User Mem: 2.44gb Phys Mem: 6.00gb
Active VM: 279.9mb Buf Cache: 1.98gb Free Mem: 1.24gb

Note that buffer cache has 1.98gig of my system memory.

Have a look at dbc_max_pct (Dynamic buffer cache maximum percentage)

Paula
If you can spell SysAdmin then you is one - anon
Sridhar Bhaskarla
Honored Contributor

Re: where does the memory go?

Hi Dirk,

The value you see in the memory row in swapinto -t output is not the memory used by the system. It's the amount of reserve area that the system allocated as you have 'swapmem_on' kernel parameter turned on. Please note that it is not physically used. To get a better picture of how the memory is used, you need to open a 'glance' window and look at the memory screen if you have Glance+ installed.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Dirk Fieremans
Advisor

Re: where does the memory go?

wow, this forum responds faster than I can pick up the phone to call HP support.
I have some spare licenses of Glance+ which I'll use to increase a bit my knowledge on memory usage and distribution....

Thanks,
Dirk
Chris Huys WCsstest
New Member

Re: where does the memory go?

Dirk,

The memory goes to the buffercache. (check dbc_max_pct, I will buy you a beer if its not on 50%)

HP Response Center rulez!
:-)