To print out global statistics, use the -G flag. In this example, we will repeat it
five timesat two-second intervals.
# svmon -G -i 2 5
m e m o r y i n u s e p i n p g s p a c e
size inuse free pin work pers clnt work pers clnt size inuse
16384 16250 134 2006 10675 2939 2636 2006 0 0 40960 12674
16384 16254 130 2006 10679 2939 2636 2006 0 0 40960 12676
16384 16254 130 2006 10679 2939 2636 2006 0 0 40960 12676
16384 16254 130 2006 10679 2939 2636 2006 0 0 40960 12676
16384 16254 130 2006 10679 2939 2636 2006 0 0 40960 12676
The columns on the resulting svmon report are described as follows:
memory
Statistics describing the use of real memory, shown in 4 K pages.
size
Total size of memory in 4 K pages.
inuse
Number of pages in RAM that are in use by a process plus the number of
persistent pages that belonged to a terminated process and are still resident
in RAM. This value is the total size of memory minus the number of pages
on the free list.
free
Number of pages on the free list.
pin
Number of pages pinned in RAM (a pinned page is a page that is always
resident in RAM and cannot be paged out).
in use
Detailed statistics on the subset of real memory in use, shown in 4 K frames.
work
Number of working pages in RAM.
pers
Number of persistent pages in RAM.
clnt
Number of client pages in RAM (client page is a remote file page).
pin
Detailed statistics on the subset of real memory containing pinned pages, shown in
4 K frames.
work
Number of working pages pinned in RAM.
pers
Number of persistent pages pinned in RAM.
clnt
Number of client pages pinned in RAM.
pg space
Statistics describing the use of paging space, shown in 4 K pages. This data is
reported only if the -r flag is not used. The value reported starting with operating
system version 4.3.2 is the actual number of paging-space pages used (which
indicates that these pages were paged out to the paging space). This differs from
the vmstat command in that vmstat's avm column which shows the virtual
memory accessed but not necessarily paged out.
size
Total size of paging space in 4 K pages.
inuse
Total number of allocated pages.
In our example, there are 16384 pages of total size of memory. Multiply this number
by 4096 to see the total real memory size (64 MB). While 16250 pages are in use,
there are 134 pages on the free list and 2006 pages are pinned in RAM. Of the total
pages in use, there are 10675 working pages in RAM, 2939 persistent pages in RAM,
and 2636 client pages in RAM. The sum of these three parts is equal to the inuse
column of the memory part. The pin part divides the pinned memory size into working,
persistent and client categories. The sum of them is equal to the pin column of the
memory part.There are 40960 pages (160 MB) of total paging space, and 12676
pages are in use. The inuse column of memory is usually greater than the inuse
column of pg spage because memory for file pages is not freed when a program
completes, while paging-space allocation is.
=====================
Memory bottlenecks
The following section describes memory bottleneck solutions with the
following commands: vmstat, svmon, ps.
1.vmstat
Run the following command:
vmstat 1
NOTE: System may slow down when pi and po are consistently non-zero.
pi number of pages per second paged in from paging space
po number of pages per second paged out to paging space
When processes on the system require more pages of memory than are
available in RAM, working pages may be paged out to paging space and then
paged in when they are needed again. Accessing a page from paging space
is considerably slower than accessing a page directly from RAM. For this
reason, constant paging activity can cause system performance degradation.
NOTE: Memory is over-committed when the fr:sr ratio is high.
fr number of pages that must be freed to replenish the free list or to
accommodate an active process sr number of pages that must be examined
in order to free fr number of pages
An fr:sr ratio of 1:4 means for every one page freed, four pages must be
examined. It is difficult to determine a memory constraint based on this ratio
alone and what constitutes a high ratio is workload/application dependent.
NOTE: Memory is over-committed to the point of thrashing when
po*SYS>fr.
The system considers itself to be thrashing when po*SYS > fr where SYS is a
system parameter viewed with the schedtune command. The default value is 0
if a system has 128MB or more. Otherwise,the default is 6. Thrashing occurs
when the system spends more time paging than performing work. When this
occurs, selected processes may be suspended temporarily, and the system
may be noticeably slower.
2.svmon
As root run the following command:
# svmon -Pau 10 | more
This command lists the top ten memory using processes and gives a report
about each one. In each process report, look where Type = work and
Description = private. Check how many 4K (4096 byte) pages are used under
the Pgspace column. This is the minimum number of working pages this
segment is using in all of virtual memory. A Pgspace number that grows, but
never decreases, may indicate a memory leak. Memory leaks occur when an
application fails to deallocate memory.
341 * 4096 = 1,396,736 or 1.4MB of virtual memory
3. ps
Run the following command:
ps gv | head -n 1; ps gv | egrep -v "RSS" | sort +6b -7 -n -r
size
amount of memory in KB allocated from page space for the memory segment
of Type = work and Description = private for the process as would be
indicated by svmon.
RSS
amount of memory, in KB, currently in use (in RAM) for the memory segment
of Type = work and Description = private plus the memory segment(s) of Type
= pers and Description = code for the process as would be indicated by
svmon.
trs
amount of memory, in KB, currently in use (in RAM) for the memory
segment(s) of Type = pers and Description = code for the process as would
be indicated by svmon.
%mem
RSS value divided by the total amount of system RAM in KB multiplied by
100.
But on AIX 4.3.3 (at least at my machines) the output of the svmon looks different, and the most important thing :
the "in use" column at the memory section is not equal to size-free.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.