LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   32 bit OS and 4GB memory limit (https://www.linuxquestions.org/questions/linux-general-1/32-bit-os-and-4gb-memory-limit-707762/)

the_gripmaster 02-26-2009 12:14 PM

32 bit OS and 4GB memory limit
 
The max amount of addressable memory for a 32 bit OS is 4GB. Does this 4GB also includes the swap space I might have allocated?

Lets say, I am running a 32bit version of Linux on a machine with 4GB of RAM. And I allocated another 4GB in swap. Can the OS use all that is available from the RAM and AS WELL AS the swap?

Quakeboy02 02-26-2009 12:31 PM

If you have a PAE enabled kernel it (the kernel) can access (I believe) 36 bits of address space (64GB). However, since it's a 32 bit system, any one process can only access 32 bit space (4GB).

johnsfine 02-26-2009 12:46 PM

If you do not have a PAE kernel:

1) The maximum physical ram for the kernel plus all processes is BIOS dependent, typically limited to about 3.25GB.

2) Swap space can be used to bring the effective usable memory well above 4GB. I don't know the limit.

3) Each process is limited to 3GB virtual, and the kernel is limited to 1GB virtual, so total memory use over 4GB is only meaningful for multiple processes.

If you have a PAE kernel, item (1) changes. The maximum amount of physical ram used can be over 4GB (I think up to 16GB). Items 2 and 3 don't change at all with a PAE kernel.

"PAE" is the name of a hardware feature of the CPU. A "PAE kernel" is a kernel with support for that CPU feature. But I believe the naming is inconsistent for that kernel support. I think some distributions, including Red Hat, call that "PAE" but I think others have other names for it. You might need to look carefully at kernel features to know if you are getting the right one.

Quakeboy02 02-26-2009 01:57 PM

Here's the wiki. It's a bit different than either John or I said, but we were mostly right.

http://en.wikipedia.org/wiki/Physica...xtension#Linux

johnsfine 02-26-2009 03:06 PM

Quote:

Originally Posted by Quakeboy02 (Post 3458483)
It's a bit different than either John or I said

I don't think anything in that article contradicts anything I said. It just ignores some of the issues I partially covered.

The 32bit memory mapping system supports either 4GB of address space without PAE or 64GB with PAE. But that does not necessarily tell you how much Linux supports with/without PAE.

Linux also introduces constraints on total physical memory based on interactions with the way it manages kernel virtual memory. That leads to at least four different levels of memory support based on choices made during kernel build.

The lowest level is 896MB without PAE
The next level is about 3.25GB (bios limited) without PAE
The next level is, I think, about 16GB, with PAE
The highest level, I think, is the full 64GB with PAE plus an ugly kludge in kernel virtual memory (I think a bad idea. Use 64bit instead for that much ram).

Quakeboy02 02-26-2009 03:26 PM

John,
PAE is optionally available with NOHIGHMEM or explicitly set with HIGHMEM64G. It in't available with HIGHMEM4G. I have no idea what the reasoning is with any of it; especially why PAE is available with NOHIGHMEM. I believe this is the full set of HIGHMEM and PAE config options.

Code:

CONFIG_NOHIGHMEM
CONFIG_HIGHMEM4G
CONFIG_HIGHMEM64G

CONFIG_HIGHMEM
CONFIG_X86_PAE

As to the 16GB, are you thinking about the current limitation of 16GB physical RAM on most PC chipsets?

TigerLinux 07-29-2011 10:58 AM

does ubuntu 11.04 32 bit support more than 4GB RAM?

jefro 07-29-2011 04:14 PM

The question also asked the part about a swap file. I think the swap file is handled differently. One could address say 3.2G and then have a 4 gig or more swap file. That swap file would not count toward the ram limit. Even though it is being used as ram.

Pretty sure on that but could be wrong. Simple to test.

TigerLinux 07-29-2011 09:33 PM

i have 6 GB Ram, if i install 32bit ubuntu, is it a waste?

johnsfine 07-30-2011 08:27 AM

Quote:

Originally Posted by TigerLinux (Post 4428988)
i have 6 GB Ram, if i install 32bit ubuntu, is it a waste?

I'm pretty sure a PAE kernel is either default or available through the package manager in Ubuntu 11.04, so 6GB should work just fine (any one process is still limited to 3GB virtual, but multiple processes plus the kernel can make good use of 6GB physical).

But I don't have a Ubuntu system handy to check and I couldn't remember the right keywords to search for the answer at packages.ubuntu.org, so I'm not 100% sure there is a PAE kernel in 11.04

makyo 07-30-2011 08:55 AM

Hi.

General information at:
https://help.ubuntu.com/community/32bit_and_64bit

but note if speed is important, performance benchmark comparisons at:
http://www.phoronix.com/scan.php?pag...ty_pae64&num=1
providing, for example:
Quote:

The Core i7 notebook had been boosted by the PAE kernel with its 8GB of system memory while the x86_64 environment was certainly the best.
Found with Google search of ubuntu 11.04 memory limit

Best wishes ... cheers, makyo

TigerLinux 07-30-2011 10:54 AM

Quote:

Both the CD and DVD installer of Ubuntu 10.04 automatically installs the PAE enabled kernel if it detects more than 3 Gb of available memory.
So in this case, 32bit Ubuntu automatically support >4GB memory?

jefro 07-30-2011 12:56 PM

If it does it automatically then yes it would.

TigerLinux 07-30-2011 08:14 PM

Quote:

Originally Posted by jefro (Post 4429422)
If it does it automatically then yes it would.

so i do not need to bother about memory limitation.
32 bit ubuntu will handle it.
right?

paulsm4 07-31-2011 03:04 AM

Hi -

Quote:

Q: have 6 GB Ram, if i install 32bit ubuntu, is it a waste?
Short answer: yes.

The maximum addressable space for any 32-bit OS is 4GB.

PAE isn't really a satisfactory solution, if you can avoid it.

Running a 64-bit OS is the idea solution if your application needs more than 2++GB RAM.

64-bit CPUs are commodities, and most motherboards that support more than 4GB RAM also support 64-bit CPUs.

If you want to best utilize 6GB RAM, I'd strongly encourage you to install a 64-bit OS, if at all possible.

IMHO ..PSM


All times are GMT -5. The time now is 05:55 PM.