[PCWorks] Interesting article on 4gb ram limit on 32 bit OS

  • From: Peter Kaulback <peter@xxxxxxxxxxxxxxxxx>
  • To: pcworks <pcworks@xxxxxxxxxxxxx>
  • Date: Tue, 25 Aug 2009 19:49:11 -0400

Hello listers I saw this article on /. today about the 4gb limit on 32 
bit Windows 
http://www.geoffchappell.com/viewer.htm?doc=notes/windows/license/memory.htm

Additionally, I found that Linux supports up to 64 gb of ram on 32 bit, 
its just not enabled in the kernel by default. And most if not all 
applications don't support that much ram anyways. If you want to enable 
that much ram you should follow these instructions:
<!snip>
To check whether your kernel is configured to use all your RAM, enter 
the command free -m. This command gives you the total amount of unused 
RAM on your system, as well as the size of your swap file, in megabytes. 
If the total memory is 885, then no high memory is enabled on your 
system (the rest of the first gigabyte is reserved by the kernel for its 
own purposes). Similarly, if the result shows over 1 gigabyte but less 
than 4GB when you know you have more, then the 4GB parameter is enabled, 
but not the 64GB one. In either case, you will need to add a new kernel 
to take full advantage of your RAM.

On some distributions, you can add a generic kernel that meets your 
requirement in a matter of moments. In Debian, for instance, use the 
apt-cache search command to locate a recent linux-image package for a 
kernel for a 686 processor if you want support for up to 4 gigabytes. If 
you want support for up to 64 gigabytes, look for a kernel that ends 
with 686-bigmem. These kernels will enable support for 64GB. 
Unfortunately, a generic kernel for only 4GB does not exist. Similarly, 
in Ubuntu, look for a recent kernel image whose package name ends in 
smp; these kernels are designed for dual core processors, but work on 
single core processors as well, although sometimes with a small 
performance hit.

If your distribution does not include a useful generic kernel, or if you 
want to fine-tune the use of high memory on your system, you need to 
compile a custom kernel. You should consult your distribution's 
documentation for the details of where to get the source code and 
headers and any unique aspects of compiling a kernel for it. However, 
enabling high memory support involves no more than five parameters in 
the Firmware Drivers section:
Make sure that CONFIG_NOHIGHMEM is not set.
Set either CONFIG_HIGHMEM4G or CONFIG_HIGHMEM64G to yes, using whichever 
one is appropriate for the RAM in your system. If you have Note that you 
should use the 4 gigabyte parameter for less than 4 gigabytes of RAM, 
and the 64 gigabyte parameter for 4 or more gigabytes (4 gigabytes of 
RAM, remember is actually slightly more than that).
Set CONFIG_HIGHMEM to yes.
Optionally, set CONFIG_DEBUG_HIGHMEM to yes if you want to log error 
messages. Since many generic kernels turn this option off, you can 
probably do without it, especially if you do not delete other kernels 
from your boot manager's menu, so that you can still start your computer 
if your newly compiled kernel is unusable.

Compile the rest of the kernel as you choose and install it in your boot 
manager's menu. Consult the documentation for your boot manager for the 
details of how to do this.

The next time you start your system, run free -m again. This time, the 
results should reflect the actual amount of RAM installed. In the few 
cases that it does not, add a parameter to your boot manager to specify 
the amount of memory on the system. For both GRUB and LILO, the 
parameter is mem=<amount of RAM>M, placed just after the name of the 
customized kernel. The amount of RAM should be in megabytes.

Eventually, this problem will disappear as either high memory kernels 
become the norm in distributions or the transition to 64-bit Linux is 
finally complete. However, for the next year or so, this solution is 
likely to remain useful for anyone perplexed by the apparent lack of RAM 
on their system.
<!endsnip> http://linux.com/archive/feature/119287

Peter Kaulback
=========================
The list's FAQ's can be seen by sending an email to 
PCWorks-request@xxxxxxxxxxxxx with FAQ in the subject line.

To unsubscribe, subscribe, set Digest or Vacation to on or off, go to 
//www.freelists.org/list/pcworks .  You can also send an email to 
PCWorks-request@xxxxxxxxxxxxx with Unsubscribe in the subject line.  Your 
member list settings can be found at 
//www.freelists.org/cgi-bin/lsg2.cgi/l=pcworks .  Once logged in, you have 
access to numerous other email options.  

The list archives are located at //www.freelists.org/archives/pcworks/ .  
All email posted to the list will be placed there in the event anyone needs to 
look for previous posts.
-zxdjhu-

Other related posts:

  • » [PCWorks] Interesting article on 4gb ram limit on 32 bit OS - Peter Kaulback