How much memory is supported in Red Hat Enterprise Linux 5 and 6 on 32 bit(x86) platform ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 4 (x86)
  • Red Hat Enterprise Linux 5 (x86)
  • Red Hat Enterprise Linux 6 (x86)
  • Memory

Issue

  • How much memory is supported in Red Hat Enterprise Linux 5 and 6 on 32 bit(x86) platform ?
  • Why Red Hat Enterprise Linux 4 support 64 GB of memory on 32 bit platform but Red Hat Enterprise Linux 5 and 6 not ?
  • Total memory installed on the Red Hat Enterprise Linux 6 server is 32GB but output of free and /proc/meminfo is showing only 15GB of memory.
    Eg:
# cat dmidecode | grep -A 10 "Memory Device" | egrep '(Size:|Set)'
Size: 8192 MB
Size: 8192 MB
Size: 8192 MB
Size: 8192 MB

8192 x 4 == 32768/1024 = 32 GB
# grep -i "MemTotal" /proc/meminfo 
MemTotal:       15428468 kB
$ free -m
             total       used       free     shared    buffers     cached
Mem:         15066      12040       3026          0        210      10029
-/+ buffers/cache:       1800      13266
Swap:        20479          0      20479

Resolution

  • Red Hat Enterprise Linux 5 and 6 support 16 GB of main memory on 32 bit(x86) platform.
  • Red Hat Enterprise Linux 4 running 'Hugemem kernel' support 64GB of memory on 32 bit(x86) platform.

Note: 'Hugemem kernel' is not available for Red Hat Enterprise Linux 5 and 6 32 bit(x86) platform.
Reference: Red Hat Enterprise Linux technology capabilities and limits.

Root Cause

  • If you are using PAE in RHEL5, the total memory can be recognized is up to 64GB, but we only support 16GB since it is not stable using over 16GB memory under PAE.
    low memory starvation issue

  • If you are using PAE in RHEL6 (by default the PAE is enabled in 32bit kernel), the total memory can be recognized is 16GB. And this is hard coded.

arch/x86/kernel/e820.c
unsigned long max_arch_pfn = MAX_ARCH_PFN;    
#ifdef CONFIG_X86_32                  
# ifdef CONFIG_X86_PAE                
#  define MAX_ARCH_PFN      (1ULL<<(34-PAGE_SHIFT))
#define PAGE_SHIFT  12    
  • The max_arch_pfn indicate the max pages the kernel can recognize.
MAX_ARCH_PFN = 1 << 22 = 4M 
  • So the total memory limitation would be 4M * 4K (4K per page by default) = 16GB

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.