1834694 Members
2065 Online
110069 Solutions
New Discussion

strange top report

 
SOLVED
Go to solution
Ali Saleh_1
Advisor

strange top report

High all;

Please help explaining this output of top command.

we are using:
Server: 9000/800/rp7420
Main Memory: 4058 MB
Processors: 2
OS: HP-UX 11.11
OS mode: 64 bit



swapinfo -tam
---------------
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 623 3473 15% 0 - 1 /dev/vg00/lvol2
dev 4000 620 3380 16% 0 - 1 /dev/swap02/lvol1
reserve - 3334 -3334
memory 3039 1085 1954 36%
total 11135 5662 5473 51% - 0 -



top output
----------
Load averages: 0.11, 0.12, 0.13
397 processes: 361 sleeping, 35 running, 1 zombie
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.12 3.4% 0.0% 1.4% 95.2% 0.0% 0.0% 0.0% 0.0%
1 0.10 7.2% 0.0% 5.0% 87.8% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.11 5.2% 0.0% 3.2% 91.6% 0.0% 0.0% 0.0% 0.0%

Memory: 2622612K (1958036K) real, 20252400K (19036452K) virtual, 12624K free Page# 1/37



My question relates to the virtual allocated memory(20252400K (19036452K) shown by top. our system has 4GB physical + 8GB swap. how 20GB of virtual space is allocated and where it is getting the extra space from.?????
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: strange top report

Shalom,

swapinfo is a utility written by HP, conforming to their definition of memory, which is ram plus swap.


top was not written conforming to this rule and is prone to make mistakes.

swapinfo is accurate when it disagrees with top.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yogeeraj_1
Honored Contributor

Re: strange top report

hi,

You can also verify this using glance -m

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Bill Hassell
Honored Contributor

Re: strange top report

top was designed for a simpler time (a few megs of RAM, simple swapping) so no one pays any attention to the memory line anymore. top has no code at all to account for the kernel parameter SWAPMEM_ON setting -- which changes the total virtual memory you have. The maximum virtual is either 8Gb (SWAPMEM_ON=0) and about 11Gb (SWAPMEM_ON=1). swapinfo shows (in the total line) that you have SWAPMEM_ON=1. And the USED section shows that you are short on RAM by at least 1200Mg which causes paging out to swap space.


Bill Hassell, sysadmin
Ali Saleh_1
Advisor

Re: strange top report

Dear All;

Thank you for your quick replies.

We don't have Glance; when we feel slowness in the system the first cmd we use
to check is the TOP cmd. on the memory line
the free memory is almost accurate, and the real memory figures are also acceptable, but the virtaul memory figures are very high value which exceeds the physical + swap installed on the system.

As I understand from your answers TOP is completly wronge on figures shown on memory line for virtual size of the processes on the system.

Is there any other means to see the virual size of the processes running on the system.

Best Regards
Bill Hassell
Honored Contributor
Solution

Re: strange top report

It really is not important to try to add up all the processes as this is not a complete indication of memory usage. There can be a lot of shared memory (which is not counted for an individual process) and buffer cache which will be missed. The only important metric is how much page-out is occurring. Page-out occurs when more RAM is needed than is available. That's where virtual memory allows more processes to be running at the same time. Now 'running' is a misnomer because some processes will be deactivated and a portion of their memory areas will be moved to swap space.

From a performance point of view, paging out has a terrible effect on processing, from 10:1 to 50:1 degradation for competing processes. Fortunately, you can measure this with vmstat. Just look at the po (page out) during the busiest periods, the po number should be 0 to about 10-20. 50 or more means too little RAM is available, and 100 or more means your system is crawling along.

You can see how much space is used by each process by using this command:

UNIX95=1 ps -e -o vsz,pid,ruser,args|sort -rn

the largest processes will be at the top of the list. As with top, shared memory, shared libraries and buffer cache will not be seen.

Now this is only part of the performance puzzle. A poorly designed database may cause massive amounts of disk activity, something that top does not measure.


Bill Hassell, sysadmin
Ali Saleh_1
Advisor

Re: strange top report

Dear Bill;

Thanks for your help, your answer was great.

Regards
Ali Saleh_1
Advisor

Re: strange top report

Thanks to all