# More than 2GB of RAM Issue

## Ssgelm

I'm having a strange problem with my Dell Optiplex 745 running on a 64-bit kernel.  The machine has had 2GB of RAM, but today I installed 2 new 2GB sticks.  When the machine has more than 2gb of ram, it gets very slow and is essentially unusable.  If I append "mem=2048M" to the kernel command line, the machine is fine, but not any number larger.  Looking online, it seems to be a MTRR issue.  No matter what the mem line is set to, the contents of /proc/mtrr is:

```
reg00: base=0x000000000 (    0MB), size= 2048MB, count=1: write-back

reg01: base=0x080000000 ( 2048MB), size=  256MB, count=1: write-combining
```

My kernel config is at http://pastebin.com/d52b01534.  Anyone have any ideas?

----------

## Lubomir

Update Bios, reset after that bios settings, look if it works then, when not, look if you can find some settings for memory above 2gb.

----------

## Ssgelm

The machine has the latest bios and there are no memory related settings.  Also, I just tried booting the machine with an ubuntu 64-bit live cd I had lying around and it worked fine with all 4 gb of ram.

----------

## hielvc

I think you need to check your kernel and see if "CONFIG_HIGHMEM4G=y". Its under Processor type and features>>High Memory Suport. 

You might have run up against the hardware. Older chipsets have memory limits. Chickout the specs for your lappy. If it is chipset linked then short soldiering a latter greater chips   :Razz:  youre stuck.

----------

## Hu

 *hielvc wrote:*   

> I think you need to check your kernel and see if "CONFIG_HIGHMEM4G=y". Its under Processor type and features>>High Memory Suport. 
> 
> You might have run up against the hardware. Older chipsets have memory limits. Chickout the specs for your lappy. If it is chipset linked then short soldiering a latter greater chips   youre stuck.

 

Failure to use HIGHMEM4G should have resulted in less memory addressable, but not degraded performance of accessible memory.  The Optiplex 745 is a tower, not a laptop.

If you can get the .config used for the Ubuntu LiveCD kernel, post the output of grep MTRR .config.  I suspect it has the MTRR sanitizer turned on, and the BIOS on that tower is configuring the MTRRs incorrectly.

----------

## Ssgelm

 *Hu wrote:*   

>  *hielvc wrote:*   I think you need to check your kernel and see if "CONFIG_HIGHMEM4G=y". Its under Processor type and features>>High Memory Suport. 
> 
> You might have run up against the hardware. Older chipsets have memory limits. Chickout the specs for your lappy. If it is chipset linked then short soldiering a latter greater chips   youre stuck. 
> 
> Failure to use HIGHMEM4G should have resulted in less memory addressable, but not degraded performance of accessible memory.  The Optiplex 745 is a tower, not a laptop.
> ...

 

I believe HIGHMEM4G is only available on a 32-bit kernel.  I don't have a copy of the ubuntu config handy, but I looked at it before and yes, you're correct: it does have the MTRR sanitizer turned on.  Should I turn it on in my kernel too?

----------

## Ssgelm

Additionally, when I boot the kernel prints the following messages:

```
mtrr: type mismatch for f0000000,8000000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,4000000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,2000000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,1000000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,800000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,400000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,200000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,100000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,80000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,40000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,20000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,10000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,8000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,4000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,2000 old: write-back new: write-combining

mtrr: type mismatch for f0000000,1000 old: write-back new: write-combining
```

I'm not sure if that has anything to do with my problem, but it seems to be mtrr related so I thought it might help.

----------

## Hypnos

There may be MTRR-related settings in your BIOS ("MTRR continuous allocation" versus "MTRR discrete allocation").  I don't know what these mean, but the former apparently causes problems with Linux and 4GB of RAM.

----------

## Ssgelm

 *Hypnos wrote:*   

> There may be MTRR-related settings in your BIOS ("MTRR continuous allocation" versus "MTRR discrete allocation").  I don't know what these mean, but the former apparently causes problems with Linux and 4GB of RAM.

 

Unfortunately there are no mtrr related settings in the bios.

----------

## Hypnos

Well, if the LiveCD works, it's probably a kernel issue anyway.  As Hu suggests, you'll have to compare your .config with that of the kernel on the LiveCD.

Use "zgrep MTRR /proc/config.gz"

----------

## Ssgelm

Yeah, I've compared the kernels and I can't seem to find any major differences.  The only one is the MTRR sanitizing option.  When I turn that on the computer is considerably faster with the 4 gigs and the MTRR seems more accurate, but the machine is still very slow.

----------

## Hypnos

Does it operate at normal speed with the Ubuntu LiveCD?  If so, it has to be some difference in the kernel ...

Also, maybe check how it performs without X running.

----------

## Ssgelm

It seems to operate at normal speed from the livecd, although it's hard to tell because it's running off of a cd.  It is also slow without X running.  The kernel config on the ubuntu cd is at http://pastebin.com/f5a2ac916.

----------

## Hypnos

*shrug*

If the situation is desperate, back up your Gentoo installation then install a default Ubuntu installation on your hard disk and see how it performs.

----------

