# [SOLVED] Confused by memory reading

## ShiroiKuma

I'm using an Inspiron 6000 with 2GB of ram installed, the BIOS and a cat of mtrr see it, but free -m shows me less than half of this. I might be mis-interpreting this in some way.

 *Quote:*   

> 
> 
> Chrono shiroi # free -m
> 
>                    total       used       free     shared    buffers     cached
> ...

 

Is this right? From what I see I'm missing more than half my ram here. I assume reg01 is my swap (which is a 4gb partition indeed). And reg00 is my installed ram, but free -m isn't see the full 2gb.Last edited by ShiroiKuma on Tue Jan 01, 2013 2:11 am; edited 1 time in total

----------

## NeddySeagoon

ShiroiKuma,

It looks like you are running a 32 bit install with no Himem support in the kernek

----------

## eccerr0r

You'll need to have highmem and PAE enabled when you build your kernel

CONFIG_HIGHMEM=y

CONFIG_HIGHMEM4G=y

CONFIG_X86_PAE=y

For machines with more than 32 address bits and a motherboard that supports it, I usually also add in CONFIG_HIGHMEM64G=y

```
$ uname -a

Linux rukia 3.3.8-gentoo #1 SMP Wed Oct 17 12:58:15 EDT 2012 i686 Intel(R) Celeron(R) M processor 1.50GHz GenuineIntel GNU/Linux

$ free

             total       used       free     shared    buffers     cached

Mem:       2064616    1060532    1004084          0      59216     637380

-/+ buffers/cache:     363936    1700680

Swap:      1296228          0    1296228

```

The MTRRs don't have anything to do with swap.  They just tell how the cpu's internal cache should deal with memory addresses.

----------

## ShiroiKuma

 *NeddySeagoon wrote:*   

> ShiroiKuma,
> 
> It looks like you are running a 32 bit install with no Himem support in the kernek

 

I turned off Himem as I don't have more than 4gb. The options in menuconfig were for Off, 4G and 64G.

I'll try with 4G and PAE turned on next. Thanks

----------

## NeddySeagoon

ShiroiKuma,

4G is for  more than 1G and up to and including 4G.

With less than 4G RAM do not choose 64G as the system will not boot

----------

## ShiroiKuma

Thanks.

That was my bad, I didn't read the description fully. Sorry.

----------

## eccerr0r

If you have a machine whose motherboard supports more than 4GB address space and have 4GB RAM, you need to specify 64G PAE else you will not get the full 4GB visible - similar to having 1GB RAM and not having highmem enabled (which you will only see 896MB RAM instead of the full 1GB RAM).  This was the case for my 4GB Core2 machine.

Of course you can skirt the issue by running in 64-bit mode.  But if your motherboard does not have the address bits for decoding above 4GB it won't matter if you have a 64G PAE or a 64-bit kernel, you'll still be stuck with 3.25GB of RAM visible.

 *NeddySeagoon wrote:*   

> With less than 4G RAM do not choose 64G as the system will not boot

 

This is not true.  It only depends on whether the cpu/motherboard can handle PAE addresses or not.

I have an AMD Athlon XP 2200+ (34 bit phys, 32 bit virtual) with the SiS 735 chipset and only 1GB RAM, and it's running a 64G PAE kernel right now.  I may be losing performance by running it this way but it boots and runs just fine.  I'm doing it this way in anticipation of moving the disks to another machine that actually has 4GB of RAM and not having to recompile...

----------

