LoveUnix » 其他UNIX & Linux » 关于系统性能调整的几个问题
让LU留住您的每

一天 让LU博客留住您的每一天
2008-3-28 14:59 chbqhot
关于系统性能调整的几个问题

sco506 双cpu系统最近反应迟钝(约200用户),在查找问题的过程中发现一些不解之处:

(1)关于GPGSHI、GPGSLO参数的问题
  (a)“通常,GPGSLO设置为页面内存的1/16,GPGSHI设置为页面内存的1/10”,这里所指的“页面内存”是什么?

(b)另外我从帮助上看到是这样解释的:
GPGSLO: lowest amount freemem can be before pages are stolen from processes.
GPGSHI: once pages are stolen from processes, don't stop before freemem reaches this value.

这儿所指的“freemem”是sar -r 输出的freemem吗?

(2)sarcheck发现有如下问题:
    The following indication(s) of a memory shortage were seen: [color=DarkOrange]The reclaim
    rate was at least one quarter of the page fault rate in only 0.0 percent   --》中间这句话不太明白
    of the samples. [/color]  This statistic can be used to confirm the presence of
    an occasional memory-poor condition.
------------------------------------------------------

    The average swap out transfer request rate was 705.9 per second, which
    is an indication of a memory-poor condition.  
    [color=DarkOrange](疑问:swap out transfer request rate的值是怎么算出来的?)[/color]
------------------------------------------------------

    The average number of free pages usually did not stray far above the      
    value of GPGSHI.  This indicates that vhand, the page stealing daemon,
    was usually active and the memory poor condition seen on this system has
    resulted in increased CPU overhead as well as additional disk activity.  
   [color=DarkOrange] (疑问:我的sar -r 输出:[/color]
15:05:32   freemem   freeswp availrmem availsmem (-r)
15:05:33    [color=DarkOrange]520623[/color]   1048576    797295    404552
15:05:34    520522   1048576    797295    404434
15:05:35    520433   1048576    797295    404345

系统的GPGSHI=6000,freemem=520623是远大于GPGSHI的值的,可是为什么说sarcheck为什么说不是呢?(The average number of free pages usually did not stray far above the value of GPGSHI)

  [color=DarkOrange]而另外一台仅2G内存的服务器:[/color]
GPGSHI=6000
sar -r输出:
14:54:17   freemem   freeswp availrmem availsmem (-r)
14:54:18    [color=DarkOrange]382171[/color]   5240832    453989    972439
14:54:19    382171   5240832    453989    972439
14:54:20    382171   5240832    453989    972439
14:54:21    382171   5240832    453989    972439

sarcheck是这样报告的:The average number of free pages reported by sar was significantly
    higher than the value of GPGSHI, even though memory shortages were seen.  
    This indicates that an intermittent memory bottleneck may exist.

按说520623/6000 相对于382171/6000,比例大多了,为什么sarcheck却给出了相反的结论呢?
------------------------------------------------------

    Both GPGSHI and GPGSLO were set to high values, relative to the amount
    of memory present.  
    [color=DarkOrange](疑问:我的系统物理内存为4G,sar -r可以看出freemem为520623个页,约为2G,GPGSHI=6000,GPGSLO=2000,这个参数设置算高吗?)[/color]
问题比较多,麻烦各位了

[[i] 本帖最后由 chbqhot 于 2008-3-28 15:14 编辑 [/i]]

2008-3-28 16:50 chbqhot
sar:
        %usr    %sys    %wio   %idle (-u)
         bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s (-b)
          device   %busy     avque     r+w/s    blks/s    avwait    avserv (-d)
          c_hits cmisses (hit %) (-n)
         rawch/s canch/s outch/s rcvin/s xmtin/s mdmin/s (-y)
         scall/s sread/s swrit/s  fork/s  exec/s  rchar/s  wchar/s (-c)
         swpin/s bswin/s swpot/s bswot/s pswch/s (-w)
          iget/s namei/s dirbk/s (-a)
         runq-sz %runocc swpq-sz %swpocc (-q)
          proc-sz   ov  inod-sz   ov  file-sz   ov  lock-sz    (-v)
           msg/s  sema/s (-m)
          vflt/s  pflt/s pgfil/s  rclm/s (-p)
           freemem   freeswp availrmem availsmem (-r)
         cpybuf/s slpcpybuf/s (-B)
         dptch/s idler/s swidle/s (-R)
         ovsiohw/s ovsiodma/s ovclist/s (-g)
         mpbuf/s  ompb/s mphbuf/s omphbuf/s  pbuf/s spbuf/s dmabuf/s sdmabuf/s (-h)
Average        4      14       1      81
Average        4   88892     100      34     520      94       0       0
Average  Sdsk-0    53.10      1.00     10.86     74.30      0.00     48.91
Average    18580     353 (98%)
Average       14       0    4220       0       0       0
Average   148216   78769   32879    0.83    0.96  3611101    34788
Average     0.00     0.0    0.00     0.0    2363
Average     3114     419     706
Average      1.3     100
Average     0.00    0.00
Average    15.01   36.15    0.00    0.00
Average     561949   1048576    797736    437407
Average      0.00        0.00
Average  5711.02  426.98    45.00
Average       0.00       0.00      0.00
Average     0.00    0.00     7.11      0.00    0.00    0.00     0.00      0.00


vmstat:
PROCS     PAGING                                          SYSTEM  CPU
r  b  w  frs dmd sw cch fil pft frp pos pif pis rso rsi  sy  cs  us su id

1 791  0 1048576   0   0   0   0   0   0   0  0   0   0   0 183098 1187   5 16 79
1 791  0 1048576   0   0   0   0   0   0   0  0   0   0   0 412883 1734   7 45 48
2 792  0 1048576  58   0 514   0 114   0   0  0   0   0   0 108019 1313   7 16 77
2 794  0 1048576  25   0 389   0  67   0   0  0   0   0   0 453000 1223   6 37 57
1 795  0 1048576   6   0  85   0  15   0   0  0   0   0   0 290206 1272   6 19 75
1 795  0 1048576  89   0 478   0  93   0   0  0   0   0   0 215464 1506   7 17 76
2 794  0 1048576   0   0   0   0   1   0   0  0   0   0   0 423567 1000   5 31 64
2 794  0 1048576   1   0   0   0   6   0   0  0   0   0   0 633683 1576  15 49 36
2 794  0 1048576   0   0   0   0   1   0   0  0   0   0   0 318074 1556   9 26 65
1 795  0 1048576  15   0   0   0   0   0   0  0   0   0   0 252781 1174   4 26 70
1 795  0 1048576   0   0   0   0   0   0   0  0   0   0   0 1865 1135   0  2 98
1 792  0 1048576   3   0   0   0  16   0   0  0   0   0   0 13939 1011   2  5 93
1 791  0 1048576   0   0   0   0   3   0   0  0   0   0   0 145350 1159   4 12 84

搞不明白为什么sarcheck说:The average swap out transfer request rate was 705.9 per second? 哪个地方显示有swap out了?

2008-3-28 20:28 老农
PROCS 列
b是等待队列,太高了,不慢才怪。
内存没啥问题,是等待队列太。。。。
至于为什么,我现在看不出来,估计系统有问题。
太久没有用SCO了,这些显示都记不得了,和AIX的不一样。
你man vmstat看一下吧。

2008-3-29 15:49 chbqhot
sco系统b列高值不是问题。它把等待输入的进程也计数在内了

2008-3-29 23:24 老农
不是吧?等待输入的这么高?

2008-3-29 23:25 老农
如果是别人告诉你这个解释,那绝对是忽悠你,不是你SB就是他SB,你自己选吧。
不管怎么说,内存没啥问题

2008-3-29 23:27 老农
从逻辑上就不对:如果可以不管,现实它干P啊。

2008-3-29 23:28 老农
所以,首先可以说,你至少现在是成了SB,至于以后,那看你怎么选了

页: [1]


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.