Why does Ubuntu show slightly less RAM than my computer has built in?
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.
Related videos on Youtube
zshanabek
back-end developer, public speaker, linux enthusiast, lotr fan. Love simple solutions. I speak 6 languages
Updated on September 18, 2022Comments
-
zshanabek over 1 year
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?
-
sabna almost 7 yearsWhat does
cat /proc/meminfo
tell you?
-
-
Iluvathar almost 7 yearsThis does make sense, since OP's graphics is Intel, which always takes part of RAM for VRAM.
-
Agent_L almost 7 yearsBonus: you can tweak the amount allocated to the GFX in BIOS.
-
Iluvathar almost 7 yearsSlab 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. -
Alamjit Singh almost 7 yearsIn 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,
-
sempaiscuba almost 7 years@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 runningdmesg | grep e820
which will help you to identify any other hardware reserved memory. -
Iluvathar almost 7 years
grep SReclaimable /proc/meminfo
says almost the same (a bit less than) Slab. Not sure how to interpret this. -
terdon almost 7 yearsComments are not for extended discussion; this conversation has been moved to chat.
-
CodesInChaos almost 7 years@terdon Deleting comments that correctly point out an answer is wrong? WTF
-
XavierStuvw almost 7 yearsTo check whether the units of the RAM are decimal or binary (
man units
is a useful reference here), seesudo 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. -
marcelm almost 7 yearsThis answer is wrong; memory module sizes are measured in base-1024, so the OP has 8GiB physical RAM, not 8GB.
-
terdon almost 7 years@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.
-
sabna almost 7 years@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. -
sabna almost 7 yearsWhile it explains the most probable cause, this answer isn't yet backup up by a link/reference providing more detail/proof.
-
terdon almost 7 years@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.
-
Aaron Franke about 4 yearsWhat if I have my integrated graphics disabled, VRAM set to the lowest setting (32 MiB), but I'm still missing 0.6 GiB?
-
Dmitry Grigoryev about 4 years@AaronFranke How much RAM did you get back by disabling the integrated graphics? Perhaps it still consumes RAM. Also, videoadapters are not the only users of RAM. On a system with a device tree you could probably account for every byte.
-
sayap over 3 yearsThe kernel would occupy a lot more than a few megabytes. As per linux-mm.org/WhereDidMyMemoryGo, on a 64-bit kernel, about 1.36% of total memory will be used by the kernel to maintain the
mem_map[]
data structure. So on a machine with 8GB of memory, that alone would take away more than 100MB already. -
Robin_ over 3 yearsA 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
-
dileepa almost 3 yearsSame issue here but my system has a dedicated graphics card (nVidia GeForce GT 430) with 510mb build in memory.