免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4122 | 回复: 5
打印 上一主题 下一主题

[小机硬件] 服务器性能调优部分疑问 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-02 13:52 |只看该作者 |倒序浏览
10可用积分
公司S7A主机实际内存3.5G,PAGING SPACE为9568MB,现在我使用svmon命令进行察看相关内存,具体步骤如下:
1.        svmon –G     列出整体的内存使用情况
[qas1][/]#svmon -G
               size      inuse       free        pin    virtual
memory       917504     900840      16664     151289     636948
pg space    2449408      20907
               work       pers       clnt
pin          151289          0          0
in use       619588     255927      25325
此处可以发现SIZE部分的单位皆为页,1页=4K,则内存为3.5G,换页空间为9568MB;

2.        svmon –U root   列出root用户的内存使用情况
[qas1][/]#svmon -U root|more

===============================================================================
User                                 Inuse      Pin     Pgsp  Virtual
root                                 21246     5985     7918    31575

...............................................................................
SYSTEM segments                      Inuse      Pin     Pgsp  Virtual
                                      6885     5395     4768    11589

    Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual
       0         0 work kernel                       s   6038  5290 3760  9795
    4001  9ffffffd work shared library               s    611     0  971  1530
   141c1         - work                              s     44    14    2    45
    c407         - work                              s     39    13    3    42
   30408         - work                              s     32    11    7    37
   7c3fb         - work                              s     24     7    2    25
   6c41f         - work                              s     20     9   10    30
   50014  9ffffffe work shared library               s     16     0    4    16
   2c30f         - work                              s     12    12    1    13
   100c0         - work                              s     10     9    0    10
   541f1         - work                              s     10     9    0    10
   18382         - work                              s      9     2    1    10
   30028         - work                              s      8     8    1     9
   2402d         - work                              s      4     4    1     5
   5c453         - work                              s      3     2    1     3
   44115         - work                              s      2     2    1     3
   48016         - work                              s      1     1    1     2
   18202         - work                              s      1     1    1     2
   54031         - work                              s      1     1    1     2

...............................................................................
EXCLUSIVE segments                   Inuse      Pin     Pgsp  Virtual
                                      6850      590     2962     8621

    Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual
   58012  9001000a work shared library data          s    622     0  330   905
   4c177         2 work process private              s    593     6  151   744
   70178         1 clnt code,/dev/hd2:16811          s    292     0    -     -
   703f8         2 work process private              s    270     4   14   284
   343e9         f work shared library data          s    195     0    3   204
   743f9         f work shared library data          s    180     0    7   190
    c287         1 clnt code,/dev/hd2:1263           s    178     0    -     -
   683fe         2 work process private              s    174     4   24   197
    c1c7         - clnt /dev/hd9var:49               s    152     0    -     -
   74199         2 work process private              s    141     4   60   200
    81c6         2 work process private              s    137     4   59   190
   10340         2 work process private              s    137     4   62   207
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
此处inuse处单位应该也为页;

3.        svmon –P –t 5   列出占用内存资源前5位的进程
[qas1][/]#svmon -P -t 5

-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit Mthrd  16MB
  610348 disp+work      2038324     5297     5509  2039283      Y     N     N

    Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual
   72998  70000014 work default shmat/mmap           s  61679     0   13 61691
   4a716         - work mmap source                  s  35427     0   12 35439
   4a8d6  70000001 work default shmat/mmap           s  16167     0    7 16173
   4e8d7  70000000 work default shmat/mmap           s  14539     0    8 14547
    abe6  70000013 work default shmat/mmap           s  13390     0    3 13393
       0         0 work kernel                       s   6038  5290 3760  9795
   6a77e        10 pers text data BSS heap,          s   4498     0    -     -
                        /dev/lv01:2125                                         
    30a0  90000000 work shared library text          s   4018     0   33  4576
   5ebf3        11 work text data BSS heap           s   3292     0    0  3292
    4001  9ffffffd work shared library               s    611     0  971  1530
   7e5db         - pers /dev/lv02:26704              s    366     0    -     -
   301c8  90020014 work shared library               s    232     0   62   280
   2672d         - pers /dev/lv02:26634              s    123     0    -     -
   4abf6  9001000a work shared library data          s    117     0    0   117
    6ca5  ffffffff work application stack            s     98     0    0    98
   52c30  80020014 work USLA heap                    s     43     0    0    43
   50014  9ffffffe work shared library               s     16     0    4    16
   2ac2e f00000002 work process private              s     12     7    0    12
   1c1e3  9fffffff clnt USLA text,/dev/hd2:2094      s      9     0    -     -
    2fc8  70000015 work default shmat/mmap           s      7     0    0     7
   12d00  8fffffff work private load data            s      6     0    0     6
   7a85a         - pers /dev/lv02:26745              s      2     0    -     -
   2a72e         - work                              s      1     0    0     1
   6277c         - pers /dev/lv02:26643              s      1     0    -     -
   2670d         - pers /dev/lv02:26644              s      1     0    -     -
   5e8d3         - work mmap source                  s      0     0    0     0
   3eb0b  fffffff3 work application stack            s      0     0    0     0
    6845         - work mmap source                  s      0     0    0     0
   26cad  fffffffb work application stack            s      0     0    0     0
   7a77a         - pers /dev/lv02:26641              s      0     0    -     -
    e847         - work mmap source                  s      0     0    0     0
   2ecaf  fffffffa work application stack            s      0     0    0     0
   7ecfb  70000007 mmap maps 1 source(s)             s      0     0    -     -
   7acfa  70000008 mmap maps 1 source(s)             s      0     0    -     -
   568d1         - work mmap source                  s      0     0    0     0
   16841         - work mmap source                  s      0     0    0     0
   726f8         - pers /dev/lv02:26706              s      0     0    -     -
   3ec6b  fffffff5 work application stack            s      0     0    0     0
   6efdf         - pers /dev/lv02:24580              s      0     0    -     -
   76cf9  70000009 mmap maps 1 source(s)             s      0     0    -     -
   1e843         - work mmap source                  s      0     0    0     0
   3ecab  fffffffc work application stack            s      0     0    0     0
   72cf8  7000000a mmap maps 1 source(s)             s      0     0    -     -
   56851         - work mmap source                  s      0     0    0     0
   36ca9  fffffffd work application stack            s      0     0    0     0
   2684d         - work mmap source                  s      0     0    0     0
   42cf4  7000000e mmap maps 1 source(s)             s      0     0    -     -
   228cc         - work mmap source                  s      0     0    0     0
    eca7  fffffffe work application stack            s      0     0    0     0
   26c6d  fffffff6 work application stack            s      0     0    0     0
   46cf5  7000000d mmap maps 1 source(s)             s      0     0    -     -
   62cfc  70000006 mmap maps 1 source(s)             s      0     0    -     -
   4acb6  fffffff7 work application stack            s      0     0    0     0
   6ecff  70000003 mmap maps 54 source(s)            s      0     0    -     -
   2e84f         - work mmap source                  s      0     0    0     0
   4acf6  7000000c mmap maps 1 source(s)             s      0     0    -     -
   2a8ce         - work mmap source                  s      0     0    0     0
   26b0d  fffffff4 work application stack            s      0     0    0     0
   6acfe  70000004 mmap maps 1 source(s)             s      0     0    -     -
   4ecf7  7000000b mmap maps 1 source(s)             s      0     0    -     -
   62bbc  fffffff1 work application stack            s      0     0    0     0
   3ae4a         - pers /dev/lv01:4102               s      0     0    -     -
   22fcc         - pers /dev/lv02:24581              s      0     0    -     -
    6b45  fffffff2 work application stack            s      0     0    0     0
   36849         - work mmap source                  s      0     0    0     0
   52cf0  70000012 mmap maps 1 source(s)             s      0     0    -     -
   56cb1  fffffff9 work application stack            s      0     0    0     0
   66cfd  70000005 mmap maps 1 source(s)             s      0     0    -     -
   56cf1  70000011 mmap maps 1 source(s)             s      0     0    -     -
   368c9         - work mmap source                  s      0     0    0     0
   3e84b         - work mmap source                  s      0     0    0     0
   5acf2  70000010 mmap maps 1 source(s)             s      0     0    -     -
   5ecb3  fffffff8 work application stack            s      0     0    0     0
   5ecf3  7000000f mmap maps 1 source(s)             s      0     0    -     -
   7abba  fffffff0 work application stack            s      0     0    0     0
   3e8cb         - work mmap source                  s      0     0    0     0

-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit Mthrd  16MB
  532674 disp+work      2003147     5297     5497  2004093      Y     N     N

    Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual
   72998  70000014 work default shmat/mmap           s  61679     0   13 61691
   4a716         - work mmap source                  s  35427     0   12 35439
   4a8d6  70000001 work default shmat/mmap           s  16167     0    7 16173
   4e8d7  70000000 work default shmat/mmap           s  14539     0    8 14547
    abe6  70000013 work default shmat/mmap           s  13390     0    3 13393
       0         0 work kernel                       s   6038  5290 3760  9795
   6a77e        10 pers text data BSS heap,          s   4498     0    -     -
                        /dev/lv01:2125                                         
    30a0  90000000 work shared library text          s   4018     0   33  4576
   7a8ba        11 work text data BSS heap           s   3347     0    0  3347
    4001  9ffffffd work shared library               s    611     0  971  1530
   7e5db         - pers /dev/lv02:26704              s    366     0    -     -
   56a51  ffffffff work application stack            s    328     0    0   328
   301c8  90020014 work shared library               s    232     0   62   280
   2672d         - pers /dev/lv02:26634              s    123     0    -     -
   6a8be  9001000a work shared library data          s     81     0    0    81
   628bc  80020014 work USLA heap                    s     43     0    0    43
   50014  9ffffffe work shared library               s     16     0    4    16
   728b8 f00000002 work process private              s     12     7    0    12
   1c1e3  9fffffff clnt USLA text,/dev/hd2:2094      s      9     0    -     -
    2fc8  70000015 work default shmat/mmap           s      7     0    0     7
    2b44  8fffffff work private load data            s      6     0    0     6
   46855         - pers /dev/lv02:26740              s      2     0    -     -
   6277c         - pers /dev/lv02:26643              s      1     0    -     -
   2a72e         - work                              s      1     0    0     1
   2670d         - pers /dev/lv02:26644              s      1     0    -     -
   56391         - pers /dev/lv02:26726              s      1     0    -     -
   4e2f7  fffffff4 work application stack            s      0     0    0     0
   7a7da  7000000a mmap maps 1 source(s)             s      0     0    -     -
    e847         - work mmap source                  s      0     0    0     0
   469d5  70000008 mmap maps 1 source(s)             s      0     0    -     -
    a8c6  fffffff3 work application stack            s      0     0    0     0
   568d1         - work mmap source                  s      0     0    0     0
   56851         - work mmap source                  s      0     0    0     0
   2aace  fffffff7 work application stack            s      0     0    0     0
   1a542  70000005 mmap maps 1 source(s)             s      0     0    -     -
   52ad0  70000004 mmap maps 1 source(s)             s      0     0    -     -
    e5c7  70000009 mmap maps 1 source(s)             s      0     0    -     -
   16841         - work mmap source                  s      0     0    0     0
   3ab0a  fffffff5 work application stack            s      0     0    0     0
   3ec2b  70000003 mmap maps 53 source(s)            s      0     0    -     -
   5e8d3         - work mmap source                  s      0     0    0     0
   5ea53  fffffff6 work application stack            s      0     0    0     0
   128c0  fffffff0 work application stack            s      0     0    0     0
   32b68  70000010 mmap maps 1 source(s)             s      0     0    -     -
   6efdf         - pers /dev/lv02:24580              s      0     0    -     -
    6825  fffffffa work application stack            s      0     0    0     0
   2a76e  fffffff9 work application stack            s      0     0    0     0
   1e843         - work mmap source                  s      0     0    0     0
   5ead3  7000000f mmap maps 1 source(s)             s      0     0    -     -
   4aa56  fffffffb work application stack            s      0     0    0     0
    6845         - work mmap source                  s      0     0    0     0
   1a8c2  fffffff1 work application stack            s      0     0    0     0
   32748  7000000b mmap maps 1 source(s)             s      0     0    -     -
   5a4f2  70000007 mmap maps 1 source(s)             s      0     0    -     -
   2684d         - work mmap source                  s      0     0    0     0
   2a80e  fffffffe work application stack            s      0     0    0     0
   228cc         - work mmap source                  s      0     0    0     0
   7a77a         - pers /dev/lv02:26641              s      0     0    -     -
   2e84f         - work mmap source                  s      0     0    0     0
    a826  fffffff8 work application stack            s      0     0    0     0
   2a8ce         - work mmap source                  s      0     0    0     0
   5a332  7000000e mmap maps 1 source(s)             s      0     0    -     -
   3ae4a         - pers /dev/lv01:4102               s      0     0    -     -
   22fcc         - pers /dev/lv02:24581              s      0     0    -     -
   36849         - work mmap source                  s      0     0    0     0
    28c4  fffffff2 work application stack            s      0     0    0     0
   7ea5b  70000006 mmap maps 1 source(s)             s      0     0    -     -
    ab66  70000012 mmap maps 1 source(s)             s      0     0    -     -
   566b1  fffffffc work application stack            s      0     0    0     0
   368c9         - work mmap source                  s      0     0    0     0
   3e84b         - work mmap source                  s      0     0    0     0
    eb67  70000011 mmap maps 1 source(s)             s      0     0    -     -
   22a4c  fffffffd work application stack            s      0     0    0     0
   6a7de  7000000c mmap maps 1 source(s)             s      0     0    -     -
   14501  7000000d mmap maps 1 source(s)             s      0     0    -     -
   3e8cb         - work mmap source                  s      0     0    0     0

-------------------------------------------------------------------------------
    。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

注意:此处的inuse单位我觉得就不应该是页,否则就大于当前的实际内存!!


疑问: 第3部分的里面的inuse单位应该为什么?

最佳答案

查看完整内容

好奇怪查下资料解释为Inuse 表示进程使用的段中的实内存的页面总数看下我的机器没有那么大啊,贴出来你看看#svmon size inuse free pin virtualmemory 524288 176764 347524 64432 109789pg space 720896 329 work pers clnt lpagepin 64432 0 0 0in use 109802 0 ...

论坛徽章:
0
2 [报告]
发表于 2007-08-02 13:52 |只看该作者
好奇怪查下资料解释为Inuse 表示进程使用的段中的实内存的页面总数
看下我的机器没有那么大啊,贴出来你看看
#svmon
               size      inuse       free        pin    virtual
memory       524288     176764     347524      64432     109789
pg space     720896        329

               work       pers       clnt      lpage
pin           64432          0          0          0
in use       109802          0      66962          0

================================================
svmon -P -t 5

-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit Mthrd LPage
   26446 amqzlaa0_nd      17512     2575        0    13568      N     Y     N

    Vsid      Esid Type Description              LPage  Inuse   Pin Pgsp Virtual
   2c016         d work shared library text          -   5917     0    0  5917
       0         0 work kernel seg                   -   5545  2558    0  5545
   1458a         2 work process private              -   1965     2    0  1965
    6303         - clnt /dev/fslv00:12445            -   1144     0    -     -
    4302         - clnt /dev/fslv00:12472            -    909     0    -     -
    8304         - clnt /dev/fslv00:12459            -    752     0    -     -
   3a31d         - clnt /dev/fslv00:12453            -    690     0    -     -
   3e31f         - clnt /dev/fslv00:12466            -    421     0    -     -
    65a3         f work shared library data          -     91     0    0    91
    65c3         - work                              -     50    15    0    50
   1834c         1 clnt code,/dev/hd2:123942         -     27     0    -     -
    4322         - clnt /dev/fslv00:12443            -      1     0    -     -
   2e5b7         3 mmap mapped to sid 102a8          -      0     0    -     -

-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit Mthrd LPage
    6528 amqrmppa         15210     2581        0    15208      N     Y     N

    Vsid      Esid Type Description              LPage  Inuse   Pin Pgsp Virtual
   2c016         d work shared library text          -   5917     0    0  5917
       0         0 work kernel seg                   -   5545  2558    0  5545
   2c436         2 work process private              -   3577     2    0  3577
   2a435         f work shared library data          -     99     0    0    99
   32439         - work                              -     70    21    0    70
   3443a         1 clnt code,/dev/hd2:123965         -      2     0    -     -
   30438         3 mmap mapped to sid 2341           -      0     0    -     -

-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit Mthrd LPage
    5460 X                13608     2564        0    13229      N     N     N

    Vsid      Esid Type Description              LPage  Inuse   Pin Pgsp Virtual
   2c016         d work shared library text          -   5917     0    0  5917
       0         0 work kernel seg                   -   5545  2558    0  5545
    c146         2 work process private              -   1682     4    0  1682
    e147         1 clnt code,/dev/hd2:17892          -    374     0    -     -
   10148         f work shared library data          -     45     0    0    45
   1e16f         - work                              -     32     0    0    32
   30158         3 work shared memory segment        -      4     2    0     4
   2e157         - work                              -      2     0    0     2
   20150         - clnt /dev/hd2:17907               -      2     0    -     -
   1816c         - work                              -      2     0    0     2
   32139         - clnt /dev/hd9var:195              -      1     0    -     -
   26153         - clnt /dev/hd2:17906               -      1     0    -     -
   3c13e         - clnt /dev/hd9var:196              -      1     0    -     -
   1414a         - clnt /dev/hd3:8                   -      0     0    -     -

-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit Mthrd LPage
   18060 amqzlaa0_nd      13416     2575        0    12464      N     Y     N

    Vsid      Esid Type Description              LPage  Inuse   Pin Pgsp Virtual
   2c016         d work shared library text          -   5917     0    0  5917
       0         0 work kernel seg                   -   5545  2558    0  5545
   28314         - clnt /dev/fslv00:12447            -    914     0    -     -
   1636b         2 work process private              -    851     2    0   851
   1436a         f work shared library data          -     92     0    0    92
   12369         - work                              -     55    15    0    55
   1834c         1 clnt code,/dev/hd2:123942         -     27     0    -     -
   2a315         - clnt /dev/fslv00:12455            -      8     0    -     -
   1452a         - work overflow heap                -      4     0    0     4
    6323         - clnt /dev/fslv00:12468            -      1     0    -     -
   22311         - clnt /dev/fslv00:12462            -      1     0    -     -
   24312         - clnt /dev/fslv00:12474            -      1     0    -     -
   1a36d         3 mmap mapped to sid 102a8          -      0     0    -     -

论坛徽章:
0
3 [报告]
发表于 2007-08-02 15:20 |只看该作者
这个可能和系统里的应用有关系,我这个系统上跑SAP的数据库,读写比较厉害

论坛徽章:
0
4 [报告]
发表于 2007-08-02 15:25 |只看该作者
难道他把虚拟内存的数也算到里面吗?没有找到想关资料,我反正是头次看到这个数值会有这么大,我也期待谁能给个解释

论坛徽章:
0
5 [报告]
发表于 2007-08-02 15:26 |只看该作者
svmon -P -t 5

-------------------------------------------------------------------------------
     Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit Mthrd LPage
   26446 amqzlaa0_nd      17512     2575        0    13568      N     Y     N

    Vsid      Esid Type Description              LPage  Inuse   Pin Pgsp Virtual
   2c016         d work shared library text          -   5917     0    0  5917
       0         0 work kernel seg                   -   5545  2558    0  5545
   1458a         2 work process private              -   1965     2    0  1965
    6303         - clnt /dev/fslv00:12445            -   1144     0    -     -
    4302         - clnt /dev/fslv00:12472            -    909     0    -     -
    8304         - clnt /dev/fslv00:12459            -    752     0    -     -
   3a31d         - clnt /dev/fslv00:12453            -    690     0    -     -
   3e31f         - clnt /dev/fslv00:12466            -    421     0    -     -
    65a3         f work shared library data          -     91     0    0    91
    65c3         - work                              -     50    15    0    50
   1834c         1 clnt code,/dev/hd2:123942         -     27     0    -     -
    4322         - clnt /dev/fslv00:12443            -      1     0    -     -
   2e5b7         3 mmap mapped to sid 102a8          -      0     0    -     -


可以发现你的inuse数目17512=下面各个子的和,而我的却不等

论坛徽章:
0
6 [报告]
发表于 2007-08-02 15:30 |只看该作者
我觉得实际的应该是各项相加,而不是上面显示的,可能我上面显示的不准,不知道原因,呵呵。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP