Kris 張
unread,Jul 27, 2010, 8:17:57 AM7/27/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 銀興科技SilverShineTech
使用者反應:
跑vasp時,cpu的使用率會超過100%
# top
---
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20907 zrxiao 24 0 894m 700m 11m R 130.8 3.5 240:36.19 vasp
20908 zrxiao 23 0 897m 703m 11m R 126.8 3.5 240:40.56 vasp
20904 zrxiao 25 0 880m 702m 28m R 99.1 3.5 240:51.33 vasp
20906 zrxiao 25 0 885m 686m 11m R 99.1 3.4 241:32.73 vasp
20910 zrxiao 25 0 878m 691m 11m R 99.1 3.5 241:06.29 vasp
20909 zrxiao 24 0 911m 709m 11m R 83.2 3.5 240:28.08 vasp
20911 zrxiao 24 0 880m 688m 11m R 81.2 3.4 241:05.45 vasp
20905 zrxiao 25 0 882m 689m 11m R 77.3 3.4 240:59.25 vasp
---
關於cpu proc usage, 可以用sar 觀察
$ sar -P ALL 1 2
Linux 2.4.21-60.ELsmp (lcg00122) 07/27/2010
10:05:47 AM CPU %user %nice %system %iowait
%idle
10:05:48 AM all 63.98 0.00 3.27 0.00
32.75
10:05:48 AM 0 60.61 0.00 2.02 0.00
37.37
10:05:48 AM 1 66.67 0.00 6.06 0.00
27.27
10:05:48 AM 2 64.00 0.00 3.00 0.00
33.00
10:05:48 AM 3 64.65 0.00 2.02 0.00
33.33
10:05:48 AM CPU %user %nice %system %iowait
%idle
10:05:49 AM all 64.66 0.00 5.51 0.00
29.82
10:05:49 AM 0 59.00 0.00 8.00 0.00
33.00
10:05:49 AM 1 72.00 0.00 2.00 0.00
26.00
10:05:49 AM 2 66.67 0.00 7.07 0.00
26.26
10:05:49 AM 3 61.00 0.00 5.00 0.00
34.00
Average: CPU %user %nice %system %iowait
%idle
Average: all 64.32 0.00 4.40 0.00
31.28
Average: 0 59.80 0.00 5.03 0.00
35.18
Average: 1 69.35 0.00 4.02 0.00
26.63
Average: 2 65.33 0.00 5.03 0.00
29.65
Average: 3 62.81 0.00 3.52 0.00
33.67
--
INFO from top:
$ top -d1
10:06:05 up 129 days, 22:06, 25 users, load average: 3.99, 3.31,
1.91
187 processes: 181 sleeping, 3 running, 0 zombie, 3 stopped
CPU states: cpu user nice system irq softirq iowait
idle
total 65.9% 0.0% 3.8% 0.0% 0.2% 0.0%
29.9%
cpu00 64.0% 0.0% 5.8% 0.0% 0.0% 0.0%
30.0%
cpu01 66.9% 0.0% 2.9% 0.0% 0.0% 0.0%
30.0%
cpu02 62.1% 0.0% 1.9% 0.0% 0.0% 0.0%
35.9%
cpu03 70.5% 0.0% 4.9% 0.0% 0.9% 0.0%
23.5%
Mem: 4087844k av, 4038528k used, 49316k free, 0k shrd,
34584k buff
2528020k actv, 991776k in_d, 86312k in_c
Swap: 4192956k av, 34220k used, 4158736k free
2986004k cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU
COMMAND
24828 nagios 18 0 3424 3424 1868 S 1.2 0.0 0:05 0
python
7793 hlshih 25 0 736 736 560 R 0.7 0.0 0:00 0 grep
--
explanation of sys load, extract from top manual:
This line displays the time the system has been up, and the
three load averages for the system. The load averages are the
average number of process ready to run during the last 1, 5 and 15
minutes. This line is just like the output of uptime(1). The
uptime display may be toggled by the interactive l command.
- from sar:
CPU utilization report) might
be one of the first facilities the user runs to begin system activity
investigation, because it monitors major system resources. If CPU uti-
lization is near 100 percent (user + nice + system), the workload sam-
pled is CPU-bound.
and with sar -q, you can have stats of sys load as well:
-q Report queue length and load averages. The following values are
displayed:
runq-sz
Run queue length (number of processes waiting for run
time).
plist-sz
Number of processes in the process list.
ldavg-1
System load average for the last minute.
ldavg-5
System load average for the past 5 minutes.
ldavg-15
System load average for the past 15 minutes.
---
FROM WIKIPEDIA
An idle computer has a load number of 0 and each process using or
waiting for CPU (the ready queue or run queue) increments the load
number by 1. Most UNIX systems count only processes in the running (on
CPU) or runnable (waiting for CPU) states. However, Linux also
includes processes in uninterruptible sleep states (usually waiting
for disk activity), which can lead to markedly different results if
many processes remain blocked in I/O due to a busy or stalled I/O
system. This, for example, includes processes blocking due to an NFS
server failure or to slow media (e.g., USB 1.x storage devices). Such
circumstances can result in an elevated load average, which does not
reflect an actual increase in CPU use (but still gives an idea on how
long users have to wait).