cancel
Showing results for 
Search instead for 
Did you mean: 

max mem on 32 bit Linux OS

SOLVED
Go to solution
Maaz
Valued Contributor

max mem on 32 bit Linux OS

is it true that we cant use more then 4 GB of RAM, on a 32 bit Linux OS ? or in other words the max size of mem is 4 GB on a 32 bit Linux OS ?

Regards
Maaz
9 REPLIES
Srimalik
Valued Contributor

Re: max mem on 32 bit Linux OS

Theoretically for a 32 bit OS the limit is 4GB.

But I have read somewhere that in modern Intel processors there are 36 address lines. That takes the memory limit to 4*2*2*2*2 GB but I am not sure if Linux uses these. :(.
abandon all hope, ye who enter here..
Stuart Browne
Honored Contributor
Solution

Re: max mem on 32 bit Linux OS

Nope, not true.

A 32bit Linux system can access up to 64GB of memory (assuming the mainboard is capable of having that amount).

You have to make sure the kernel you are using is also compiled to take advantage of such amounts of memory.

In the RHEL4 series, you're standard kernel and kernel-smp packages can only address 4GB of memory.

If you have more than 4, then you use the smp enabled kernel-hugemem packages.

All this being said, an individual process can only access 3GB of memory (each).

Hope this helps :)
One long-haired git at your service...
Liviu I.
Frequent Advisor

Re: max mem on 32 bit Linux OS


32-bit architectures can reference 4 GB of physical memory (2^32). Processors that have an MMU (Memory Management Unit) support the concept of virtual memory: page tables are set up by the kernel which map "virtual addresses" to "physical addresses"; this basically means that each process can access 4 GB of memory, thinking it's the only process running on the machine (much like multi-tasking, in which each process is made to think that it's the only process executing on a CPU).
.....
The Linux kernel splits the 4 GB virtual address space of a process in two parts: 3 GB and 1 GB. The lower 3 GB of the process virtual address space is accessible as the user-space virtual addresses and the upper 1 GB space is reserved for the kernel virtual addresses. This is true for all processes.



http://kerneltrap.org/node/2450
Cedric Dupont
Regular Advisor

Re: max mem on 32 bit Linux OS

Hi,

32bits is 4GB limit yes. But for a long time now, there is the PAE extension in 32bits CPU, allowing the memory allocation to be done on 36bits.
So with PAE, it's 64GB. PAE is part of the 'bigmem' kernel option. So almost kernel have it and can use more than 4GB in 32bits.
Restriction is from chipset for Linux.

Windows is different, using PAE is not automatic and can occurs in software issues with drivers for exemple. It is one thing where Linux is better.
Heironimus
Honored Contributor

Re: max mem on 32 bit Linux OS

Red Hat's recent SMP kernels will go up to 16GB, you only need the hugemem kernel if you go over that (up to a max of 64GB). But hugemem also increases the per-process user space (4-4 split instead of 3-1), at the expense of extra overhead from maintaining more address mappings.
Matti_Kurkela
Honored Contributor

Re: max mem on 32 bit Linux OS

Note that even with PAE-capable hardware and hugemem kernel, you cannot have any individual process access more than 4GB at a time in a 32-bit OS.

If you have 16 GB of memory, you could, for example, have 3 processes of about 3-4 GB size and some smaller processes (including the OS standard daemons) in the last 4GB portion. But none of the processes can grow beyond 4 GB size. A true 64-bit system is more flexible.

The use of PAE also causes some complications with I/O and shared memory, so a 32-bit OS with PAE and lots of memory might perform slightly worse than a true 64-bit system, especially if your workload is I/O intensive.

MK
MK
Maaz
Valued Contributor

Re: max mem on 32 bit Linux OS

Gurus! Thanks for such a nice help/support.

Matti Kurkela, what do you mean by "A true 64-bit system" ? i mean please explain... ? I mean is "A FAKE/PSEOUDO 64-bit system" also exist ?
Stuart Browne
Honored Contributor

Re: max mem on 32 bit Linux OS

A true 64bit system = ia64 or x86_64.

ia64 = Itanium series of processors (HP Superdome, HP Integrity series)

x86_64 = AMD Opteron / AMD Athlon 64 and Intel Xeon / Intel Core 2 (EM64T) series of processors (HP Proliant series, see http://en.wikipedia.org/wiki/X86-64 for a more full list of actual processors, but basically any proliant produced in the past 2-3 years at a minimum).
One long-haired git at your service...
Matti_Kurkela
Honored Contributor

Re: max mem on 32 bit Linux OS

To me, "a true 64-bit system" means a combination of 64-bit capable hardware AND a 64-bit capable operating system.

With the x86_64 architecture (also known as AMD64 or EM64T) there's a possibility to run a 32-bit "legacy" OS on top of the 64-bit capable hardware. This brings back all the limitations of 32-bit systems, but usually allows the use of PAE.

We had to do this once when we had to get more powerful servers ASAP but the application was not yet certified for 64-bit platforms by the vendor. The next version of the application was fully certified for 64-bit, so we can now go to true 64-bit mode when the application is upgraded next time.

MK
MK