3

I'm using a laptop with 32-bit Ubuntu 10.04.

I used to have only 2 GB of RAM. Today, our IT-support upgraded my laptop to a total of 6 GB of RAM. They told me "Though you do now have 6 GB, when you use your current Ubuntu, you'll only have 3 GB available. You have to install the latest version of 64-bit Ubuntu to enable all of the 6 GB."

He was in a hurry to leave without explaining more. I turned on my laptop, used gnome-system-monitor to check, and as he said, it shows I only have 3 GB of RAM.

Could someone explain me why? Why do I have just 3 GB available, and why installing a 64-bit version makes all of the 6 GB available?

Jani Uusitalo
  • 893
  • 1
  • 8
  • 22

3 Answers3

10

If you have the 32bit version installed then you either need to install the 64bit version or you can just install a PAE kernel that can access all your ram. From terminal or ALT+F2 run sudo apt-get install linux-image-generic-pae linux-headers-generic-pae and reboot

You need a pae/64bit kernel to use more than 3.2gb as 32bit can not address more than that. It's a hardware limitation, not a linux one.

tgm4883
  • 8,062
duffydack
  • 7,584
1

RAM in common computers is addressed (i.e. referred to by programs) using sequences of bits that correspond to powers of two. When you're using a 32-bit operating system, it means that programs have (at most) 32 bits available to them to describe each address. This 32-bit limit, fundamentally, lies in hardware: the x86 family of processors originally reserved just 32 bits for addresses.

The total number of different unique sequences you can organise 32 bits in is 4,294,967,296. For computers, this means you can only refer to that many different addresses in the memory. To point to more addresses (so that each address still remains unique) you must have more bits.

That large total number translates to 4 GB. As for why, in practice, it can actually be a quarter less than that, the 3 GB barrier Wikipedia article will explain.

Physical Address Extension or PAE, on hardware level, is an extension the 32-bit addressing in x86 processors: PAE processors have 36 bits for memory, thus extending the range of addresses available for the operating system (which then divides this memory among the programs). When you're installing a PAE kernel, you're in effect installing low-level operating system support for this extended x86 hardware.

When you have a 64-bit processor (as most modern processors are), you can run operating systems and applications that are built to address memory using those 64 bits. This gives them a total of "18446744073709551616 different values, a number in excess of 18 quintillion". In theory, at least, that means you won't run out of addresses before you have more than 16,8 terabytes of RAM.

Jani Uusitalo
  • 893
  • 1
  • 8
  • 22
1

You will be able to use all 6G of RAM if you will choose the *-pae kernel when you boot in the Grub menu. PAE stands for Physical Address Extension and if you can't see it in the menu you can use Synaptic to add it to your current kernel. Be sure to install the same version though.

yossile
  • 5,828