LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-14-2009, 06:01 AM   #16
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897

Apologies to the OP, but I think we have drifted some way off helping you, but there is some, err, misunderstanding or mis-expression, in this thread and I really don't like the idea of deceptive material hanging around.

Quote:
Originally Posted by Electro View Post
It seems everybody got the information about using 4 GB of RAM on a 32-bit OS and swap memory wrong.
It seems that you have taken in too much of that wrong stuff and chosen to believe it, or at least, recycle a somewhat distorted version of the truth..

Quote:
A 32-bit OS can handle 4 GB with out any problems. PAE comes in and takes the fun out of it, so close to a gigabyte of RAM is used to help address the memory.
No. A 32 bit OS can handle a a 4G address space, but practically, within the PC architecture, when you take out the various holes for various bits and pieces of IO, you end up with being able to adress rather less memory than this.

Quote:
PAE is not necessary to handle 4 GB of RAM on a 32-bit setup.
This would be true, if it weren't for the memory holes. But the memory holes are a significant part of the picture when you you get towards 4G of ram (and want to use as much of it as you can).

Quote:
Unfortunately, PAE can not be turned off.
Well, you can't turn it on and off dynamically, if that's what you mean (but its unclear why you would want to mean that, as no one has mentioned wanting to do this on a running system). But you can always choose not to use it (ie, use the non-PAE kernel) and put up with the 4G minus the memory holes.

Quote:
Swap memory can be any size. It has no limits of size and quantity. There are limits, but you will not ever get close to them.
according to the linux Partition howto http://lissot.net/partition/index.html you could have a limit of 2G per swap partition (or it could be 16T). That is arch dependant, and while we might agree that it would not be sane to get close to 16T, 2G (i386) is another matter. The document is a bit old by now ('05) and maybe things have changed in the latest kernels, but if the OP was running one of the more compact distros, intended for older hardware, this could be an issue.

Quote:
The reason why I stated that close one gigabyte is used for PAE is actually the truth
PAE is not actually using the memory lost due to the holes. john has dealt with the problem of using, but, in fact, that is a poor expression: the problem is not so much using as not using. that is, losing due to holes, rather expending extra memory in page mapping.

Quote:
Since PAE turns physical RAM into virtual memory, it is basically 1 GB of RAM that you can not use.... It makes it worst for every 4 GB of RAM that is installed. Also Linux is a virtual memory operating system, so two layers of virtual memory is used and this penalizes the computer.
  • Redhat have done testing on this and find, in their target workloads (think server, rather than desktop) that there is roughly a 1% to 5% loss of performance when PAE is used. AFAIK, their testing did not encompass the case in which the non-PAE server swapped, but the PAE one didn't, which would reverse the situation somewhat.
  • The allegation that PAE turns physical RAM into virtual memory is bizarre. the virtual memory system turns physical memory into virtual memory and PAE adds a level of paging to that. So, as you note yourself, if you have a virtual memory system like Linux, then you have virtual memory and PAE doesn't change that (actually, even that's not totally true; non-virtual memory systems are used in some embedded applications, although that's not really relevant to this thread).

Quote:
An 80386 can handle 4 GB of physical RAM because the manual says so
Johnsfine wrote:
Quote:
An x86 CPU manufacturer is free to say you can have a full 4GB of ram without PAE
But, as far as I am aware, they don't. They are usually careful to say that you have a number of address lines or a certain address space and let people jump to the conclusion that they can use all of the address space for RAM, if they want to. Of course, even on archs on which the I/O is separately mapped, you wouldn't get the full amount for RAM, because you have to use some for a boot rom, and every hardware engineer would know that.

So, if you have a reference to an Intel manual saying "80386 can handle 4 GB of physical RAM" (and not 'up to' or 'physical address space for' or some other form of weasel words), I'd be interested.
 
Old 07-14-2009, 07:09 AM   #17
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by salasi View Post
you wouldn't get the full amount for RAM, because you have to use some for a boot rom, and every hardware engineer would know that.
Long ago, I worked on the hardware , bios and OS design of a hand held computer using a 486 cpu chip. That design mapped some of the ram at the same address as the boot rom. At system startup that section of ram was write only and the rom at the same address was, of course, read only. But after the bios code was done using the rom, the rom was turned off and the ram at the same address became ordinary read/write ram.

We didn't have GB's of ram, so there was no worry about whether there were holes in the 4GB address space. It just was a standard behavior of the available memory controller chip that the hole in the first MB could be turned on and off. Since our (non PC compatible) OS didn't use the rom nor any memory mapped I/O, we chose to switch shortly after boot to the mode where all of ram was contiguous without holes.

I don't think anyone now would make an x86 design that far from PC standards, but if you did so the boot rom isn't much of an issue.
 
Old 07-14-2009, 07:30 AM   #18
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by salasi View Post
Redhat have done testing on this and find, in their target workloads (think server, rather than desktop) that there is roughly a 1% to 5% loss of performance when PAE is used.
Redhat often (maybe always, I'm not sure) ties PAE support together with the option to split the virtual address space 4GB/4GB instead of the usual 3GB/1GB. Are you sure the test you're quoting isn't a test of that feature?

Either the overhead of just PAE or the overhead of the 4GB/4GB split varies enormously based on the workload you select. But they are on a very different scale. The 4GB/4GB split usually has far more overhead than PAE alone.

I think you would need a maliciously chosen very strange workload for the overhead of PAE to get anywhere near 5% (usually it should be well under 1%) while the overhead of the 4GB/4GB split ought to be in the 1% to 5% range for some common server workloads (but may go way over 5% for other possible server workloads).

I doubt RedHat intentionally chose a workload to make the feature look bad, so I think the 1% to 5% must be the overhead of the 4GB/4GB split, not the overhead of PAE alone.

I have read that somewhere around 8GB to 16GB of ram, the usual 3GB/1GB split tends to cause the system to run out of kernel virtual address space and you need either the 2GB/2GB split, which reduces user mode virtual memory or the 4GB/4GB split which has extra overhead. I have used a 32 bit PAE server with 8GB of ram and the 3GB/1GB split without any problems with kernel virtual address space. I don't know what differences in workload mix might make the 1GB limit on kernel virtual address space more or less of an issue.

Last edited by johnsfine; 07-14-2009 at 07:38 AM.
 
Old 07-14-2009, 07:46 PM   #19
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by salasi View Post
So, if you have a reference to an Intel manual saying "80386 can handle 4 GB of physical RAM" (and not 'up to' or 'physical address space for' or some other form of weasel words), I'd be interested.
I have the hard copy titled "80386 Programmer's Reference Manual by Intel." It states 4 KB pages have to be used in order to handle 4 GB of RAM. Go read it. PAE hides the truth.
 
  


Reply

Tags
ram, swap



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
setting swap space in linux linuxguy08 Linux - Server 3 12-11-2008 03:07 PM
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 03:20 AM
How to disable swap space entry for a process (Sticky bit?) Pandamatak Linux - General 3 09-25-2006 06:17 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
using windows swap space in linux jayakrishnan Linux - General 9 02-19-2003 02:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
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.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration