xiaosd510
一個關于nfs server loading 的問題
我们有一台linux 的nfs server 共享的目录为在 /dev/sda1上,有5个nfs client 分别在不同的时间
mount 这个目录,并写入资料.但只有一台nfs client在 mount 这个目录并写入资料时造成nfs server的 load
average 大于2.5,导致我们的报警系统报警. 以下为当时一些统计信息,请大家帮忙分析一下问题出
在哪里!
用 netstat -a |grep nfs 监测的信息为
tcp 0 0 *:nfs *:* LISTEN
tcp 0 140 主机名:nfs ip地址:1023 ESTABLISHED
udp 0 0 *:nfs *:*
看起来只建立了一个连接,但用top命令看到却有 4个nfs 进程排在前面, 不知道是何原因!
top - 01:07:02 up 334 days, 5:08, 1 user, load average: 3.06, 1.92, 0.85
Tasks: 125 total, 2 running, 123 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.1% sy, 0.0% ni, 99.6% id, 0.2% wa, 0.0% hi, 0.0% si
Mem: 2055948k total, 2039872k used, 16076k free, 13140k buffers
Swap: 4194216k total, 160k used, 4194056k free, 1817420k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
330 root 15 0 0 0 0 R 4 0.0 5:00.89 nfsd
333 root 15 0 0 0 0 S 4 0.0 4:31.44 nfsd
2823 root 15 0 0 0 0 S 2 0.0 25:09.36 kjournald
325 root 15 0 0 0 0 S 2 0.0 4:46.69 nfsd
328 root 15 0 0 0 0 S 2 0.0 4:44.01 nfsd
1 root 16 0 4752 552 460 S 0 0.0 0:01.10 init
2 root RT 0 0 0 0 S 0 0.0 0:24.39 migration/0
3 root 34 19 0 0 0 S 0 0.0 4:49.57 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:24.76 migration/1
5 root 34 19 0 0 0 S 0 0.0 9:44.64 ksoftirqd/1
6 root RT 0 0 0 0 S 0 0.0 0:22.85 migration/2
7 root 34 19 0 0 0 S 0 0.0 8:06.76 ksoftirqd/2
8 root RT 0 0 0 0 S 0 0.0 0:24.29 migration/3
9 root 34 19 0 0 0 S 0 0.0 15:17.36 ksoftirqd/3
10 root 5 -10 0 0 0 S 0 0.0 0:00.11 events/0
11 root 5 -10 0 0 0 S 0 0.0 0:00.02 events/1
12 root 5 -10 0 0 0 S 0 0.0 0:00.02 events/2
..........
用iostat 2 5 输出的信息为:
Linux 2.6.9-42.ELsmp
avg-cpu: %user %nice %sys %iowait %idle
0.02 0.00 0.12 0.25 99.60
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
cciss/c0d0 1.02 5.31 13.76 153272624 397429802
sda 2.56 67.53 78.27 1949867898 2260133832
avg-cpu: %user %nice %sys %iowait %idle
0.00 0.00 6.74 13.23 80.02
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
cciss/c0d0 0.50 4.00 0.00 8 0
sda 149.50 0.00 60304.00 0 120608
avg-cpu: %user %nice %sys %iowait %idle
0.00 0.00 6.49 9.49 84.02
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
cciss/c0d0 0.00 0.00 0.00 0 0
sda 97.00 4.00 52760.00 8 105520
avg-cpu: %user %nice %sys %iowait %idle
0.00 0.00 7.13 15.02 77.85
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
cciss/c0d0 4.50 0.00 184.00 0 368
sda 158.50 0.00 69064.00 0 138128
avg-cpu: %user %nice %sys %iowait %idle
0.00 0.00 7.25 13.12 79.62
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
cciss/c0d0 0.00 0.00 0.00 0 0
sda 169.50 4.00 67584.00 8 135168
请各为帮忙分析一下造成load average非常高的原因!
xiaosd510
回复 #2 ga0feng 的帖子
nfs的client 端為AIX系統,設置為Automount 用到共享的目錄時會自動mount上,不用時,一段時間後自動umont 掉.
nfs的client 端有腳本,定時向此共享目錄寫入資料,分別在不同的時間段寫入,之後自動umount掉,在報警時其他client 沒有用到共享目錄.
[[i] 本帖最后由 xiaosd510 于 2008-5-21 12:50 编辑 [/i]]