Ubuntu shows 4x8GB installed, but only reports 24GB mem avail.


[H]F Junkie
Jun 3, 2005
This is on a rented server, so I am wondering if there is some OS feature I am missing. The server has Ubuntu 20 installed, and should be natively installed as far as I know, it shouldn't be a VM. I am running a VM within Ubuntu. I'm using KVM and have allocated 16GB to that VM. I'm wondering if 8GB could possibly be being allocated to I/O or something and so it's not part of the reported free memory.

root@ubuntu:~# sudo dmidecode -t memory|grep -A5 "8192 MB"
        Size: 8192 MB
        Form Factor: DIMM
        Set: None
        Locator: PROC 1 DIMM 1
        Bank Locator: Not Specified
        Type: DDR4
        Size: 8192 MB
        Form Factor: DIMM
        Set: 2
        Locator: PROC 1 DIMM 3
        Bank Locator: Not Specified
        Type: DDR4
        Size: 8192 MB
        Form Factor: DIMM
        Set: 5
        Locator: PROC 1 DIMM 6
        Bank Locator: Not Specified
        Type: DDR4
        Size: 8192 MB
        Form Factor: DIMM
        Set: 7
        Locator: PROC 1 DIMM 8
        Bank Locator: Not Specified
        Type: DDR4

root@ubuntu48tb:~# free -h
              total        used        free      shared  buff/cache   available
Mem:           23Gi        16Gi       309Mi       1.0Mi       6.4Gi       6.3Gi
Swap:         4.0Gi        16Mi       4.0Gi

root@ubuntu:~# cat /proc/meminfo
MemTotal:       24496116 kB
MemFree:          289228 kB
MemAvailable:    6605596 kB
Buffers:          115628 kB
Cached:          6399364 kB
SwapCached:          700 kB
Active:         18026212 kB
Inactive:        5332060 kB
Active(anon):   16354840 kB
Inactive(anon):   490116 kB
Active(file):    1671372 kB
Inactive(file):  4841944 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4189180 kB
SwapFree:        4172704 kB
Dirty:               168 kB
Writeback:             0 kB
AnonPages:      16842904 kB
Mapped:            94032 kB
Shmem:              1660 kB
KReclaimable:     207500 kB
Slab:             625372 kB
SReclaimable:     207500 kB
SUnreclaim:       417872 kB
KernelStack:        4560 kB
PageTables:        37272 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    16437236 kB
Committed_AS:   18111220 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       90544 kB
VmallocChunk:          0 kB
Percpu:            10816 kB
HardwareCorrupted:     0 kB
AnonHugePages:    385024 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      823872 kB
DirectMap2M:    18970624 kB
DirectMap1G:     7340032 kB
Do you have the kernel boot messages? You can usually see them if you run dmesg soon enough after booting or you might be able to get them from system logs. There's usually quite a few about memory.

Also, tell us about the CPU and what cards you've got in there.
It ended up being a bad memory module. I did reboot the machine and get dmesg stuff and it also reported 24GB. Submitted a ticket and they identified a bad memory stick. All good now. (y)