Saturday, January 17, 2009

debian linux: bigmem gives you highmem and you need it or you'll be missing memory

if you're running a debian system, make sure you have a bigmem kernel installed, like this one, or memory above (somewhat less than) 1GB will be ignored.

before
sudo grep -i memory /var/log/dmesg
[ 0.004000] Memory: 899224k/917504k available (1693k kernel code, 17724k reserved, 746k data, 320k init, 0k highmem)


after
sudo grep -i memory /var/log/dmesg
[ 0.004000] Memory: 2059204k/2087744k available (1834k kernel code, 27260k reserved, 788k data, 256k init, 1170240k highmem)


Now I can stop blaming firefox.

Update:
I've become convinced that this is a bug in Debian's 2.6.26 image. The previous version (2.6.24) had "highmem" (memory above 1GB) turned on even if "bigmem" (memory above 4GB) was turned off.
(I think. Someone should confirm this.)

3 comments:

jes5199 said...

I've become convinced that this is a bug in Debian's 2.6.26 image. The previous version (2.6.24) had "highmem" (memory above 1GB) turned on even if "bigmem" (memory above 4GB) was turned off.

Unknown said...

$ grep -i memory /var/log/dmesg
[ 0.004000] Memory: 2064732k/2095948k available (1769k kernel code, 29904k reserved, 752k data, 244k init, 1178444k highmem)

$ uname -r
2.6.26-2-686

There's nothing wrong with the 2.6.26 kernels in lenny, but to have any highmem enabled, you need to install the -686 kernel not the -486 kernel. (The -bigmem kernel is not needed and will probably incur extra overhead for your machine with less than 4GB RAM).

$ aptitude install linux-image-686

should be sufficient.

Yuhong Bao said...

Except that the bigmem kernel not only support more than 4GB, also supports NX on capable CPUs too. Yes, NX requires PAE.