I noticed some performance problems when I was running two virtual machines simultaneously (a la VMWare Server). When I began looking into this I discovered VMWare was only allowing 1.8 GB of RAM usage for my virtual machines. This struck me as odd because my desktop box was supposed to have 4 GB of RAM. Or so I thought. After some checking I discovered I had been confused with another box, and my desktop did in fact only have 2 GB of RAM. Well now, I had to fix that.
So today I ran out and picked up 4 GB of Mushkin RAM. This came on two 2 GB sticks. So I only needed to remove one set of sticks from the desktop and drop in the new memory. Yep, my BIOS now tells me I have 5 GB of RAM (the new 4 GB, plus one of the original 2 GB). But when I had finished booting, I was only getting 3.8 GB of RAM available to me. More troubleshooting.
Actually, I spent a fair bit of time reading. There is a misconception out there that a 32 bit operating system can only ever handle 4 GB of RAM, no more. This may be true for 32 bit Windows boxes, but Linux has long supported more. The problem with Linux though is that most modern distributions - including Ubuntu, which I'm running - have only enabled the kernel option to allow 4 GB. That same option can be reset to support greater than 4 GB (up to 32 GB for 32 bit systems, or more for 64 bit systems).
So, there are three viable answers to the issue of getting large RAM support.
- Compile your own kernel
- Install a existing kernel package with the appropriate settings
- Install a 64 bit version of Linux (which supports very large RAM out of the box)
I didn't feel that compiling my own kernel was a suitable option. In doing so, I would be taking on the maintenance responsibilities of fixing my kernel any time the kernel files were updated (via an apt-get upgrade). Seeing as security fixes are applied to the kernel, as well as other enhancements, I didn't want to take this task on myself. Not to mention that would get me back to having to work at "tweaking" my box just so it was usable. Other than the RAM, I have no reason to be tweaking my kernel manually.
A little more digging revealed that the Ubuntu Server kernel was pre-configured to use the maximum RAM. A much better option in my eyes. I tried to install this with a
sudo apt-get install linux-headers-server
This met with partial success. After restarting (installing a new kernel is one of the ONLY times a Linux box needs to be restarted), I did indeed have the full 5 GB available to me. But, now my nVidia video drivers no longer worked, and I had no sound. The nVidia problem is a well known issue, and normally just needs to the nVidia kernel module re-installed. That didn't work in this case. It would seem that the nvidia-kernel-common package only works with the i386 kernel - not the server kernel. Not a terrible loss - it just means that 3D acceleration is not available. Not really what I wanted though - my video games demand my attention sometimes.. :) And the loss of sound (kmixer was no longer available at all) was an issue. I *could* spend the time to get this all running, but that defeats the idea of a low maintenance desktop.
So, on to option three. I'm currently downloading the 64 bit version of Ubuntu, and will try that out after I've made suitable backups. I have run 64 bit Linux before and expect few problems - other than Adobe Flash support, but I understand there is a work-around for the lack of a 64 bit flash player.
I'll make another post when I have the 64 bit Ubuntu installed.
Till then...