Author Topic: Who has the most RAM ?  (Read 11913 times)

0 Members and 1 Guest are viewing this topic.

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Who has the most RAM ?
« Reply #15 on: September 27, 2005, 09:07:21 pm »
Servers are computers too. You're just angry because I win.
Quote
[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Offline mynameistmp

  • Moderator
  • Full Member
  • *****
  • Posts: 111
  • Hi! I'm new here!
    • View Profile
Re: Who has the most RAM ?
« Reply #16 on: September 28, 2005, 03:14:02 am »
Alright! Enough fun. Now, I don't want to be a dick but I don't actually care how much RAM any of you have. The truth is that this is another lesson-post in trap form!

EDIT -
tmp, may I ask why we need more than 900MB of RAM?

Good question, Joe! I had a sneaking suspicion that many of you guys probably have some fancy machines (with plenty o' RAM), but you probably didn't know that Linux, out of the box anyways, doesn't support more than 960MB of RAM ;P Don't believe me ? Check out Newby's situation ;P

newby@impaler:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           883        850         32          0        265        103
-/+ buffers/cache:        481        401
Swap:          933         65        868


It's 1024MB RAM, but...

BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003ff30000 (usable)
 BIOS-e820: 000000003ff30000 - 000000003ff40000 (ACPI data)
 BIOS-e820: 000000003ff40000 - 000000003fff0000 (ACPI NVS)
 BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved)
 BIOS-e820: 00000000ffb80000 - 0000000100000000 (reserved)
Warning only 896MB will be used.

:(

If you ran free on a shell server (cheated) then you probably got the expected amount because the admin hopefully knows what he's doing.

Anyhow, on with the issue at hand.

Good news: I'm about to tell you how to fix the problem

Bad news: You'll have to recompile your kernel.

The linux kernel actually supports up to 64GB of RAM. However, in order to use anything past 960MB you need to configure  the CONFIG_NOHIGHMEM define appropriately then rebuild your kernel. You want something like so:

up to 960MB: off
up to 4GB: 4GB
up to 64GB: 64GB

If you select 64GB your processor must be capable of PAE mode. That includes all processors since the Pentium Pro, so you're probably OK. The kernel will refuse to boot if you don't have it which is why this configuration isn't enabled by default.

Also, if you've got an older BIOS it might have trouble reporting the amount of RAM to the bootloader accurately. If you've taken the above step and it still doesn't work properly add this to your /etc/lilo.conf:

Code: [Select]
append="mem=2048M"

Where I have 2 Gigs of RAM. All should be well.

Offline Ryan Marcus

  • Cross Platform.
  • Full Member
  • ***
  • Posts: 170
  • I'm Bono.
    • View Profile
    • My Blog
Re: Who has the most RAM ?
« Reply #17 on: September 28, 2005, 08:29:56 am »
1 GB SDRAM
Thanks, Ryan Marcus

Quote
<OG-Trust> I BET YOU GOT A CAR!
<OG-Trust> A JAPANESE CAR!
Quote
deadly: Big blue fatass to the rescue!
496620796F75722072656164696E6720746869732C20796F75722061206E6572642E00

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Who has the most RAM ?
« Reply #18 on: September 28, 2005, 01:09:03 pm »
Another fun tip from tmp.  Thanks.  :)

Offline Windowlicker

  • Newbie
  • *
  • Posts: 11
  • I'm new here!
    • View Profile
Re: Who has the most RAM ?
« Reply #19 on: September 28, 2005, 01:40:59 pm »
Alright! Enough fun. Now, I don't want to be a dick but I don't actually care how much RAM any of you have. The truth is that this is another lesson-post in trap form!

EDIT -
tmp, may I ask why we need more than 900MB of RAM?

Good question, Joe! I had a sneaking suspicion that many of you guys probably have some fancy machines (with plenty o' RAM), but you probably didn't know that Linux, out of the box anyways, doesn't support more than 960MB of RAM ;P Don't believe me ? Check out Newby's situation ;P

newby@impaler:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           883        850         32          0        265        103
-/+ buffers/cache:        481        401
Swap:          933         65        868


It's 1024MB RAM, but...

BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003ff30000 (usable)
 BIOS-e820: 000000003ff30000 - 000000003ff40000 (ACPI data)
 BIOS-e820: 000000003ff40000 - 000000003fff0000 (ACPI NVS)
 BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved)
 BIOS-e820: 00000000ffb80000 - 0000000100000000 (reserved)
Warning only 896MB will be used.

:(

If you ran free on a shell server (cheated) then you probably got the expected amount because the admin hopefully knows what he's doing.

Anyhow, on with the issue at hand.

Good news: I'm about to tell you how to fix the problem

Bad news: You'll have to recompile your kernel.

The linux kernel actually supports up to 64GB of RAM. However, in order to use anything past 960MB you need to configure  the CONFIG_NOHIGHMEM define appropriately then rebuild your kernel. You want something like so:

up to 960MB: off
up to 4GB: 4GB
up to 64GB: 64GB

If you select 64GB your processor must be capable of PAE mode. That includes all processors since the Pentium Pro, so you're probably OK. The kernel will refuse to boot if you don't have it which is why this configuration isn't enabled by default.

Also, if you've got an older BIOS it might have trouble reporting the amount of RAM to the bootloader accurately. If you've taken the above step and it still doesn't work properly add this to your /etc/lilo.conf:

Code: [Select]
append="mem=2048M"

Where I have 2 Gigs of RAM. All should be well.



I think your post is a little misleading, I'll try to see if I can clear the concept up, from what I remember reading in "Understanding the Linux Kernel"

First of all, the processor can directly access 4GB of virtual memory, because it has a 32 bit address space. (Assuming we are using a 32 bit processor) This window is split into two types: user address space, and the kernel address space.

These two are separated by the PAGE_OFFSET values, which I know to be 0xC0000000 under linux. This means that under the default, 3gb is allocated to the user address space, and 1gb is allocated to the kernel.

The kernel has a special area of memory reserved for vmalloc, and it dedicates 128mb to it. That means the kernel can only use 896 mb of mapped memory directly, since 1024-128 = 896.

So, if you have more than 1gb of RAM, it does not mean that your memory is not being used.

Anyhow, to get around this problem you could use a different PAGE_OFFSET or you could set HIGHMEM. HIGHMEM is known to consume extra cpu cycles, and use a little bit of memory itself. So from my experience, the best option if you have under 2gb of memory, is to edit the PAGE_OFFSET value. A 2gb:2gb split between user space and kernel space seems reasonable. Although this has obvious drawbacks since you're decreasing user space.

There are a lot more complexities to this whole issue, such as affecting the sbrk() heap and mmap() zones, and you should read about it more before deciding to either patch your kernel's PAGE_OFFSET value, or adding HIGHMEM support.
« Last Edit: September 28, 2005, 01:42:45 pm by Windowlicker »

Offline mynameistmp

  • Moderator
  • Full Member
  • *****
  • Posts: 111
  • Hi! I'm new here!
    • View Profile
Re: Who has the most RAM ?
« Reply #20 on: September 28, 2005, 03:24:14 pm »
What part of my post was misleading ?

Offline Windowlicker

  • Newbie
  • *
  • Posts: 11
  • I'm new here!
    • View Profile
Re: Who has the most RAM ?
« Reply #21 on: September 28, 2005, 04:22:33 pm »
"doesn't support more than 960MB of RAM"

It's not 960mb, and the ram is used, just not in the kernel address space.

Offline mynameistmp

  • Moderator
  • Full Member
  • *****
  • Posts: 111
  • Hi! I'm new here!
    • View Profile
Re: Who has the most RAM ?
« Reply #22 on: September 30, 2005, 01:20:17 am »
Quote
  x Linux can use up to 64 Gigabytes of physical memory on x86 systems.     x 
  x However, the address space of 32-bit x86 processors is only 4           x 
  x Gigabytes large. That means that, if you have a large amount of         x 
  x physical memory, not all of it can be "permanently mapped" by the       x 
  x kernel. The physical memory that's not permanently mapped is called     x 
  x "high memory".

  x If you are compiling a kernel which will never run on a machine with    x 
  x more than 960 megabytes of total physical RAM, answer "off" here (defau x 
  x choice and suitable for most users). This will result in a "3GB/1GB"    x 
  x split: 3GB are mapped so that each process sees a 3GB virtual memory    x 
  x space and the remaining part of the 4GB virtual memory space is used    x 
  x by the kernel to permanently map as much physical memory as             x 
  x possible.                                                               x 
  x                                                                         x 
  x If the machine has between 1 and 4 Gigabytes physical RAM, then         x 
  x answer "4GB" here.           


-- Linux 2.4.29 Configuration help menu

My understanding was that if the kernel cannot map the memory, then it is not going to be used. Perhaps I am wrong, although if I am, I don't know why the help menu would say this:

Quote
x If the machine has between 1 and 4 Gigabytes physical RAM, then         x 
  x answer "4GB" here.