Getting Ubuntu 9.04 (32-bit) to use 4 GB of memory?

Asked by aspa on 2009-07-13

Hi,

I'm using Ubuntu 9.04 Desktop Edition (32-bit) on my laptop for software development. The laptop has 4 GB of memory installed and since the development environment and tools use a lot of memory I'd like to be able to fully utilize all of the physical memory.

There seems to be a few different methods for getting Ubuntu to use 4 GB of memory. I've chosen to take the build your own kernel path.

I followed the instructions found in the KernelCompile page to compile a PAE-enabled kernel but for some reason the configuration changes I make seem to get overwritten when I regenerate or update the configs.

Here's the procedure I'm using:

    sudo apt-get build-dep linux-image-2.6.28-13-generic
    apt-get source linux-image-2.6.28-13-generic

    # manually edit debian/config/i386/config.generic to add the following line:
    # CONFIG_X86_PAE=y

    chmod u+x debian/scripts/misc/*
    bash debian/scripts/misc/oldconfig i386

I've also tried creating my own config file (config.pae) and regenerating config files using:

    debian/rules updateconfigs

but the PAE setting always gets lost from the config files.
I've also installed the kernel that I've built but it doesn't seem to be PAE-enabled.

Is this the correct way to compile a kernel on Jaunty?
Why do the config changes get lost?

Since its quite common nowadays to have more than 3 GBs of memory why doesn't Ubuntu (32-bit) support 4 GB of memory out-of-the-box or provide an separate kernel for this?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Steve
Solved:
2009-07-13
Last query:
2009-07-13
Last reply:
2009-07-13
NivekC1 (nivekc1) said : #1

There is no way to make this happen as there is a limit on the amount of RAM the the 32bit platform can support is 3.4GB which is expressed in ubuntu as 2.9GB. If you would like to use more memory you can try the 64bit ubuntu release.

aspa (marko-asplund) said : #2

It's possible to build a custom kernel that supports 4 GB of memory.
For more information see http://ubuntuforums.org/showthread.php?t=855511

You see they haven't packaged the kernel that supports extra memory in jaunty but it is in karmic so wait for the karmic release. I think dell or someone asked if they would allow pae so the added it to the next release.
My advice is wait for 9.10 to release.

Hope that helps
Shane

Tom (tom6) said : #4

Ubuntu does require a lot less ram than Windows because linux uses resources like that a lot more efficiently.

Yep Tom is right, so you dont need a whole lot of ram. So just wait it shouldnt be too much of a problem.

I believe the server kernel does support PAE out of the box... or it
is an option.

aspa (marko-asplund) said : #7

Ubuntu may require less ram than Windows but my development environment has a very good appetite for ram. In my current project I typically need to run the following software at the same time:

Eclipse, Firefox (with lots of windows), Evolution, Alfresco server, Liferay portal server, MySQL server, OpenOffice, build commands in the terminal, SVN client etc.

The amount of ram really makes a big difference.

I'm happy to learn that Karmic will support 4 GB of memory but it's still more than 3 months away.
In the meantime I'd like to be able to use all my memory.

Steven: I'm running Ubuntu on a laptop. Can I expect the server kernel to just work on the machine? In particular can I expect power management, audio and video as well as Lenovo special buttons to just work?

Tom (tom6) said : #8

Firefox with lots of tabs should use less ram than having lots of firefox windows open. I think OpenOffice can ahve different documents on different tabs too, if so that would cut down on ram usage a fair bit but point taken - you really need more ram. I would guess you've tried Ubuntu with these things open and know what you need better than i do :)

Karmic is available to be used now but it is only an alpha release so it will be quite buggy (probably). I thought that you could just add or remove kernel modules without waiting for them to appear in the repos but i haven't tried and all this is completely beyond me. I thought the pae kernel had been used by quite a few people but i'm struggling to remember where i've actually really heard from any of them, no links and no experience makes me doubt it. Shane is more likely to know, given the givens.

Server edition of Ubuntu doesn't have a gui desktop, although obviously you could just install one on the top :)

Good luck with all this
Regards from
Tom :)

aspa (marko-asplund) said : #9

I managed to build a custom kernel using the instructions found in the "The Old-Fashioned Debian Way" of the https://help.ubuntu.com/community/Kernel/Compile Wiki page.
Just can't seem to get it working using the "Ubuntu way".
I suspect I'm doing something wrong here but I'd just like to know exactly what.

Since I'd prefer to use a supported kernel I also tried installing the server kernel on my system and it seems that hibernate/suspend, audio and video, Lenovo buttons are working so I think I'll just try to use the server kernel if nothing comes up.

aspa (marko-asplund) said : #10

Thanks Steven Susbauer, that solved my question.