Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Why does Ubuntu only show 3GB of RAM?

I bought Dell XPS 13 few days ago. Installed 64bit version of ubuntu, and changed kernel to:

3.2.0-29-generic #46+kamal5~DellXPS-Ubuntu SMP Sun Jul 29 18:49:08 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

My system sees only 3.2GB (3275MB) of RAM insted of 4GB. I have checked the stock ubuntu kernel and situation was the same. Graphic card is Intel HD3000.

pmd@daftbook:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          3275       2580        695          0        321       1100
-/+ buffers/cache:       1158       2117
Swap:         2047          0       2047

From lshw:

      description: System Memory
      physical id: 4
      slot: System board or motherboard
      size: 4GiB
         description: DIMM DDR3 Synchronous 1333 MHz (0.8 ns)
         product: HT2SCRCH
         vendor: Hynix/Hyundai
         physical id: 0
         serial: 00000000
         slot: ChannelA-DIMM0
         size: 2GiB
         width: 64 bits
         clock: 1333MHz (0.8ns)
         description: DIMM DDR3 Synchronous 1333 MHz (0.8 ns)
         product: HT2SCRCH
         vendor: Hynix/Hyundai
         physical id: 1
         serial: 00000000
         slot: ChannelB-DIMM0
         size: 2GiB
         width: 64 bits
         clock: 1333MHz (0.8ns)
share|improve this question

marked as duplicate by Jorge Castro, John S Gruber, Mik, devav2, Mitch Oct 11 '12 at 5:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Do you have your system configured such that the video card is using 768M? This would account for the difference in size, if so. – dobey Aug 4 '12 at 12:32
This is because of a BIOS update, revert to A04 bios if you want to retrieve your 4G, see my response here – Andre Miras Sep 25 '15 at 22:58

There are numerous factors that influence in the amount of usable memory shown. Let me talk first about Windows and then we can delve into Linux.

In Windows, if you have (Does not matter if you have 32 bit or 64 Bit) an X amount of memory, the system will reserved a percent of it for the correct functioning of the system. Depending on the hardware, integrated devices (Integrated video card, sound card, network card, etc...), amount of devices connected, version of Windows, etc.. the amount reserved will change. In some cases, on Windows XP in a PC with 4GB you will see yourself with only 3.5GB available. In other cases you will see 3.2GB, 3.1GB, 3.0GB or in the worst case I have seen, only 2.8GB. On Windows 7, the same reserved amount of memory varies depending on hardware and software, changing from 3.0GB to a 3.7/3.8GB available maximum ram. This available amount of ram is what the programs you run use and it is the memory that is left after the system has calculated and reserved the part of the memory that it needs to correctly work.

This memory is not normally interchanged between the user applications and the memory reserved for the system.

On Linux, is the same. The system loads and it needs a required amount of memory for everything to function as smooth as it can. If you have 512MB the system will not reserve a lot since it will notice the lack of memory. If you have 1GB or 2GB the amount reserved gets bigger. The limit for 32 Bit is 4GB from which it reserves between 200MB and 1GB of RAM (Again, depending on hardware or software) so everything can run smooth. So you would be left with a total usable memory between 3.0GB to 3.8GB.

Now, aside from the obvious reserved memory for the system, there are a couple of BIOS/hardware options that actually can take even more. The most common one is the amount of memory assign to an integrated video card. It can range from 2MB to a cool 1.5GB. If you have for example 1GB assign to the video card, that is 1GB you will not see in the total available memory. A sound card uses a small amount of memory ,but it uses memory nevertheless. Same for a network card, capturing device, webcam, etc...

Sum them all up and you get the total available amount of memory for the common programs you use (firefox, gimp, empathy, libreoffice, etc...)

So it is not a question of if Ubuntu is not reading the memory correctly with or without a 64 Bit system, it is more of a question about if the system has enough memory to operate correctly and enough for the user apps. In your case, as you can see, Ubuntu took 800MB for the system and 3.2GB for you to use with your apps, without both having to share memory in the process. This will enhance the speed and load time of the apps since they have their own user space in memory. A problem would be if the amount of memory the system needs is higher than the amount of memory you have and you want to open an app in that moment. They would have to share memory, which means having to use swap/virtual memory, which means slower loading times.

This is the terminal output of a 3GB Laptop:

exodus@exodus:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          2898       1186       1711          0        117        569
-/+ buffers/cache:        499       2398
Swap:         3837          0       3837

As you can see by my example and your example, the shared memory is not needed since you have much more memory than you need in the moment you ran that command. The system has its memory and the apps have their memory.

As you can also see (Using in my example Ubuntu 12.04 32 Bit) the system is only taking around 120MB. But look here:

cyrex@cyrex:~$ free -m
             total       used       free     shared    buffers     cached
Mem:         14696       1744       12952         0        447        730
-/+ buffers/cache:        533       3318
Swap:          254          0       254

In this case I have 16GB RAM and Ubuntu 32 Bit also, is taking around 1.5GB for the system. Giving me about 12.5GB for the rest of my apps. Now read here, on the same system with Windows 7 64BIT it takes 3.5GB. It always says when I go see the memory left 12.4GB. So depending on the system and hardware, the amount reserved (Or stolen ^^) can vary.

Hope this helps.

share|improve this answer
Thanks for you answer. I already knew that, but for me 800MB is still way too much. It's my 3rd computer with Sandy Bridge CPU, they were all very similiar in hardware spec. Also lot of my friends has similiar laptops and using Ubuntu. First time I see the situation where system is eating around 20%, so I will still digging to find the answer (since I'm not Linux expert) – pmd Aug 4 '12 at 21:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.