-2

I heard that in OpenVZ, free -m doesn't give the correct results. So, how to get it? Here's the result of my cat /proc/user_beancounters"... How much ram am I using? What value to check?

Version: 2.5
       uid  resource                     held              maxheld              barrier                limit              failcnt
   104040:  kmemsize                 36415334             54527711             54525952             54525952             10574152
            lockedpages                     0                 1024                 1024                 1024                  279
            privvmpages                422390              1048916              1048576              1048576                 3697
            shmpages                      702                 2580               102400               102400                    2
            dummy                           0                    0                    0                    0                    0
            numproc                        75                  501                  640                  640                    0
            physpages                  205958               774590                    0  9223372036854775807                    0
            vmguarpages                     0                    0               524288  9223372036854775807                    0
            oomguarpages               208711               774590               104857  9223372036854775807                    0
            numtcpsock                     28                  761                 1024                 1024                    0
            numflock                        5                   43                 2048                 2048                    0
            numpty                          1                    3                   64                   64                    0
            numsiginfo                      0                   75                 1024                 1024                    0
            tcpsndbuf                  670560              6205568              5368709             10737418             52907126
            tcprcvbuf                  458752              9612896              5368709             10737418               263113
            othersockbuf                34920              5363776              5368709             10737418              2211269
            dgramrcvbuf                     0                25416              1342177              2684354                    0
            numothersock                   26                  181                 1024                 1024                    0
            dcachesize                 524242              1210651              8053063             12582912                    0
            numfile                      1915                 8304                32768                32768                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                     272                  284                 1536                 1536                    0

PS : Im planning to move to a XEN server with only 1GB of ram. Currently I have 2GB of RAM in my OpenVZ server and we use 1.5 of them!

jscott
  • 24,484
  • 8
  • 79
  • 100
THpubs
  • 1,695
  • 7
  • 26
  • 43

1 Answers1

1

http://wiki.openvz.org/Physpages#physpages :

Total number of RAM pages used by processes in a container.

For memory pages used by several different containers (mappings of shared libraries, for example), only a fraction of a page is charged to each container. The sum of the physpages usage for all containers corresponds to the total number of pages used in the system by all containers.

Since it's pages (which likely to be 4KiB — if you're on x86_{32,64}), in peak your VE had consumed ~ 3 GiB and currently it's ~ 800 MiB.

poige
  • 9,448
  • 2
  • 25
  • 52