I did open a ticket with AWS (the response to which actually linked this thread), and noted that the same behavior is seen in the latest RHEL 7 as well. The suggestion I got was to either continue using CentOS 6, or switch to Amazon Linux, which isn't affected by the issue. Some feedback I got from the ticket:
On CentOS 6:
Code: Select all
$ cat /proc/meminfo
MemTotal: 3921016 kB
$ uname -a
Linux ip-172-31-42-210 2.6.32-573.18.1.el6.x86_64 #1 SMP Tue Feb 9 22:46:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ dmesg|grep Memory:
[ 0.000000] Memory: 3843956k/4456448k available (6440k kernel code, 262540k absent, 349952k reserved, 4266k data, 1620k init)
On CentOS 7:
Code: Select all
$ cat /proc/meminfo
MemTotal: 3619008 kB
$ uname -a
Linux ip-172-31-45-176 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ dmesg|grep Memory:
Memory: 3902744k/4456448k available (5397k kernel code, 262540k absent, 291164k reserved, 7011k data, 1296k init)
On RHEL 7:
Code: Select all
$ cat /proc/meminfo
MemTotal: 3619008 kB
$ uname -a Linux ip-172-31-44-191.us-west-2.compute.internal 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
$ dmesg|grep Memory:
[ 0.000000] Memory: 3844620k/4456448k available (6440k kernel code, 262540k absent, 349288k reserved, 4266k data, 1620k init)
On the latest Amazon Linux:
Code: Select all
$ cat /proc/meminfo
MemTotal: 4049876 kB
$ uname -a Linux ip-172-31-47-30 4.4.11-23.53.amzn1.x86_64 #1 SMP Wed Jun 1 22:22:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ dmesg|grep Memory:
[ 0.000000] Memory: 4032704K/4193908K available (4999K kernel code, 983K rwdata, 2432K rodata, 1188K init, 1580K bss, 161204K reserved, 0K cma-reserved)
I'd also been wondering if Xen was somehow to blame, but given that the BIOS memory map shows the full 4GB, I'd assume it's something on the CentOS side that's allocating it away from userspace. I don't see that happening in
/proc/iomem though.