LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Thread Tools Search this Thread
Old 02-26-2009, 01:14 PM   #1
the_gripmaster
Member
 
Registered: Jul 2004
Location: Melbourne, Australia
Distribution: openSUSE 11, RHEL 5.x, CentOS 5.x, OpenSolaris
Posts: 182
Thanked: 0
Question 32 bit OS and 4GB memory limit


[Log in to get rid of this advertisement]
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?
the_gripmaster is offline     Reply With Quote
Old 02-26-2009, 01:31 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Lenny 2.6.32 SMP
Posts: 2,881
Thanked: 83
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).
Quakeboy02 is offline     Reply With Quote
Old 02-26-2009, 01:46 PM   #3
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Mepis, Centos
Posts: 1,916
Thanked: 211
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.

Last edited by johnsfine; 02-26-2009 at 01:52 PM..
johnsfine is offline     Reply With Quote
Old 02-26-2009, 02:57 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Lenny 2.6.32 SMP
Posts: 2,881
Thanked: 83
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
Quakeboy02 is offline     Reply With Quote
Old 02-26-2009, 04:06 PM   #5
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Mepis, Centos
Posts: 1,916
Thanked: 211
Quote:
Originally Posted by Quakeboy02 View Post
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).

Last edited by johnsfine; 02-26-2009 at 04:08 PM..
johnsfine is offline     Reply With Quote
Old 02-26-2009, 04:26 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Lenny 2.6.32 SMP
Posts: 2,881
Thanked: 83
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?
Quakeboy02 is offline     Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to pack a folder >8-12 GB ? (you certainly know > limit of 4GB) frenchn00b Linux - General 3 12-29-2008 07:20 PM
64-bit Linux virtual memory limit? wmnwmn Linux - General 1 02-01-2008 11:43 AM
4GB on 32-bit Debian? sycamorex Debian 6 07-03-2007 12:52 PM
split utility in pipes: backup to FAT32 (4GB limit) Samsara Linux - Software 3 01-27-2007 12:25 AM
4GB RAM: 64-bit Opteron Problems deviance99 Linux - Hardware 6 06-22-2004 09:24 PM


All times are GMT -5. The time now is 02:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration