CentOS 7 VM on Proxmox - high RAM usage

jaceqp

New Member
May 28, 2018
23
0
1
39
Hello there...

I have 3 VM's on DELL R710 with 2x 6core Xeon, 48GB RAM, RAID10 4x600GB SAS 15krpm on Perc H700 controller.

1. Win2003SRV 32bit (fixed 4GB assigned)
2. Win2016SRV Std x64 (fixed 8GB RAM assigned)
3. CentOS7 as MySQL database host (fixed 16GB RAM assigned)

Now, after few days of productive work users noticed radically speed loss while using MySQL based app.
I wonder if it's the RAM usage issue since PROXMOX gui shows ca 96% RAM used on CentOS VM.
However:

PROXMOX:
Code:
# pveversion
pve-manager/5.2-3/785ba980 (running kernel: 4.15.17-3-pve)
Code:
# free -m
              total        used        free      shared  buff/cache   available
Mem:          48280       25990       10163         207       12126       21522
Swap:         32767         229       32538


# cat /proc/meminfo
MemTotal:       49439480 kB
MemFree:        10402188 kB
MemAvailable:   22036048 kB
Buffers:          285088 kB
Cached:         11195892 kB
SwapCached:        69188 kB
Active:         25480732 kB
Inactive:       11281080 kB
Active(anon):   25009536 kB
Inactive(anon):   490184 kB
Active(file):     471196 kB
Inactive(file): 10790896 kB
Unevictable:       19908 kB
Mlocked:           19908 kB
SwapTotal:      33554428 kB
SwapFree:       33319776 kB
Dirty:               224 kB
Writeback:             0 kB
AnonPages:      25233604 kB
Mapped:           157400 kB
Shmem:            212112 kB
Slab:            1708476 kB
SReclaimable:     938820 kB
SUnreclaim:       769656 kB
KernelStack:        6992 kB
PageTables:        74752 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    58274168 kB
Committed_AS:   35658892 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:  13582336 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      224740 kB
DirectMap2M:    24928256 kB
DirectMap1G:    25165824 kB

CentOS:
Code:
# free -m
              total        used        free      shared  buff/cache   available
Mem:          15885        9390         160          17        6334        6160
Swap:         16211        2526       13685

cat /proc/meminfo
MemTotal:       16266348 kB
MemFree:          167012 kB
MemAvailable:    6311860 kB
Buffers:          155684 kB
Cached:          6213336 kB
SwapCached:      1320140 kB
Active:          8476384 kB
Inactive:        7344832 kB
Active(anon):    8025992 kB
Inactive(anon):  1443784 kB
Active(file):     450392 kB
Inactive(file):  5901048 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:      16601084 kB
SwapFree:       14014244 kB
Dirty:                44 kB
Writeback:             0 kB
AnonPages:       9010216 kB
Mapped:            35488 kB
Shmem:             17568 kB
Slab:             118904 kB
SReclaimable:      94540 kB
SUnreclaim:        24364 kB
KernelStack:        4000 kB
PageTables:        26704 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    24734256 kB
Committed_AS:   12840196 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       54064 kB
VmallocChunk:   34359677948 kB
HardwareCorrupted:     0 kB
AnonHugePages:   7282688 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      126832 kB
DirectMap2M:    16650240 kB
Not sure why CentOS shows only ca 9390 MB memory used with only 160 free left (?) - unless I'm reading it wrong...

Any ideas?

PS. Here's htop from CentOS:

Code:
htop

  1  [||                                                                    1.3%]   5  [                                                                      0.0%]
  2  [                                                                      0.0%]   6  [                                                                      0.0%]
  3  [|                                                                     1.3%]   7  [                                                                      0.0%]
  4  [                                                                      0.0%]   8  [                                                                      0.0%]
  Mem[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||9.21G/15.5G]   Tasks: 33, 108 thr; 1 running
  Swp[||||||||||||                                                   2.47G/15.8G]   Load average: 0.08 0.11 0.13
                                                                                    Uptime: 16 days, 22:17:00

  PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
32060 root       20   0  120M  2636  1448 R  1.3  0.0  0:00.46 htop
 2172 mysql      20   0 15.7G 8638M  5068 S  1.3 54.4 23h40:12 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
31689 mysql      20   0 15.7G 8638M  5068 S  1.3 54.4  0:07.24 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
 1448 mysql      20   0  381M  149M  1528 S  0.7  0.9 15h41:52 /opt/Mediator/mediator
31744 mysql      20   0  381M  149M  1528 S  0.7  0.9  0:05.01 /opt/Mediator/mediator
31425 mysql      20   0 15.7G 8638M  5068 S  0.0 54.4  5:46.75 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
31424 mysql      20   0  381M  149M  1528 S  0.0  0.9  3:59.06 /opt/Mediator/mediator
 2212 mysql      20   0 15.7G 8638M  5068 S  0.0 54.4  7:41.91 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
  929 root       20   0  560M  1484  1028 S  0.0  0.0  2:40.13 /usr/bin/python -Es /usr/sbin/tuned -l -P
 1557 mysql      20   0  381M  149M  1528 S  0.0  0.9  0:17.60 /opt/Mediator/mediator
30477 mysql      20   0 15.7G 8638M  5068 S  0.0 54.4  1:52.42 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
31322 mysql      20   0  381M  149M  1528 S  0.0  0.9  1:18.42 /opt/Mediator/mediator
 2195 mysql      20   0 15.7G 8638M  5068 S  0.0 54.4  2:44.73 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
 2201 mysql      20   0 15.7G 8638M  5068 S  0.0 54.4  1:41.77 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
 2193 mysql      20   0 15.7G 8638M  5068 S  0.0 54.4  1:28.86 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
 2187 mysql      20   0 15.7G 8638M  5068 S  0.0 54.4  1:30.00 /usr/sbin/mysqld --basedir=/usr --datadir=/data/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=ce
    1 root       20   0  186M  2792  1764 S  0.0  0.0  0:30.12 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
  396 root       20   0 71788 24644 24496 S  0.0  0.2  0:10.78 /usr/lib/systemd/systemd-journald
  423 root       20   0  113M   496   496 S  0.0  0.0  0:00.03 /usr/sbin/lvmetad -f
  428 root       20   0 44456   656   648 S  0.0  0.0  0:00.18 /usr/lib/systemd/systemd-udevd
  524 root       16  -4 55508   448   348 S  0.0  0.0  0:00.07 /sbin/auditd
  523 root       16  -4 55508   448   348 S  0.0  0.0  0:03.06 /sbin/auditd
  559 root       20   0  218M   752   748 S  0.0  0.0  0:00.01 /usr/sbin/abrtd -d -s
  580 polkitd    20   0  528M  1764  1220 S  0.0  0.0  0:00.00 /usr/lib/polkit-1/polkitd --no-debug
  581 polkitd    20   0  528M  1764  1220 S  0.0  0.0  0:04.52 /usr/lib/polkit-1/polkitd --no-debug
  592 polkitd    20   0  528M  1764  1220 S  0.0  0.0  0:00.00 /usr/lib/polkit-1/polkitd --no-debug
  594 polkitd    20   0  528M  1764  1220 S  0.0  0.0  0:00.00 /usr/lib/polkit-1/polkitd --no-debug
  595 polkitd    20   0  528M  1764  1220 S  0.0  0.0  0:00.00 /usr/lib/polkit-1/polkitd --no-debug
  560 polkitd    20   0  528M  1764  1220 S  0.0  0.0  0:08.24 /usr/lib/polkit-1/polkitd --no-debug
  562 root       20   0 26612  1512  1220 S  0.0  0.0  0:13.19 /usr/lib/systemd/systemd-logind
  563 root       20   0  216M   824   784 S  0.0  0.0  0:01.02 /usr/bin/abrt-watch-log -F BUG: WARNING: at WARNING: CPU: INFO: possible recursive locking detected ernel
  564 libstorag  20   0  8576   536   504 S  0.0  0.0  0:04.95 /usr/bin/lsmd -d
  569 root       20   0 24432   788   764 S  0.0  0.0  0:00.11 /usr/sbin/smartd -n -q never
 
Last edited:

h0tw1r3

New Member
Jul 12, 2014
10
1
3
Chicago, United States
gitlab.com
I have had this same problem on two different RHEL 7 container VM's.
The OS shows full memory (4 gig) and exhausts swap, but proxmox shows very little memory used by the VM (400 megabytes).
Only thing that gets it back to normal is to reboot the container and wait for it to happen again... which it gradually does.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!