Page 1 of 2 12 LastLast
Results 1 to 10 of 62

Thread: 32 bit Ubuntu with 4GB+ of memory

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    32 bit Ubuntu with 4GB+ of memory

    Overview

    This guide is to explain how Ubuntu handles 4 or more gigabytes of memory and the options you have for utilizing all your memory.

    By default, the 32bit versions of Ubuntu support up to 4GB of memory however, in practice, if you have 4GB of memory, you will generally only see somewhere between 3GB and 3.5GB. The reason for this is that various devices on your computer need large chunks of the memory address space to work properly and so the system maps them into the highest parts of memory. When that happens on a machine with 4GB of memory and a 32bit kernel, it limits the amount addressable physical memory.

    The options you have for running Ubuntu with 4G+ of memory are:

    1) Use a 64bit version of Ubuntu
    If your machine supports it, the easiest way to make use of 4GB+ of memory on Ubuntu is to simply use a 64bit version of Ubuntu which can inherently handle large amounts of memory. For some motherboards, you may have to enable a feature called "Map around memory hole" in the BIOS for this to work (it may be called something different depending on the BIOS however, it should be named something similar to this).

    Pros:
    - Requires no extra setup
    - No inherent performance hit for using 4GB+ of RAM

    Cons:
    - Not supported on all hardware
    - Not all software/drivers may be supported for 64bit versions of Ubuntu. However, this is far less of an issue than it used to be and most users will have no problems whatsoever running 64bit.

    2) Use a PAE enabled kernel
    PAE is a way to allow a 32bit kernel to address up to 36bits of memory (64GB). The kernel documentation says that there is a slight performance hit when using PAE however, in practice, you are not likely to notice any difference in performance. The default Ubuntu kernel does not have PAE enabled however, there are two ways to get a PAE enabled kernel:

    2.1) Ubuntu server kernel
    The Ubuntu server kernel has PAE enabled and can be installed by doing:

    Code:
    sudo apt-get install linux-server linux-headers-server linux-restricted-modules-server
    After the server kernel has been installed, you can select it from the grub boot menu.

    Pros:
    - Easy to setup and maintain on an existing 32bit install
    - Works on machines that cannot use a 64bit version of Ubuntu but support 4GB+ of RAM.

    Cons:
    - The server kernel is not optimized for desktop usage (see link above). However, depending on how you use your machine you may not notice any difference.
    - There can be issues with third party drivers and the server kernel (specifically, nvidia drivers).

    2.2) Build a PAE enabled kernel
    It's very easy to enable PAE in a custom compiled kernel. From "make menuconfig", the option to enable it is:

    Code:
    -> Processor type and features
      -> High Memory Support
        -> 64GB
    There are many guides to building a kernel for an Ubuntu machine:
    - http://ubuntuforums.org/showthread.php?t=311158
    - http://www.howtoforge.com/kernel_compilation_ubuntu
    - http://ubuntuforums.org/showthread.php?t=618563
    - https://help.ubuntu.com/community/Kernel/Compile (from Ubuntu source)

    Pros:
    - Better desktop performance than the Ubuntu server kernel
    - Building a custom kernel helps you learn about the system

    Cons:
    - Building a custom kernel can be difficult and time consuming.
    - You may have to manually install some drivers for your hardware.
    - By not using an Ubuntu kernel, you become responsible for keeping your kernel up to date with security patches.

    3) Do nothing
    If your machine is not capable of running a 64bit version of Ubuntu, the performance of the server kernel isn't to your liking and you aren't willing to build a custom kernel, your last option is to simply do nothing. This will limit you to around 3GB to 3.5GB of memory however, it shouldn't cause any system instability or problems.

    Comments/questions/suggestions welcome.
    Last edited by sdennie; July 28th, 2008 at 03:54 AM. Reason: Fix typos
    Don't try to make something "fast" until you are able to quantify "slow".

  2. #2
    Join Date
    Jul 2005
    Location
    FRANCE
    Beans
    162
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: 32 bit Ubuntu with 4GB+ of memory

    Thanks man !

  3. #3
    Join Date
    Oct 2006
    Location
    Belgrade, Serbia
    Beans
    1,321
    Distro
    Ubuntu

    Re: 32 bit Ubuntu with 4GB+ of memory

    this is a keeper great information!
    It would be good to add a link to the memory limitations to 64-bit Ubuntu too:
    http://en.wikipedia.org/wiki/64-bit#Memory_limitations
    Last edited by forger; July 11th, 2008 at 03:03 PM.

  4. #4
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: 32 bit Ubuntu with 4GB+ of memory

    Quote Originally Posted by forger View Post
    this is a keeper great information!
    It would be good to add a link to the memory limitations to 64-bit Ubuntu too:
    http://en.wikipedia.org/wiki/64-bit#Memory_limitations
    Updated the 64bit section with this link.
    Don't try to make something "fast" until you are able to quantify "slow".

  5. #5
    Join Date
    Jun 2006
    Beans
    Hidden!

    Thumbs up Re: 32 bit Ubuntu with 4GB+ of memory

    Went with the 2.1 option - server kernel - works like a *charm* - maybe even better than the desktop one.
    Thanks! (EDIT: nope, problems with compiz (the eye candy))

    (had to do 'apt-get update' cos dependencies were b0rken)

    Default 32-bit Ubuntu should really have PAE enabled - 64-bit version really makes sense only in a very few cases, actually in only one case: when you need to run a *single* application that needs more than 3 GB memory.
    The catch is, that 64-bit applications also take more memory than 32-bit apps with the same data/code set (in the case of Java it's two times more - means 1gb 32bit app == 2gb 64bit app), so you may need to start with 8 GB ram for the 32 to 64 bit upgrade to make any sense.
    Last edited by yct; July 25th, 2008 at 11:06 PM. Reason: foud problems later

  6. #6
    Join Date
    Apr 2006
    Beans
    14

    Re: 32 bit Ubuntu with 4GB+ of memory

    Well im getting a new computer soon (tossing stationary+laptop for ûber laptop) and thinking about getting 6-8GB of ram (I wanto run 1-2 OS's in VMWARE from time to time, for experimental purposes.).
    Now, I dont wanto sit there without security patches and whatnot.. is there any new version of ubuntu around the corner (say 3-4 months?) that will support this?
    Shouldnt be so hard, if we can just build it in ourself, and they even have it enabled by default in server-version?

  7. #7
    Join Date
    Jul 2007
    Location
    The Shire, Canada
    Beans
    Hidden!

    Re: 32 bit Ubuntu with 4GB+ of memory

    Hey, thanks. I really am learning a lot.
    Another round of Ubuntu for my friends here!
    Fighting to bring Pink back to The Pink Ponies archive.
    DELETE INSANITY!

  8. #8
    Join Date
    Nov 2009
    Beans
    9

    Re: 32 bit Ubuntu with 4GB+ of memory

    2) Use a PAE enabled kernel
    PAE is a way to allow a 32bit kernel to address up to 36bits of memory (64GB). The kernel documentation says that there is a slight performance hit when using PAE however, in practice, you are not likely to notice any difference in performance. The default Ubuntu kernel does not have PAE enabled however, there are two ways to get a PAE enabled kernel:

    2.1) Ubuntu server kernel
    The Ubuntu server kernel has PAE enabled and can be installed by doing:

    Code:
    sudo apt-get install linux-server linux-headers-server linux-restricted-modules-server
    After the server kernel has been installed, you can select it from the grub boot menu.

    Pros:
    - Easy to setup and maintain on an existing 32bit install
    - Works on machines that cannot use a 64bit version of Ubuntu but support 4GB+ of RAM.

    Cons:
    - The server kernel is not optimized for desktop usage (see link above). However, depending on how you use your machine you may not notice any difference.
    - There can be issues with third party drivers and the server kernel (specifically, nvidia drivers).

    Thanks for the guide, sdennie. I used step 2 modified for Ubuntu 9.10, using synaptic to install linux-server linux-headers-server only. Works well and my 4 GB is now accurately reported by top (was 3 GB earlier) . Note that ubuntu 9.04 did not have that problem.

  9. #9
    Join Date
    Jul 2007
    Location
    Visalia, California
    Beans
    144
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 32 bit Ubuntu with 4GB+ of memory

    Quote Originally Posted by sdennie View Post
    2.2) Build a PAE enabled kernel
    It's very easy to enable PAE in a custom compiled kernel. From "make menuconfig", the option to enable it is:

    Code:
    -> Processor type and features
      -> High Memory Support
        -> 64GB
    There are many guides to building a kernel for an Ubuntu machine:
    - http://ubuntuforums.org/showthread.php?t=311158
    - http://www.howtoforge.com/kernel_compilation_ubuntu
    - http://ubuntuforums.org/showthread.php?t=618563
    - https://help.ubuntu.com/community/Kernel/Compile (from Ubuntu source)

    Pros:
    - Better desktop performance than the Ubuntu server kernel
    - Building a custom kernel helps you learn about the system

    Cons:
    - Building a custom kernel can be difficult and time consuming.
    - You may have to manually install some drivers for your hardware.
    - By not using an Ubuntu kernel, you become responsible for keeping your kernel up to date with security patches.
    Looking in Synaptic, I can see that PAE kernels are now available without the need to build one. So, here's my question:

    I am currently running Ubuntu 9.10 Karmic with the 32-bit generic kernels. How do I install and switch over to the PAE kernel and remove the generic kernels?

    I assume it is as simple as running:
    Code:
    sudo apt-get install linux-generic-pae linux-headers-generic-pae
    then booting into the new kernel from GRUB, and then removing the non-PAE kernel stuff, right?

    Is this right? Or am I putting myself on the road to borking my system?

  10. #10
    Join Date
    Jun 2008
    Location
    L'viv, Ukraine
    Beans
    53
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 32 bit Ubuntu with 4GB+ of memory

    correct

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •