Inquiry Discrepancy between physical RAM and designed RAM on Azure VM

Posted on

I came across a scenario which I did not see before.

There is an Azure RHEL 8 VM, which, according to the design and configuration in the Portal should have 64 GB of RAM.

When VM was deployed, standard RHEL commands show unexpected results:

$ sudo /usr/bin/lsmem | awk -F: '/Total online memory:/ {print $2}' | xargs | sed 's/[^0-9]*//g'
66 

$ sudo /usr/sbin/lshw -c memory 2>&1 |grep -A4 "\-memory" | awk -F: '/size/ {print $2}'|xargs | sed 's/[^0-9]*//g'
63

In other words, lsmem(1) gives result of 66 GB and lshw(1) gives result of 63 GB.

Even the third command dmidecode(1) does not match designed value of 64 GB.

On another VM, both lsmem(1) and lshw(1) give result of 66 GB.

Is this maybe how Azure "randomly" creates VM with RAM being approximately matching the designed value? It still doe snot explain who different commands show different results.

Regards,

Dusan Baljevic (amateur radio VK2COT)

Responses