Why does Ubuntu show slightly less RAM than my computer has built in? [duplicate]

My machine's RAM is 8 GB. I have recently installed Ubuntu 17.04.

Why does Ubuntu show me that it has only 7.7 GB and not the full 8 GB?

About this computer


Solution 1:

This is most probably due to your graphics card reclaiming some of the RAM for its own purposes (mostly texture storage). There's also a chunk of memory reserved by the kernel, but it's tiny (a few megabytes) compared to the discrepancy you see.

On many systems, the amount of RAM reserved for graphics is configurable in BIOS settings.

Solution 2:

It's probably because the kernel is using part of your memory. Since kernel memory can't be freed in most cases, Ubuntu just reports the total available (less the amount used by the kernel).

You can find out more detail by using the following commands:

Check how big your RAM sticks claim to be:

sudo dmidecode | grep Size | grep MB

Check how much RAM is available for general use:

free -h

Estimate how much memory your kernel is using:

cat /proc/meminfo | grep Slab

Check for memory "stolen" by your graphics card:

dmesg | grep stolen

This is actually covered in this answer (which has more details).

Hope that helps.