Thursday, 24 March 2011

Memory Upgrades: When the Manual Says No

Look in the manufacturer's manual for your machine or its' motherboard and it will probably give a maximum memory capacity and configuration. You may think that's that: fini.

Not necessarily.

Take the Dell Inspiron 6400/1505 as an example. Dell states that maximum memory is 2Gb. A quick search around the Internet (remember, in most things-upgradeable, Google is your friend) revealed many instances of upgrades beyond this limit. I could go to 4Gb safely, maybe even 8Gb. A quick check on the type of memory I need for this machine model, I find it uses PC2/5300 Non-ECC Unbuffered 200PIN DDR2 SODIMM at 667MHz. That's a lot of good, specific information to go shopping. But wait...!

First I went through my upgrader's check-list for memory upgrades, seeking my limitations:

The number of RAM slots?
The 6400 has two and they are supposed to be matched pairs. 
  • Mix-and-match of RAM module capacity is possible in some machines, depending on the RAM options for the main-board. My Pentium-4 is happy for a 1Gb and a 512Mb to co-exist in adjacent slots.
  • Mix-and-match of RAM frequency (speed) is rarely advisable, so I wouldn't try putting 533MHz memory next to 667MHz, as the latency between slow and fast memory will cause problems
Full RAM slots may give you another frustration; having to replace your perfectly good existing RAM with the new modules. Ah well, there's always the on-line auctioneers to dispose of the old ones.

The size of RAM available?
At the time of the 6400's manufacture the 2Gb limit was true, having only 1Gb SODIMMS at that time. Now there is larger capacity RAM, at 2- 4-, even 8Gb, we can press on.

The price of RAM is affordable?
Large memory capacities sell at larger prices. How much is your upgrade worth, should you even consider starting over with a new machine? In my case, 4Gb doesn't break the bank like 8Gb does.

What are BIOS settings available to the chip-set of my machine?
This may be a more intractable problem. You'll need to do more research on this one. If the BIOS on the main-board won't recognise memory beyond the given limit, you're stuck. You may be able to 'flash' the BIOS with a newer version of firmware, but that's a whole other tutorial with a whole new level of risk. The Dell BIOS looked OK.

Physical access to RAM slots inside the machine?
If you can't get at all the slots you need, you can either stop right there, or be prepared for serious dismantling. I once took apart my entire JVC-Mini in order to upgrade the hard drive and base memory. Just the once. Never again. Fortunately there's a big inspection panel in the base of the 6400 that lets you at both RAM slots. Easy.

Physical Memory Addressing of my operating system?
Most 32-bit operating systems run into a wall when addressing memory past 2Gb. At this point, your two choices are: 
  • go for a full 64-bit OS, re-installing everything and making sure you have 64-bit versions of all your applications, or some way to run in 32-bit compatibility mode
  • upgrade your 32-bit OS with PAE: Physical Address Extension. It is a feature of recent x86 and x86-64 processors that I can offer here, as most current Linux derivatives including the 'Buntu's have PAE kernels available for server use which enables up to 64Gb of memory.
Does my processor support the upgrade?
Of course, there's no point going this way if the processor won't address the memory either. Any 64-bit processor should do this, but since I'm going the PAE route, I ran a quick check on processor compatibility. In a terminal session:

robin@d6400:~$ cat /proc/cpuinfo | grep -i PAE

gives back:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dts tpr_shadow

with PAE flagged in it's capabilities.

Time to go mail-ordering. Some older types of RAM are now ridiculously cheap, so that once-prohibitive upgrade might be just the thing to give an old box the equivalent of steroids.

Hardware
I'll say this once at the start, if you're going for do-it-yourself engineering, don't leave the electricity switched on in case you touch something live; if it doesn't kill you, it probably will the machine. Secondly, get an anti-static wrist-strap and earth yourself before you touch any components inside the case. This is especially important to avoid damaging memory modules.

Turning over the 6400 gently, releasing the two screws and the inspection cover revealed the RAM slots. Releasing the spring clips either side of each memory module allows them to slide out. The new ones slide in and have to be locked down with the side-clips over the module edges.

Powering on the machine gave me a temporary frown as the Dell stopped for a very long time (only about three minutes but long enough) while it considered an error message about the system memory having changed. It then gave me an option to go into the BIOS set-up (F2 key)or run diagnostics (F5 key). Happily the BIOS reported the right memory, but warns me that some memory is allocated to system functions to not all is available for my use. I exited there and the machine continued to boot.

Kernel Extension
With a burst of optimism, I install the PAE kernel. For reference, a 'before upgrade' memory check

robin@d6400:~$ free -m

gives:

total used free shared buffers cached
Mem: 2011 601 1409 0 61 268
-/+ buffers/cache: 271 1739
Swap: 2863 0 2863

Under Ubuntu 10.10, the PAE-enabled kernel can be installed using the Synaptic Package Manager (accessible through System menu > Administration > Synaptic Package Manager). Search on “pae” and select the packages 'linux-generic-pae' and 'linux-headers-generic-pae'. Synaptic prompts for three dependent packages to install with them which are specific to the current kernel version it needs these, so I let it.

After the new kernel is installed it needs a reboot. The PAE kernel booted as the default option in the GRUB boot menu. Keep an eye on your boot options if you've customised your GRUB set-up. You can check your kernel version and total memory in the first tab of System Monitor if you like.

The 'after upgrade' memory check gives:

total used free shared buffers cached
Mem: 3274 504 2770 0 58 200
-/+ buffers/cache: 245 3029
Swap: 2863 0 2863

I've got roughly an extra 1.5Gb working memory to play with, which will make a difference next time I edit the podcast in Audacity or the vidcast in Openshot. RC

No comments:

Post a Comment

At least try to be nice, it won't kill you...