honzeland

          記錄點滴。。。

          常用鏈接

          統計

          Famous Websites

          Java

          Linux

          P2P

          最新評論

          RAM percentage utilised in Linux

          --zz: http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1230261484567+28353475&threadId=1213960

          Question:
          We are planning to calculate the percentage of physical memory utilised as below:

          System Page Size: 4Kbytes
          Memory: 5343128K (1562428K) real, 13632356K (3504760K) virtual, 66088K free Page# 1/604

          Now the formula goes as below:

          (free memory / actual active real memory) * 100
          (66088/1562428) * 100 = 4.22 %

          Please let us know if its the correct formula .

          Mainly we are interested in RAM percentage utilised

          Reply 1:
          Red Hat/Centos v 5 take spare ram and use it for a buffer cache.

          100% memory allocation is pretty meaningless because allocation is almost always near 100%. The 2.6.x kernel permits rapid re-allocation of buffer to other purposes eliminating a performance penalty that you see on an OS like HP-UX

          I'm not thrilled with your formula because it includes swap(virtual memory). If you start digging too deep into virtual memory, your system start paging processes from memory to disk and back again and slows down badly.

          The formula is however essentially correct.

          Reply 2:
          Here, a quick example from the machine under my desk:
          Mem:   3849216k total,  3648280k used,   200936k free,   210960k buffers
          Swap:  4194296k total,       64k used,  4194232k free,  2986460k cached

          If the value of 'Swap used' is up (i.e. hundreds of megabytes), then you've got an issue, but as you can see, it's only 64k here.
          Your formula for how much memory is used is something along the lines of this:

          (Used - (Buffers + Cached) / Total) * 100 = Used-by-programs%
          (Free + Buffers + Cached / Total) * 100 = Free%

          .. Roughly ..



          posted on 2008-12-26 12:08 honzeland 閱讀(274) 評論(0)  編輯  收藏 所屬分類: Linux

          主站蜘蛛池模板: 阜新市| 保亭| 建宁县| 新邵县| 游戏| 三河市| 潜江市| 保靖县| 惠东县| 长岛县| 焦作市| 和林格尔县| 天门市| 泰顺县| 措美县| 盐边县| 沈阳市| 文昌市| 滦平县| 武汉市| 堆龙德庆县| 武宁县| 建水县| 农安县| 汉川市| 南澳县| 大英县| 乃东县| 天峻县| 辛集市| 保亭| 杂多县| 阿合奇县| 泽州县| 广宗县| 阳山县| 永定县| 翼城县| 武鸣县| 海安县| 永昌县|