[ale] [On-topic] "wa" number in "top"?
Michael B. Trausch
fd0man at gmail.com
Fri Sep 29 23:31:37 EDT 2006
JK wrote:
>
> Any clues would be appreciated. Really, just knowing
> exactly what "wa" means would be a big help.
>
I/O wait. What is the system's swap usage during those time frames?
More than normal?
How about file I/O? Try supplementing your 'top' monitoring with the
vmstat program. Try:
fd0man at pepper:~[130]$ vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- --system--
----cpu----
r b swpd free buff cache si so bi bo in cs us sy
id wa
2 0 135684 160760 10232 137620 2 3 13 11 193 131 10 1
88 1
0 0 135684 160744 10232 137620 0 0 0 0 463 370 2 2
96 0
0 0 135684 160736 10232 137620 0 0 0 0 493 319 5 3
92 0
0 0 135684 160720 10232 137620 0 0 0 4 538 416 4 3
93 0
0 0 135684 160720 10232 137620 0 0 0 0 472 330 4 1
95 0
fd0man at pepper:~[0]$
The first parameter is number of seconds between updates, and the second
parameter is the number of times to report. It is most useful to run
'vmstat 1' and leave it go if I am trying to figure out where the
bottleneck on things is. In vmstat, it shows you interrupts, context
switches, and CPU usage by user/system/idle/wait. The very first line
shows the averages since boot up.
You may want to try using pmap, as well, on the process in question.
That might help to provide a clue, though only a basic clue and not
anything of terrible use, as far as I can tell. It just shows you what
the memory usage is for various parts of the application.
On init, pmap shows:
fd0man at pepper:~[0]$ pmap 1
1: init [2]
08048000 28K r-x-- /sbin/init
0804f000 4K rwx-- /sbin/init
08050000 132K rwx-- [ anon ]
b7dee000 4K rwx-- [ anon ]
b7def000 1172K r-x-- /lib/tls/i686/cmov/libc-2.3.6.so
b7f14000 28K rwx-- /lib/tls/i686/cmov/libc-2.3.6.so
b7f1b000 12K rwx-- [ anon ]
b7f29000 12K rwx-- [ anon ]
b7f2c000 84K r-x-- /lib/ld-2.3.6.so
b7f41000 4K rwx-- /lib/ld-2.3.6.so
bfa2b000 88K rw--- [ stack ]
ffffe000 4K ----- [ anon ]
total 1572K
fd0man at pepper:~[0]$
The "anon" portions, best as I can tell, belong to the program. I am
currently writing a program and I wanted to see if it had a memory leak
or not -- and I suspected it did -- and the line that reads now 132K for
init grew quite a bit. I cannot say it is the same for every program,
but my guess is that the line that reads 132K is the "heap" for the
program. If that number gets very big, the system starts going nuts. :)
HTH,
Mike
--
"Fate: Protects fools, children, and ships called /Enterprise/."
-- William T. Riker, ST:TNG, "Contagion"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
More information about the Ale
mailing list