I have a computer with a Windows 7 and a Debian OS disk partition. The computer has 12GB ram as can be seen when logged in on the Windows 7 OS. However, the Debian partition is only recognizing just under 4GB ram. Why would this be, and how can I fix this?

When I run the "free" command I see the reduced RAM amount as well as when I try to create a virtual machine in Virtual Box with the maximum RAM being allowed for a VM topping off at that same low amount. As far as I understood, (which is not saying much..) OS partitions were only disk partitions not RAM partitions.


Running Debian 6 "Squeeze" 32 bit

Output of 'free' command

          total      used    free       ....
Mem:    3619800     386568   3233232    ...
-/+ buffers/cache:   66944   3552856  
Swap:    497972         0    497972   

I don't have Gnome installed so I'm not really sure how to take a screenshot. But in VirtualBox you have a setting for RAM allocation for VMs and on this Linux partition the option maxes out at 3584MB.

  • Actual commands and corresponding output please. A screenshot of relevant part of the VirtualBox configuration would be a bonus. Add this information to your Question, not as a Comment, so it doesn't get lost
    – roaima
    Aug 14 '15 at 21:23
  • Is this 64bit Debian? Which edition (Jessie, perhaps)?
    – roaima
    Aug 14 '15 at 21:24

4GB of memory requires 32 bits to store addresses. Most 32-bit processor architectures can only address 4GB of memory, and older x86 CPUs are no exception.

More recent 32-bit x86 CPUs can access more than 4GB of physical memory through a processor feature called PAE.¹ 64-bit x86 CPUs always have PAE.

PAE requires a Linux kernel compilation option. Without this option, the kernel can only address 4GB of RAM, and some of that is lost because it's used by peripherals such as the graphics card. But with this option, the kernel won't work on processors that don't have the PAE feature.

Debian's default kernel is compatible with most x86 processors but can't make use of some features of recent(-ish) processors such as PAE. To use more than 4GB of RAM, install a PAE-enabled kernel and reboot into it. On Debian squeeze, you need the linux-image-2.6-686-bigmem package.

If you have a 64-bit CPU, you can instead install a 64-bit kernel: linux-image-2.6-amd64. With a 64-bit kernel, you can make use of more than 4GB of RAM, and you can run both 32-bit and 64-bit applications. Or you can install a whole 64-bit distribution (the amd64 architecture). To find out whether your processor is a 64-bit one, run grep -w lm /proc/cpuinfo — if a line with flags : … lm … appears, you have a 64-bit CPU.

Note that on a 32-bit system, the size of virtual memory is still limited to 4GB. On Linux, that's split with 1–3GB for the kernel and 1–3GB for the process. This is the limit of addressable memory in a process; a 32-bit system can make use of more than 4GB of RAM because each process can use up to 1–3GB of that RAM. So if you want to run a VirtualBox VM with more than 3GB of RAM, you'll need to install a 64-bit distribution.

  • PAE is not "recent", it has been around for years. First implemented in the Intel Pentium Pro in 1995.
    – fpmurphy
    Aug 15 '15 at 0:53
  • @fpmurphy1 It's more recent than older processors that didn't have it. Aug 15 '15 at 0:54
  • Those "older processors" are 20 years old now. A chip from 19 years ago would support PAE, but most people wouldn't consider that "recent".
    – Wyzard
    Aug 15 '15 at 4:08
  • Maybe a more solid reasoning for the stock x86 kernel not supporting PAE is that it is somewhat exotic solution which has been optimized away (since not everything can be compiled in feasibly)?
    – zagrimsan
    Aug 17 '15 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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