17

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

1
  • 4
    What does cat /proc/meminfo tell you?
    – mbx
    Jun 8, 2017 at 12:59

3 Answers 3

34

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.

8
  • 4
    This does make sense, since OP's graphics is Intel, which always takes part of RAM for VRAM.
    – Ruslan
    Jun 8, 2017 at 13:08
  • 1
    Bonus: you can tweak the amount allocated to the GFX in BIOS.
    – Agent_L
    Jun 8, 2017 at 14:12
  • In layman language, System reserves ram for graphics memory mapping, and for kernel. Apart from this ram size can be also reduced due to some bios settings, or ability of the motherboard to handle memory. So no one gets total size of ram after installing it in system. This answer is right. I also confirmed it from other sites, Jun 8, 2017 at 14:35
  • While it explains the most probable cause, this answer isn't yet backup up by a link/reference providing more detail/proof.
    – mbx
    Jun 9, 2017 at 11:06
  • 2
    What if I have my integrated graphics disabled, VRAM set to the lowest setting (32 MiB), but I'm still missing 0.6 GiB? Feb 28, 2020 at 7:17
9

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.

4
  • Slab is inconclusive. I have 16 GiB of RAM, with 15.37 GiB reported by free, and 2.34 GiB of Slab memory, which doesn't match the other figures.
    – Ruslan
    Jun 8, 2017 at 14:22
  • @Ruslan Try running 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. Jun 8, 2017 at 14:43
  • grep SReclaimable /proc/meminfo says almost the same (a bit less than) Slab. Not sure how to interpret this.
    – Ruslan
    Jun 8, 2017 at 14:54
  • A bit late but "missing" RAM may come from the CPU! httpss://unix.stackexchange.com/questions/562720/system-monitor-in-ubuntu-18-shows-only-5-8-gb-ram-out-of-8-gb-installed
    – Robin_
    Jan 14, 2021 at 4:53
-5

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.

7
  • 5
    @terdon Deleting comments that correctly point out an answer is wrong? WTF Jun 8, 2017 at 17:17
  • 4
    This answer is wrong; memory module sizes are measured in base-1024, so the OP has 8GiB physical RAM, not 8GB.
    – marcelm
    Jun 8, 2017 at 18:30
  • 8
    @CodesInChaos no, I deleted >20 comments because they were having a discussion and, more importantly, instead of explaining why this answer was wrong, they were just stating that it's wrong and in a rude way. If someone wants to point out errors in an answer, they should do so politely and constructively. "Why was this upvoted? It's complete nonsense" is neither.
    – terdon
    Jun 8, 2017 at 18:32
  • 2
    @terdon usually when downvoting, people are suggested to leave a note why - 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 9, 2017 at 11:01
  • 3
    @mbx no, it explains nothing but that one person for reasons they didn't explain considers it wrong. However, instead of being helpful and pointing out the issue, they chose to only point out their own perceived superiority. Compare that to the comments here now which at least take the time to explain what the issue is.
    – terdon
    Jun 9, 2017 at 11:11

Not the answer you're looking for? Browse other questions tagged .