[20190320]关于使用smem查看内存使用的问题.txt

来源:这里教程网 时间:2026-03-03 13:03:50 作者:

[20190320]关于使用smem查看内存使用的问题.txt --//前一阵子学习使用smem查看oracle用户相关进程使用内存情况.链接:http://blog.itpub.net/267265/viewspace-2565413/ --//别人的反映说我的测试估算存在问题.链接摘抄如下: smem报告物理内存使用情况,并考虑到共享内存页。未共享内存报告为USS(唯一设置大小)。共享内存在共享该内存的进程之间平均分配 。未共享内存(USS)加上进程共享内存的比例报告为PSS(比例设置大小)。USS和PSS只包括物理内存的使用。它们不包括已交换到磁盘的内 存。 --//注意USS和PSS不包括已交换到磁盘的内存。 Linux使用到了虚拟内存(virtual memory),因此要准确的计算一个进程实际使用的物理内存就不是那么简单。只知道进程的虚拟内存大 小也并没有太大的用处,因为还是无法获取到实际分配的物理内存大小。 RSS(Resident set size),使用top命令可以查询到,是最常用的内存指标,表示进程占用的物理内存大小。但是,将各进程的RSS值相加 ,通常会超出整个系统的内存消耗,这是因为RSS中包含了各进程间共享的内存。 PSS(Proportional set size)所有使用某共享库的程序均分该共享库占用的内存时,每个进程占用的内存。显然所有进程的PSS之和就是 系统的内存使用量。它会更准确一些,它将共享内存的大小进行平均后,再分摊到各进程上去。 USS(Unique set size )进程独自占用的内存,它是PSS中自己的部分,它只计算了进程独自占用的内存大小,不包含任何共享的部分。 VSS – Virtual Set Size 虚拟耗用内存(包含共享库占用的内存),有一些叫VIRT. RSS – Resident Set Size 实际使用物理内存(包含共享库占用的内存) PSS – Proportional Set Size 实际使用的物理内存(比例分配共享库占用的内存) USS – Unique Set Size 进程独自占用的物理内存(不包含共享库占用的内存) --//你可以看到PSS并非真实应该的内存量,而是平摊到各个进程上,不过总量还是很准确的说明该数据库实例当前使用的内存量. --//与链接:http://blog.itpub.net/28218939/viewspace-2081645/测试,这个进程从操作系统层面看却占用了7M左右的内存很接近. --//我个人的感觉作者的测试有问题,因为要抛去sqlplus占用的内存.实际上真实的连接占用2.5M,一般oltp业务不会消耗很大的PGA. --//我个人估计每个连接消耗5M已经算很多了(平均下来).如果你应用存在有大量排序,hash等操作也许估计要大一些. --//当时我的感觉作者应该刨除sqlplus占用的内存部分,实际占用不大,乐观认为: --//一般oltp系统很少大排序等情况,估算每个连接消耗3-4M在服务端已经很充足了. 1.看看对方的系统,顺便说一下里面的sql语句很糟糕的情况下: SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production CORE    10.2.0.4.0      Production TNS for Linux: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Production # smem -tk -U oracle -P "ora_"   PID User     Command                         Swap      USS      PSS      RSS 19566 oracle   ora_qmnc_peis                   3.3M   180.0K   212.0K     2.1M 19526 oracle   ora_psp0_peis                   3.3M   172.0K   213.0K     1.8M 19596 oracle   ora_q001_peis                   3.7M   148.0K   216.0K     3.7M 19548 oracle   ora_s000_peis                   3.1M   240.0K   260.0K     1.2M 19546 oracle   ora_d000_peis                   3.9M   240.0K   263.0K     1.2M 11249 oracle   ora_q002_peis                   3.5M   216.0K   266.0K     3.8M 19524 oracle   ora_pmon_peis                   3.4M   576.0K   727.0K     7.1M 19534 oracle   ora_ckpt_peis                   3.4M   664.0K     1.4M    31.5M 19564 oracle   ora_ctwr_peis                   3.5M     2.3M     2.7M     6.6M 19538 oracle   ora_reco_peis                   3.3M     1.0M     3.0M    46.7M 19532 oracle   ora_lgwr_peis                   3.6M     7.0M     7.9M    16.4M 19561 oracle   ora_arc1_peis                   3.9M     9.8M     9.9M    13.3M 19559 oracle   ora_arc0_peis                   3.2M    10.5M    10.7M    14.2M 19540 oracle   ora_cjq0_peis                   3.4M     1.8M    11.4M   184.7M 19544 oracle   ora_mmnl_peis                   3.2M     8.5M    12.2M    55.5M 19542 oracle   ora_mmon_peis                   3.4M     4.5M    23.4M   270.4M 19530 oracle   ora_dbw0_peis                   3.7M     6.5M    24.5M   471.7M 19536 oracle   ora_smon_peis                   3.2M     3.2M    26.7M   493.7M 19528 oracle   ora_mman_peis                   3.3M    28.9M    65.7M   421.6M -------------------------------------------------------------------------------    19 1                                       65.0M    86.6M   201.4M     2.0G #  smem -tk -U oracle -P oraclepeis   PID User     Command                         Swap      USS      PSS      RSS 10518 oracle   oraclepeis (LOCAL=NO)           4.1M     4.0K    23.0K     1.5M  8027 oracle   oraclepeis (LOCAL=NO)           3.8M     4.0K    35.0K     1.7M 10411 oracle   oraclepeis (LOCAL=NO)           4.2M     4.0K    37.0K     2.0M 16202 oracle   oraclepeis (LOCAL=NO)           3.6M     4.0K    52.0K    12.4M 16385 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    54.0K    12.2M 15123 oracle   oraclepeis (LOCAL=NO)           3.6M     4.0K    55.0K    12.3M 15129 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    55.0K    12.3M 16684 oracle   oraclepeis (LOCAL=NO)           3.6M     4.0K    55.0K    12.1M 15434 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    56.0K    12.4M 15133 oracle   oraclepeis (LOCAL=NO)           3.6M    12.0K    57.0K    12.3M 16800 oracle   oraclepeis (LOCAL=NO)           3.6M     4.0K    57.0K    12.5M 16373 oracle   oraclepeis (LOCAL=NO)           3.6M     4.0K    58.0K    12.7M 16672 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    58.0K    12.3M 16678 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    58.0K    12.1M 15163 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    59.0K    12.4M 16377 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    60.0K    12.6M 15354 oracle   oraclepeis (LOCAL=NO)           3.6M    12.0K    62.0K    12.4M 15545 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    62.0K    12.5M 16383 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    62.0K    12.5M 16605 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    62.0K    12.7M 15797 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    63.0K    12.5M 15883 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    64.0K    12.5M 16662 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    64.0K    12.6M 16579 oracle   oraclepeis (LOCAL=NO)           3.6M    16.0K    69.0K    12.7M 16798 oracle   oraclepeis (LOCAL=NO)           3.6M     8.0K    70.0K    12.8M 16648 oracle   oraclepeis (LOCAL=NO)           3.6M    16.0K    71.0K    12.7M 16788 oracle   oraclepeis (LOCAL=NO)           3.6M    12.0K    78.0K    13.4M 10403 oracle   oraclepeis (LOCAL=NO)           5.1M     4.0K   132.0K     4.8M 15356 oracle   oraclepeis (LOCAL=NO)           3.6M   116.0K   220.0K    17.1M ... 17035 oracle   oraclepeis (LOCAL=NO)          40.0K     3.7M    10.2M   302.1M  1899 oracle   oraclepeis (LOCAL=NO)          36.0K     4.4M    10.4M   185.6M 15322 oracle   oraclepeis (LOCAL=NO)              0     3.9M    10.5M   301.7M 16294 oracle   oraclepeis (LOCAL=NO)         308.0K     3.8M    11.4M   329.7M 15505 oracle   oraclepeis (LOCAL=NO)         116.0K     3.8M    12.0M   345.6M 16369 oracle   oraclepeis (LOCAL=NO)         268.0K     3.8M    12.2M   361.4M 15316 oracle   oraclepeis (LOCAL=NO)           2.1M     2.7M    12.6M   398.5M 15481 oracle   oraclepeis (LOCAL=NO)           1.5M     2.6M    12.8M   389.6M 15495 oracle   oraclepeis (LOCAL=NO)          12.0K     4.4M    13.0M   352.9M 15913 oracle   oraclepeis (LOCAL=NO)         160.0K     4.8M    13.0M   357.1M 15855 oracle   oraclepeis (LOCAL=NO)              0     4.0M    13.0M   371.9M 17330 oracle   oraclepeis (LOCAL=NO)          24.0K     4.8M    13.0M   332.6M 15831 oracle   oraclepeis (LOCAL=NO)          20.0K     4.1M    13.4M   391.5M 15839 oracle   oraclepeis (LOCAL=NO)              0     4.0M    13.4M   380.8M 16300 oracle   oraclepeis (LOCAL=NO)           1.5M     3.9M    13.5M   275.5M 10625 oracle   oraclepeis (LOCAL=NO)           2.0M     3.3M    13.5M   342.2M 15591 oracle   oraclepeis (LOCAL=NO)           3.3M     1.4M    13.5M   437.6M 15195 oracle   oraclepeis (LOCAL=NO)              0     4.3M    13.7M   285.0M 15921 oracle   oraclepeis (LOCAL=NO)          44.0K     4.9M    13.8M   381.3M 15985 oracle   oraclepeis (LOCAL=NO)          12.0K     5.0M    13.8M   355.1M 15555 oracle   oraclepeis (LOCAL=NO)           3.1M     1.1M    14.0M   447.8M 16328 oracle   oraclepeis (LOCAL=NO)           3.0M     1.2M    14.1M   400.7M 15302 oracle   oraclepeis (LOCAL=NO)          32.0K     3.9M    14.2M   416.5M 15384 oracle   oraclepeis (LOCAL=NO)          68.0K     3.8M    14.4M   403.6M 15173 oracle   oraclepeis (LOCAL=NO)              0     4.3M    14.4M   386.5M 15843 oracle   oraclepeis (LOCAL=NO)          24.0K     4.2M    14.7M   399.5M 15328 oracle   oraclepeis (LOCAL=NO)              0     4.7M    15.0M   158.9M 15372 oracle   oraclepeis (LOCAL=NO)          28.0K     4.0M    15.1M   430.4M 16060 oracle   oraclepeis (LOCAL=NO)          12.0K     5.7M    15.7M   336.5M 15905 oracle   oraclepeis (LOCAL=NO)          20.0K     4.1M    15.7M   370.7M 16140 oracle   oraclepeis (LOCAL=NO)         100.0K     4.7M    15.9M   420.5M 15398 oracle   oraclepeis (LOCAL=NO)          24.0K     4.0M    16.1M   446.6M 16894 oracle   oraclepeis (LOCAL=NO)         208.0K     4.3M    16.4M   439.1M 21831 oracle   oraclepeis (LOCAL=NO)           4.0M   912.0K    17.3M   453.6M 15203 oracle   oraclepeis (LOCAL=NO)           4.0K     4.4M    17.4M   398.5M 21833 oracle   oraclepeis (LOCAL=NO)           3.6M     1.3M    17.9M   456.7M 30187 oracle   oraclepeis (LOCAL=NO)           3.7M     1.2M    18.1M   460.7M 15977 oracle   oraclepeis (LOCAL=NO)         112.0K     4.5M    19.6M   236.7M 15517 oracle   oraclepeis (LOCAL=NO)           3.2M     2.0M    22.1M   256.5M 15509 oracle   oraclepeis (LOCAL=NO)         104.0K     5.7M    22.1M   499.0M 15248 oracle   oraclepeis (LOCAL=NO)          88.0K     4.7M    22.7M   509.4M 15903 oracle   oraclepeis (LOCAL=NO)         228.0K     4.5M    24.6M   468.6M 15999 oracle   oraclepeis (LOCAL=NO)         448.0K     8.4M    28.4M   508.0M 15438 oracle   oraclepeis (LOCAL=NO)           1.3M     3.4M    31.5M   594.3M -------------------------------------------------------------------------------   397 1                                      298.4M     1.2G     1.8G    25.5G --// 1.8*1024/397 = 4.6M.我认为还是比较符合我以前的估算. --// 不过你仔细看许多连接已经使用交换,这样估算的PSS遗漏交换部分.应修正为:(1.8+.298)*1024/397 = 5.41M.   # free -m              total       used       free     shared    buffers     cached Mem:          3820       3421        398          0         11       1385 -/+ buffers/cache:       2025       1794 Swap:         8191        586       7605 --//已经使用到交换.用户执行响应有点慢,我感觉这台机器磁盘IO不是很好. --//注:我登录查看时问题缓解.可以通过sar -b验证: # sar -b Linux 2.6.32-220.el6.x86_64 (tjzx222)   03/20/2019      _x86_64_        (4 CPU) 12:00:01 AM       tps      rtps      wtps   bread/s   bwrtn/s ... 07:40:01 AM     19.97     16.55      3.42    713.11     77.42 07:50:01 AM      5.62      2.17      3.45     88.77     74.49 08:00:01 AM      9.87      4.76      5.11    123.57     98.01 08:10:01 AM     15.03      7.74      7.29    281.43    148.75 08:20:01 AM     13.98      5.79      8.19    106.32    192.22 08:30:01 AM     15.16      5.15     10.00    111.09    217.70 08:40:01 AM     31.99     25.28      6.71    875.06    274.58 08:50:01 AM     16.73     10.42      6.31    234.69    133.46 09:00:02 AM     24.44     17.44      7.00    537.10    139.64 09:10:02 AM     98.53     89.60      8.93   5172.42    160.75 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 09:20:01 AM     20.13     13.78      6.35    462.35    122.75 09:30:01 AM     38.37     31.99      6.38   1248.61    120.77 09:40:02 AM     49.82     43.35      6.47   1476.82    511.55 09:50:02 AM     71.13     64.22      6.91   2475.94    484.25 10:00:01 AM     30.75     24.58      6.17   1044.02    269.53 10:10:01 AM     66.98     60.09      6.89   2896.95    483.90 10:20:02 AM     14.52      9.71      4.81    472.21     94.74 10:30:01 AM     20.34     14.39      5.95    785.79    210.65 10:40:02 AM     32.97     28.56      4.41   1076.23     93.92 10:50:01 AM     19.89     15.60      4.29    622.78     88.65 11:00:01 AM     22.91     19.25      3.66    557.48     79.40 11:10:01 AM     11.25      6.94      4.31    487.29    313.17 11:20:01 AM    174.29    169.64      4.65   1724.80    119.27 11:30:01 AM      6.71      3.64      3.07    159.79     64.84 11:40:01 AM      6.41      3.30      3.11    139.95    126.11 Average:        18.45     15.25      3.20   1586.53    103.94 --//注意下划线的时间段.  # sar -B Linux 2.6.32-220.el6.x86_64 (tjzx222)   03/20/2019      _x86_64_        (4 CPU) 12:00:01 AM  pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff ... 08:00:01 AM     61.82     49.00   1874.45      0.15    375.94    120.42      0.00    120.00     99.66 08:10:01 AM    140.67     74.38   2297.06      0.76    657.12    142.34      4.54    146.67     99.85 08:20:01 AM     53.17     96.11   1915.89      0.53    548.47     61.11      0.05     61.09     99.89 08:30:01 AM     55.54    108.85   1960.72      0.13    612.12    100.14      0.00    100.06     99.92 08:40:01 AM    437.54    137.29   1687.78      0.42    722.05    190.62      0.05    190.42     99.87 08:50:01 AM    117.34     66.73   1228.97      0.11    532.96     55.69      0.00     55.36     99.41 09:00:02 AM    268.67     69.83   1577.43      0.60    702.40    148.76      0.00    148.06     99.53 09:10:02 AM   2586.10     80.36   2283.34      1.40   1207.05    625.42      0.00    624.50     99.85 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 09:20:01 AM    231.18     61.38   1641.33      0.21    583.74     74.31      0.00     74.17     99.81 09:30:01 AM    624.31     60.38   1375.45      0.41    649.19    170.13      0.00    169.47     99.61 09:40:02 AM    738.59    255.79   1928.80      2.59    769.20    353.21      0.00    220.50     62.43 09:50:02 AM   1237.84    242.11   2138.18      3.25    959.86    488.10      1.01    377.44     77.17 10:00:01 AM    522.01    134.76   1166.28      0.80    625.31    130.17      0.00    128.00     98.33 10:10:01 AM   1448.43    241.95   1645.67      3.80    992.93    500.56      0.16    403.74     80.63 10:20:02 AM    236.20     47.41    909.29      1.28    373.61     44.84      0.11     42.14     93.76 10:30:01 AM    392.80    105.29   1650.97      1.56    674.11    117.43      0.00    116.40     99.12 10:40:02 AM    538.13     46.96    908.65      0.49    480.95    169.63      0.00    169.45     99.89 10:50:01 AM    311.37     44.33    938.97      3.73    631.47      8.39      0.00      8.38     99.96 11:00:01 AM    278.75     39.70    591.97      0.52    185.96      0.00      0.00      0.00      0.00 11:10:01 AM    243.63    156.58    626.82      0.36    145.52      0.00      0.00      0.00      0.00 11:20:01 AM    862.43     59.64    542.47      0.30    237.50     84.69      0.00     81.53     96.27 11:30:01 AM     79.87     32.42    831.48      0.09    257.81     52.56      0.00     51.87     98.68 11:40:01 AM     69.97     63.06    523.15      0.17    273.54      0.00      0.05      0.05    100.00 Average:       793.25     51.97    525.69      0.36    411.55    212.36      0.12    206.98     97.41 # sar -d Linux 2.6.32-220.el6.x86_64 (tjzx222)   03/20/2019      _x86_64_        (4 CPU) 12:00:01 AM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util .. 08:20:01 AM    dev8-0     13.98    106.32    192.22     21.36      0.16     11.37      8.85     12.38 08:30:01 AM    dev8-0     15.16    111.09    217.70     21.69      0.18     12.18      8.92     13.52 08:40:01 AM    dev8-0     31.99    875.06    274.58     35.94      0.23      7.11      3.75     11.99 08:50:01 AM    dev8-0     16.74    234.92    133.46     22.01      0.13      7.82      5.66      9.47 09:00:02 AM    dev8-0     24.44    536.90    139.64     27.68      0.18      7.50      4.77     11.65 09:10:02 AM    dev8-0     98.53   5172.39    160.75     54.13      0.65      6.64      2.51     24.68 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 09:20:01 AM    dev8-0     20.13    462.35    122.75     29.06      0.16      7.91      5.30     10.68 09:30:01 AM    dev8-0     38.37   1248.61    120.77     35.69      0.22      5.67      3.64     13.97 09:40:02 AM    dev8-0     49.84   1477.84    511.57     39.92      0.93     18.67      2.70     13.47 09:50:02 AM    dev8-0     71.11   2474.92    484.22     41.61      1.55     21.74      2.43     17.31 10:00:01 AM    dev8-0     30.75   1044.05    269.53     42.72      0.24      7.75      3.61     11.12 10:10:01 AM    dev8-0     66.98   2896.93    483.90     50.48      1.15     17.22      2.41     16.16 10:20:02 AM    dev8-0     14.52    472.21     94.74     39.04      0.13      9.01      6.58      9.55 10:30:01 AM    dev8-0     20.34    785.79    210.65     48.99      0.17      8.58      5.70     11.59 10:40:02 AM    dev8-0     32.98   1076.52     93.92     35.49      0.14      4.39      2.66      8.78 10:50:01 AM    dev8-0     19.88    622.48     88.65     35.77      0.18      9.18      5.48     10.89 11:00:01 AM    dev8-0     22.91    557.48     79.40     27.80      0.12      5.15      3.76      8.61 11:10:01 AM    dev8-0     11.25    487.29    313.17     71.14      0.19     16.61      6.45      7.25 11:20:01 AM    dev8-0    174.29   1724.80    119.27     10.58      0.31      1.77      1.02     17.83 11:30:01 AM    dev8-0      6.71    159.79     64.84     33.46      0.06      9.10      7.48      5.02 11:40:01 AM    dev8-0      6.41    139.95    126.11     41.51      0.08     12.00      8.05      5.16 11:50:01 AM    dev8-0      6.85    112.77    241.47     51.70      0.08     11.46      8.49      5.82 Average:       dev8-0     18.29   1565.76    105.87     91.41      0.14      7.58      3.31      6.06 --//好像问题并不严重,估计可能10分钟里面几分钟很忙,过去就缓解了. # grep -i page /proc/meminfo AnonPages:       1344320 kB PageTables:       534328 kB AnonHugePages:      2048 kB HugePages_Total:       0 HugePages_Free:        0 HugePages_Rsvd:        0 HugePages_Surp:        0 Hugepagesize:       2048 kB --//连接用户397个,没有使用hugepages,机器内存4G(有点小). SELECT ROUND (AVG (PGA_USED_MEM) / 1024 / 1024, 2) N10       ,ROUND (AVG (PGA_ALLOC_MEM) / 1024 / 1024, 2) n20       ,ROUND (AVG (PGA_MAX_MEM) / 1024 / 1024, 2) n30   FROM v$process where PROGRAM='oracle@tjzx222';        N10        N20        N30 ---------- ---------- ----------        .35        .61       1.81 --//PGA消耗很小. SELECT  PGA_USED_MEM / 1024 / 1024 N10       ,PGA_ALLOC_MEM / 1024 / 1024 n20       ,PGA_MAX_MEM / 1024 / 1024 n30   FROM v$process where PROGRAM='oracle@tjzx222'   order by 1 ;        N10        N20        N30 ---------- ---------- ---------- .290577888 .426541328 .426541328 .290577888 .426541328 .426541328 . .849003792 2.23904133 4.05154133 .896985054 1.95257282 5.89007282 413 rows selected. --//PGA_USED_MEM排在最后的的不到1M,实际上对方的问题没有使用hugepages,导致pagetables使用较大. --//每个连接平均消耗页面表 534328/1024/400 = 1.30M. --//实际上非常符合我以前的测试,使用hugepages能掩盖不良应用程序,因为不好的应用程序导致页面表变大,而使用hugepages消耗很小. --//这样在使用hugepages并且内存充足的情况下,一些应用的数据库的数据文件是文件型的,一般filesystemio_options参数none的情况 --//下,os缓存数据文件,掩盖数据库的性能问题. --//参考链接:http://blog.itpub.net/267265/viewspace-2152888/ --//我关闭swap再看看(注意选择空闲时间做这个操作!!): # swapoff -a # swapon -a # smem -tk -U oracle -P oraclepeis   PID User     Command                         Swap      USS      PSS      RSS 15362 oracle   oraclepeis (LOCAL=NO)              0     3.6M     3.7M    16.0M 15123 oracle   oraclepeis (LOCAL=NO)              0     3.6M     3.7M    15.9M 15129 oracle   oraclepeis (LOCAL=NO)              0     3.6M     3.7M    15.9M 15310 oracle   oraclepeis (LOCAL=NO)              0     3.6M     3.7M    16.0M 15298 oracle   oraclepeis (LOCAL=NO)              0     3.6M     3.7M    16.0M 15133 oracle   oraclepeis (LOCAL=NO)              0     3.6M     3.7M    15.9M 15440 oracle   oraclepeis (LOCAL=NO)              0     3.6M     3.7M    16.0M ... 15380 oracle   oraclepeis (LOCAL=NO)              0     3.8M    10.0M   303.3M 15322 oracle   oraclepeis (LOCAL=NO)              0     3.9M    10.0M   301.6M  1899 oracle   oraclepeis (LOCAL=NO)              0     4.5M    10.4M   185.6M 16507 oracle   oraclepeis (LOCAL=NO)              0     5.7M    11.0M   127.1M 17035 oracle   oraclepeis (LOCAL=NO)              0     4.9M    11.1M   313.6M 17340 oracle   oraclepeis (LOCAL=NO)              0     5.5M    11.2M   207.7M 15469 oracle   oraclepeis (LOCAL=NO)              0     5.1M    11.4M   250.5M 15230 oracle   oraclepeis (LOCAL=NO)              0     5.0M    11.5M   289.0M 15897 oracle   oraclepeis (LOCAL=NO)              0     5.0M    11.7M   318.1M 17330 oracle   oraclepeis (LOCAL=NO)              0     4.5M    11.8M   334.5M 18081 oracle   oraclepeis (LOCAL=NO)              0     5.1M    12.0M   310.6M 16294 oracle   oraclepeis (LOCAL=NO)              0     4.9M    12.2M   342.5M 17362 oracle   oraclepeis (LOCAL=NO)              0     5.3M    12.3M   263.1M 15913 oracle   oraclepeis (LOCAL=NO)              0     5.0M    12.7M   357.1M 16369 oracle   oraclepeis (LOCAL=NO)              0     4.8M    13.2M   375.2M 15921 oracle   oraclepeis (LOCAL=NO)              0     5.0M    13.4M   384.7M 15961 oracle   oraclepeis (LOCAL=NO)              0     4.9M    13.7M   368.1M 15985 oracle   oraclepeis (LOCAL=NO)              0     5.0M    13.8M   372.4M 15302 oracle   oraclepeis (LOCAL=NO)              0     4.0M    14.0M   416.5M 15384 oracle   oraclepeis (LOCAL=NO)              0     3.9M    14.0M   403.6M 16300 oracle   oraclepeis (LOCAL=NO)              0     4.5M    14.2M   283.2M 15561 oracle   oraclepeis (LOCAL=NO)              0     5.4M    14.4M   359.4M 15495 oracle   oraclepeis (LOCAL=NO)              0     4.2M    14.5M   415.4M 15831 oracle   oraclepeis (LOCAL=NO)              0     4.9M    14.6M   410.2M 15173 oracle   oraclepeis (LOCAL=NO)              0     5.2M    14.9M   394.2M 16140 oracle   oraclepeis (LOCAL=NO)              0     4.0M    14.9M   425.9M 16280 oracle   oraclepeis (LOCAL=NO)              0     5.4M    15.1M   215.7M 15195 oracle   oraclepeis (LOCAL=NO)              0     5.3M    15.2M   304.6M 10625 oracle   oraclepeis (LOCAL=NO)              0     5.6M    15.2M   343.9M 15481 oracle   oraclepeis (LOCAL=NO)              0     5.1M    15.7M   408.9M 15398 oracle   oraclepeis (LOCAL=NO)              0     4.3M    15.9M   452.1M 15839 oracle   oraclepeis (LOCAL=NO)              0     5.1M    15.9M   430.0M 16328 oracle   oraclepeis (LOCAL=NO)              0     4.3M    16.7M   403.7M 16894 oracle   oraclepeis (LOCAL=NO)              0     4.9M    17.0M   450.2M 15591 oracle   oraclepeis (LOCAL=NO)              0     4.4M    17.3M   469.9M 15905 oracle   oraclepeis (LOCAL=NO)              0     5.2M    17.6M   399.9M 15843 oracle   oraclepeis (LOCAL=NO)              0     5.8M    17.6M   436.0M 16060 oracle   oraclepeis (LOCAL=NO)              0     5.8M    18.1M   444.0M 15919 oracle   oraclepeis (LOCAL=NO)              0     5.8M    19.7M   376.8M 15203 oracle   oraclepeis (LOCAL=NO)              0     5.1M    20.5M   488.4M 21831 oracle   oraclepeis (LOCAL=NO)              0     4.9M    21.0M   457.7M 21833 oracle   oraclepeis (LOCAL=NO)              0     4.9M    21.2M   460.2M 15509 oracle   oraclepeis (LOCAL=NO)              0     5.5M    21.3M   512.4M 30187 oracle   oraclepeis (LOCAL=NO)              0     4.9M    21.4M   464.4M 16621 oracle   oraclepeis (LOCAL=NO)              0     7.0M    23.0M   432.5M 15555 oracle   oraclepeis (LOCAL=NO)              0     6.7M    24.9M   513.8M 15248 oracle   oraclepeis (LOCAL=NO)              0     5.6M    25.6M   556.9M 15903 oracle   oraclepeis (LOCAL=NO)              0     5.4M    25.8M   479.2M 15977 oracle   oraclepeis (LOCAL=NO)              0     6.4M    27.2M   408.7M 15438 oracle   oraclepeis (LOCAL=NO)              0     5.6M    33.8M   601.9M 15999 oracle   oraclepeis (LOCAL=NO)              0    12.7M    38.8M   574.2M -------------------------------------------------------------------------------   211 1                                           0   907.4M     1.6G    24.7G --//当前连接用户少了一半对比前面的情况., --//1.6*1024/211 = 7.76M,可以看出当前的情况消耗有点大了.因为swap部分不计入pss,uss中. # free -m              total       used       free     shared    buffers     cached Mem:          3820       3710        109          0          4       2161 -/+ buffers/cache:       1544       2275 Swap:         8191          0       8191 # grep -i page /proc/meminfo AnonPages:       1053172 kB PageTables:       357712 kB AnonHugePages:      2048 kB HugePages_Total:       0 HugePages_Free:        0 HugePages_Rsvd:        0 HugePages_Surp:        0 Hugepagesize:       2048 kB --//建议修改使用hugeapges,优化应用程序(这步估计有点难度),里面的语句不好优化. --//或者讲我的估算是建立使用hugepages的假设下,应用优化良好的情况,每个连接消耗5M估计是比较合理的情况.

相关推荐