Why does my R4 Amazon Elastic Compute Cloud (Amazon EC2) instance running RHEL 7 show missing memory (RAM) even though the appropriate memory size was allocated by Xen?

R4 instances that are running RHEL 7.0 to 7.3 will show missing RAM even though the appropriate memory size was allocated by Xen. The missing memory is due to a Red Hat balloon driver bug (1437309) which was fixed in Red Hat 7.4.

In the kernel 3.10.0-514.21.2.el7.x86_64, which is the default for Red Hat 7.3, the balloon driver's initial memory value includes non-RAM ranges. As a result, the initial memory target based on the instance type will appear to be smaller than what balloon driver perceives to be the current number of available pages. Thus it will balloon down "extra" pages, decreasing amount of available memory.

In RHEL version 7.4, the balloon driver code is set to reflect the actual number of existing RAM pages that can be utilized by the instance.

To fix the balloon driver issue, update your Red Hat kernel's version.

Note: The balloon driver issue doesn't exist in Amazon Linux, because the balloon driver is disabled on Amazon Linux instances by default.

To update the kernel's version, run the "update" command and reboot your server:

# yum update -y   
# reboot

After the update, you can check the kernel’s version and the amount of memory as follows:

# date && uname -r && free –m
Mon Aug 7 05:53:58 EDT 2017
3.10.0-693.el7.x86_64
     total used free  shared buff/cache available
Mem: 15129 170  14726 16     232  14656
Swap: 0 0 0

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2018-09-18