memory

Latest response

hi,
i have rhel 7 as vm in vmware.I gave in vmware 2Gb ram to this virtual machine.When i login in rhel and give
free -mh
total used free shared buff/cache available
Mem: 1.8G 626M 328M 9.9M 898M 974M
more /proc/meminfo
MemTotal: 1897044 kB

Why total memory showed is not 2G?

If i have an physical server and i insert 2G of ram,then the output of free -mh is 2g?
tnx

Responses

Hi Marius,

Welcome again to the RH discussion forums.

I discovered the same behavior you described on a physical RHEL 7 Linux server.

Please see this RH solution https://access.redhat.com/solutions/454133

This block of text is quoted from the above link:

Resolution
There is nothing can be done on this. To have some missing memory in the output of free or top is normal. It is not a bug, it is a feature. The system needs some memory space to handle all other memory addressing (for so-called page tables), for the kernel itself and for the internal kernel structures.

Root Cause
The kernel reserves some amount of memory (proportional to its total size) at the startup for a memory tables (for virtual-to-physical addresses translation). This memory given to the memory tables cannot be used by anything else and is subtracted from the total memory size reported.

The bigger physical RAM size is, the smaller is the ratio of the memory which cannot be used to the total physical RAM size:

On 12Gb desktop this ratio is around 4.5%
On 32Gb server this ratio is around 2%
On 512Gb server this ratio is around 1.56%

Regards RJ

Marius, also see this link Where Did My Memory Go which is cited in the previous Red Hat solution from above.

Regards

RJ