[SOLVED] Physical and virtual memory upper limit for 32 bit Linux
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Physical and virtual memory upper limit for 32 bit Linux
Hi !
I have a 32 bit Ubuntu installed and my Laptop has 4GB RAM, but only 3GB is considered by Linux. My question is: what is the reason for the upper limit on physical memory ?
I am familiar with the virtual memory concept where linux splits upper 1GB for kernel and lower 3GB for user processes. In total, linux 32bit can address 4GB virtual addresses. Does this meant that 1GB of physical memory is already mapped to 1GB of kernel space and Linux only shows the remaining 3GB physical memory left for the user in the above command.
I did some searching on the internet and found some articles related to this, but it only confused me further since some articles suggest 4GB is the upper limit with mentioning whether it's virtual or physical memory, some bring in the concept of PAE, etc. I'm relative new to Linux's memory management, so it'd be really helpful if someone could answer this.
Q. I've total 8 GB RAM installed in my dual boot Ubuntu Linux 8.10 (32 bit) version HP workstation. But free -m command only shows 3291 (3G) memory. How do I use 8GB RAM under Ubuntu Linux?
A. You need to install Physical Address Extension (PAE) aware kernel under 32 bit Ubuntu Linux. It is a feature of x86 and x86-64 processors that allows more than 4 Gigabytes of physical memory to be used in 32-bit systems.
It says that "free -m" shows only 3G memory, so apparently that is normal... and PAE would be for more than 4 GB.
Quote:
64 bit Linux kernel will take care of 4G or more memory. Just grab latest 64 bit version and install it.
Last edited by pr_deltoid; 06-26-2010 at 04:51 AM.
prdeltoid,
This is exactly the confusion that I was talking about in my earlier post. In the link that you sent, the original poster's system reports 3GB with 32 bit Linux, although he has 8GB RAM. The solution suggests installing 64 bit Linux or PAE for 4GB or more. If 4GB physical memory is all I have in my system, and I don't want anything more than this, why can't Linux report all 4GB or at least some value slightly less than 4GB. Why does it have to be 3.2 GB, which is about 800 MB short of 4GB
Right, "4GB or more". It's not saying to use 64-bit Linux for more than 4GB, it's saying to use 64-bit for 4GB or more. It's saying to use PAE for 4GB or more. All the things I just saw googling were people saying that they have 4GB RAM and about 3.2GB is used. But if you use 64-bit Linux you'll be using all 4GB. Or PAE.
EDIT: I have no idea why it's like that. I read that Windows uses 4GB and to use more you have to use the newer 64-bit versions... then I looked more closely and Windows has the same issue. There's a lot of explanation here: http://www.codinghorror.com/blog/200...es-of-ram.html
Quote:
To be perfectly clear, this isn't a Windows problem-- it's an x86 hardware problem. The memory hole is quite literally invisible to the CPU, no matter what 32-bit operating system you choose.
Last edited by pr_deltoid; 06-26-2010 at 05:41 AM.
This is exactly the confusion that I was talking about in my earlier post.
What is confusing? Everything you mentioned seems to say the same thing. For 4GB or more you need either PAE or 64 bit. You just seem to have trouble believing it.
Quote:
If 4GB physical memory is all I have in my system, and I don't want anything more than this, why can't Linux report all 4GB or at least some value slightly less than 4GB. Why does it have to be 3.2 GB, which is about 800 MB short of 4GB
The amount less than 4GB is controlled by the motherboard and the BIOS. Linux has no way to influence that. Some systems let you use 3.5GB some restrict you to even less than 3GB.
If typical motherboards permitted you to use almost the whole 4GB, the advice to use PAE for 4GB or more wouldn't be as appropriate. Lots of people have exactly 4GB of ram and if they could use almost all of it without PAE, we would be advising them to do so. We advise people with exactly 4GB to use PAE or 64 bit because motherboard designs reserve a significant chunk of the first 4GB of physical address space.
Notice the motherboard and BIOS and often some BIOS menu options control whether even 64bit or PAE can use more ram. On some motherboards 64bit and PAE are both restricted to the same limit (significantly less than 4GB) that non PAE 32 bit can use. On many motherboards, there is a BIOS option that must be set to allow 64bit or PAE to use more.
Many of my previous posts on this topic tell you how to check, even while you are still running a 32 bit non PAE kernel, whether your BIOS is set to allow PAE and 64bit to use more ram.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.