Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4241 Wrong real memory after update

1.630
closed-fixed
Jamie Cameron
5
2013-08-19
2013-05-21
Anonymous
No

Hi, I recently upgraded Webmin to 1.630
It appears that the RAM calculation has broken completely.
I run CentOS 6.4 on a OpenVZ kernel.¨

Output from Webmin panel:
"Real memory: 256 MB total, 173.89 MB used"

Output from free -m:
" total used free shared buffers cached
Mem: 1024 704 319 0 0 0 "

Discussion


  • Anonymous
    2013-05-21

    Picture...

     
    Attachments
  • Jamie Cameron
    Jamie Cameron
    2013-05-21

    Could you post or attach the /proc/user_beancounters file on your system? Webmin 1.630 uses the privvmpages line from that file to work out the memory limit under OpenVZ.

     
  • Jon Bogan
    Jon Bogan
    2013-08-18

    Not the same user as above but seeing the same issue.

    Currently on Webmin 1.650 and I guess I didn't notice this after the 1.630 upgrade.

    Kernel and CPU Linux 2.6.32-042stab079.5 on x86_64
    Processor information Intel(R) Xeon(R) CPU X3220 @ 2.40GHz, 4 cores

    Attached similar screenshot plus my beancounters:

    [root@bandit ~]# cat /proc/user_beancounters | grep privvmpage
    privvmpages                   261               173192  9223372036854775807  9223372036854775807                    0
    privvmpages                 51005               230880               262144               262144                    3
    privvmpages                 45987               204336               262144               262144                    3
    privvmpages                103452               750000               500000               750000                  246
    privvmpages                372420               439518  9223372036854775807  9223372036854775807                    0
    

    This is on the host node. The containers seems to report memory correctly.

     
  • Jamie Cameron
    Jamie Cameron
    2013-08-18

    Jon - could you also post the contents of your /proc/meminfo file?

     
  • Jon Bogan
    Jon Bogan
    2013-08-19

    Here you go, Jamie:

    [root@bandit ~]# cat /proc/meminfo
    MemTotal:        8041728 kB
    MemFree:         5493076 kB
    Buffers:          317896 kB
    Cached:          1087244 kB
    SwapCached:            0 kB
    MemCommitted:    4456448 kB
    VirtualSwap:           0 kB
    Active:          1482760 kB
    Inactive:         815660 kB
    Active(anon):     699000 kB
    Inactive(anon):   194748 kB
    Active(file):     783760 kB
    Inactive(file):   620912 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:       6160376 kB
    SwapFree:        6160376 kB
    Dirty:              8004 kB
    Writeback:             0 kB
    AnonPages:        893440 kB
    Mapped:            66612 kB
    Shmem:               484 kB
    Slab:             170080 kB
    SReclaimable:     134916 kB
    SUnreclaim:        35164 kB
    KernelStack:        3536 kB
    PageTables:        22236 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:    10181240 kB
    Committed_AS:    1948184 kB
    VmallocTotal:   34359738367 kB
    VmallocUsed:      108224 kB
    VmallocChunk:   34359625808 kB
    HardwareCorrupted:     0 kB
    AnonHugePages:         0 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    DirectMap4k:        9976 kB
    DirectMap2M:     8378368 kB
    
     
  • Jamie Cameron
    Jamie Cameron
    2013-08-19

    • labels: System and Server
      Status --> System and Server Status
    • status: open --> closed-fixed
     
  • Jamie Cameron
    Jamie Cameron
    2013-08-19

    Ok, I see the problem - for some reason, your /proc/user_beancounters file has multiple privvmpages lines! Webmin doesn't expect this, and is using the last one to get the RAM limit, which is clearly wrong. I will fix this in the next Webmin release.

    The code change that fixes it can be seen at : https://github.com/webmin/webmin/commit/6ed31c6d1c453d42660182a933b2d3ba7f29eefc

     
  • Jon Bogan
    Jon Bogan
    2013-08-19

    That's because this is the host node. Individual containers have only one but the host node contains the bean counters for all containers. The host node is "0" and is last in my /proc/user_beancounters but I don't know for sure if that's always the case.

    Thanks for the quick turnaround!

    Jon

     
    Last edit: Jon Bogan 2013-08-19