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?
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?
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.
mem_map[]
data structure. So on a machine with 8GB of memory, that alone would take away more than 100MB already.
– sayap
Sep 08 '20 at 08:00
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.
free
, and 2.34 GiB of Slab memory, which doesn't match the other figures.
– Ruslan
Jun 08 '17 at 14:22
cat /proc/meminfo | grep SReclaimable
to see if that explains the discrepancy. You could also check if you have any memory "stolen" by your graphics card (dmesg | grep stolen
) If there is still a shortfall, try running dmesg | grep e820
which will help you to identify any other hardware reserved memory.
– sempaiscuba
Jun 08 '17 at 14:43
grep SReclaimable /proc/meminfo
says almost the same (a bit less than) Slab. Not sure how to interpret this.
– Ruslan
Jun 08 '17 at 14:54
Your actual RAM is measured in 8 Gigabytes = 8,000,000,000 bytes
that is, 8,000,000,000/(1024*1024)=7629.39 MeBi Bytes=7.62939 GiBi Bytes
Since it is rounded up, it is shown as 7.7 GiBi Bytes.
man units
is a useful reference here), see sudo lshw | grep -A 6 memory | head
. In my case the units are in GiB in both the command line and the gui report. So the argument that the difference is due to different units plus a rounding looks coincidental to me. Note though that the disk space is given in decimal units (GB), which adds to the confusion.
– XavierStuvw
Jun 08 '17 at 18:09
Why was this upvoted? It's complete nonsense
may not be the most polite way to do so but it certainly explains a downvote better than having no comment, but this would be a topic for meta.
– mbx
Jun 09 '17 at 11:01
cat /proc/meminfo
tell you? – mbx Jun 08 '17 at 12:59