You are not logged in.

#1 2010-12-11 14:24:26

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Can 32bit actually address 4GB RAM?

I'm sorry if this has been asked a lot already, but I kind of find differing answers...

I run a 32bit system and I want to add another 2GB of RAM so that I'll have a total of 4GB. Now I'm wondering, can my 32bit kernel address all of that memory (without PAE) or will I have to make the switch to 64bit?

I'd think that because 2^32 B = 4 GB it would be possible, but maybe there is some extra overhead somewhere?

Thanks in advance.

Offline

#2 2010-12-11 14:52:43

fruight
Member
Registered: 2010-11-04
Posts: 6

Re: Can 32bit actually address 4GB RAM?

Arch32 only supports 3GiB RAM, see https://wiki.archlinux.org/index.php/Arch64_FAQ

Offline

#3 2010-12-11 15:03:29

kfgz
Member
From: Supraśl, Poland
Registered: 2009-03-02
Posts: 114

Re: Can 32bit actually address 4GB RAM?

fruight wrote:

Arch32 only supports 3GiB RAM

Not necessary. There is an "ugly" hack called PAE - https://aur.archlinux.org/packages.php?ID=24469

Ramses de Norre wrote:

I run a 32bit system and I want to add another 2GB of RAM so that I'll have a total of 4GB. can my 32bit kernel address all of that memory (without PAE)

No. You need PAE for that.

Last edited by kfgz (2010-12-11 15:06:01)

Offline

#4 2010-12-11 16:46:18

Spacenick
Member
From: Germany
Registered: 2010-04-02
Posts: 168

Re: Can 32bit actually address 4GB RAM?

You can also run a 32bit Userland on a 64bit Kernel, no problem. But if you are willing to install a fresh system 64bit is definitely the way to go, it can also use more processor features because compilers can be sure to have more features supported...

Offline

#5 2010-12-11 17:06:58

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Can 32bit actually address 4GB RAM?

Spacenick wrote:

You can also run a 32bit Userland on a 64bit Kernel, no problem. But if you are willing to install a fresh system 64bit is definitely the way to go, it can also use more processor features because compilers can be sure to have more features supported...

You mean I can in principle just grab the 64bit kernel package, install it and everything should keep on working?

Offline

#6 2010-12-11 17:28:02

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Can 32bit actually address 4GB RAM?

Ramses de Norre wrote:

You mean I can in principle just grab the 64bit kernel package, install it and everything should keep on working?

https://wiki.archlinux.org/index.php/Mi … installing

Offline

#7 2010-12-11 18:01:38

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Can 32bit actually address 4GB RAM?

Ramses de Norre wrote:
Spacenick wrote:

You can also run a 32bit Userland on a 64bit Kernel, no problem. But if you are willing to install a fresh system 64bit is definitely the way to go, it can also use more processor features because compilers can be sure to have more features supported...

You mean I can in principle just grab the 64bit kernel package, install it and everything should keep on working?

yes. just be careful if you use out-of-tree modules like nvidia for example. userland needs to be 32bit (nvidia-utils package) but the module itself will have to be 64bit (nvidia package).
also, just in case you go this way, you'll have to use the linux32 tool to build packages or the build process may detect a 64bit system whereas the toolchain is a 32bit one. anyway, that's easy to solve. try it, i'm doing this on several machines since a long time without any issue.

Offline

#8 2010-12-12 12:03:07

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Can 32bit actually address 4GB RAM?

Ok, thanks to all for the explanations. I'm going to order the memory and I'll decide how to go about it when I get it smile

One last question, I've read about 64bit using more memory due to e.g. pointers being 64 instead of 32 bits. Is this a significant increase in memory use? I mean, if I double the amount of memory in my system but go from 32 to 64 bit, will I gain a lot? I assume 64 bit does not truly use double the amount of ram, but can someone who maybe made the transition recently or remembers the numbers (roughly) give me some estimate?

Thanks a lot! smile

Offline

#9 2010-12-12 12:11:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Can 32bit actually address 4GB RAM?

It's minimal, RdN.  If you have >=4 GB use x86_64 if under, use i686.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2010-12-12 17:17:17

devius
Member
Registered: 2010-11-11
Posts: 22

Re: Can 32bit actually address 4GB RAM?

A few days ago I found this very interesting article about using up to 16gb of ram on a 32bit system by using the > 4GB area as ram disk and/or temp directory. This was on windows, but I'm pretty sure the same can be accomplished with linux. IIRC this technique doesn't involve PAE, but a BIOS option called memory remapping.

Here's the link: http://www.tomshardware.com/reviews/ram … ,2778.html

Offline

#11 2010-12-12 18:35:11

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: Can 32bit actually address 4GB RAM?

Ramses de Norre wrote:

I'm sorry if this has been asked a lot already, but I kind of find differing answers...

I run a 32bit system and I want to add another 2GB of RAM so that I'll have a total of 4GB. Now I'm wondering, can my 32bit kernel address all of that memory (without PAE) or will I have to make the switch to 64bit?

I'd think that because 2^32 B = 4 GB it would be possible, but maybe there is some extra overhead somewhere?

Thanks in advance.

The kernel reserves some, if you have a graphics card then that memory is mapped as well.

Offline

#12 2010-12-12 20:06:36

manmachine
Member
From: Athens
Registered: 2010-10-28
Posts: 62
Website

Re: Can 32bit actually address 4GB RAM?

If your hardware is 64bit-ready go ahead and upgrade your ram if you need it now.
That's what I did about a year ago, I was running 32-bit at the time, and I remember about ~3.3GB were usable under 32bit. So the 32bit limit is a bit higher than 3GB really. It also depends on how much the kernel and graphics card reserves as well as mentioned by the previous poster.

I didn't bother with PAE since I wasn't swapping at all under normal everyday usage. I just upgraded to 64bit a couple of months later when I had the time and stopped being lazy about it...

I didn't notice increased memory usage with 64bit. I don't think I compared numbers...but if there is a difference it's insignificant.

More importantly there are hardly any issues with running 64bit these days like there were years ago. So I'd say forget PAE and go 64bit. smile

Last edited by manmachine (2010-12-12 20:07:09)

Offline

#13 2010-12-12 21:14:37

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Can 32bit actually address 4GB RAM?

Be aware that some mobos have 4GB of ram and are core2 duo but do not have the mobo support for the added 64bit lines to program 64bit since the ram limit for the mobo is only 4G.  No sense in providing for 64G of addressing if only 4GB is total ram capability in the mobo.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#14 2010-12-14 17:18:08

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Can 32bit actually address 4GB RAM?

In the past (2008) i measured about 20% more:
http://forums.gentoo.org/viewtopic-t-71 … ight-.html


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#15 2010-12-14 17:52:31

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Can 32bit actually address 4GB RAM?

lilsirecho wrote:

Be aware that some mobos have 4GB of ram and are core2 duo but do not have the mobo support for the added 64bit lines to program 64bit since the ram limit for the mobo is only 4G.  No sense in providing for 64G of addressing if only 4GB is total ram capability in the mobo.

I'm not sure that I quite understand what you are saying... Do you mean that some mobos don't support 64bit although the installed cpu does? Or are you just saying that there is a memory limit on some mobos?

Offline

#16 2010-12-15 00:32:32

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Can 32bit actually address 4GB RAM?

There are required address lines for 64G...64G...^4G not 64 bit but 64G memory support.

Some mobos have a limit of 4G memory slots.

They can be used in core 2 duo in 64bit mode but can only program addresses for 32bit capability because they didn't include the address lines on the mobo since it is limited to only 4GB in total memory....so why include useless address lines?

End of explanation...........


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#17 2010-12-15 07:52:44

Kirurgs
Member
Registered: 2008-10-20
Posts: 144

Re: Can 32bit actually address 4GB RAM?

Hi!

I would like to get some reply from expert/experienced people, if that is possible...

Is there any serious issues why not use PAE with > 4G RAM? Soon I'll get 8G for my laptop, currently I'm using 64bit Arch and I'm not impressed with memory usage. So I'll be testing 8G with PAE and 64bit of course.
Previously I have tested 4G with PAE, 32bit and 64bit. What I can say personally is that 4G in 64bit is about the same as 3G in 32bit or even a bit worse, PAE did one damned problem - TOI sometimes won't hibernate properly, it gives an error about missing free pages and this is the only issue I had with PAE, everything else worked like a charm.
So if users have used/tested PAE with > 4G or have experienced issues with it please reply.

regards
Kirurgs

Offline

#18 2010-12-15 08:30:15

stfn
Member
Registered: 2010-02-28
Posts: 32

Re: Can 32bit actually address 4GB RAM?

graysky wrote:

It's minimal, RdN.  If you have >=4 GB use x86_64 if under, use i686.

I'd even go a step further: If you have a x86_64 capable CPU, use software that is compiled and optimized for x86_64. There isn't too much point in using i686 unless you really need it for a very specific reason.

Offline

#19 2010-12-15 09:22:48

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 647

Re: Can 32bit actually address 4GB RAM?

kokoko3k wrote:

In the past (2008) i measured about 20% more:
http://forums.gentoo.org/viewtopic-t-71 … ight-.html

It's a little more, around 25 / 30 %

Personally  I would install only 64 bits with 6 gigs or more of RAM.


Excuse my poor English.

Offline

#20 2010-12-15 10:45:24

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Can 32bit actually address 4GB RAM?

agreed, i'm using a pae kernel with 4gb ram,  i can't feel any slowness Vs non pae kernel

Last edited by kokoko3k (2010-12-15 10:46:56)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#21 2010-12-15 13:57:03

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Can 32bit actually address 4GB RAM?

Hmm, strange that some people are reporting almost no increase in memory usage while others talk about 20 - 30% ...

Offline

#22 2010-12-15 13:59:26

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Can 32bit actually address 4GB RAM?

Technically, the "hacks" for 32 bit start after the 1GB mark with the introduction of CONFIG_HIGHMEM and CONFIG_HIGHMEM4G.

http://kerneltrap.org/node/2450

Offline

#23 2010-12-15 17:54:46

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Can 32bit actually address 4GB RAM?

Kirurgs wrote:

Hi!

I would like to get some reply from expert/experienced people, if that is possible...

Is there any serious issues why not use PAE with > 4G RAM? Soon I'll get 8G for my laptop, currently I'm using 64bit Arch and I'm not impressed with memory usage. So I'll be testing 8G with PAE and 64bit of course.
Previously I have tested 4G with PAE, 32bit and 64bit. What I can say personally is that 4G in 64bit is about the same as 3G in 32bit or even a bit worse, PAE did one damned problem - TOI sometimes won't hibernate properly, it gives an error about missing free pages and this is the only issue I had with PAE, everything else worked like a charm.
So if users have used/tested PAE with > 4G or have experienced issues with it please reply.

regards
Kirurgs

x86_64 is faster, there are more CPU optimizations turned on in addition to the 64-bit. You could manually compile everything and get most of those optimizations on x86, but you won't get it with the stock i686 packages.

There's also the NX-bit to mark memory as non-executable, so you're more secure from various types of exploits.

PAE also has an additional performance hit.

If you have 8GB of memory, do you really want to compromise performance and security for lower memory usage? If yes, then use PAE tongue.

Last edited by thestinger (2010-12-15 17:55:18)

Offline

#24 2010-12-15 19:05:23

Kirurgs
Member
Registered: 2008-10-20
Posts: 144

Re: Can 32bit actually address 4GB RAM?

Hi!

I probably needed to explain that I'm quite experienced with linux, so most of the things I know for myself smile
i686 PAE comes with NX bit as well, performance hit compared to i686 vs i686 PAE is very small if not at all, although I couldn't find any benchmarks where relevant bits were tested, e.g. memory over 3G/4G mark...

x86_64 feels a bit faster - not much, It's kinda hard to measure, it "just feels" faster..., maybe... smile As an example for me this is due to encrypted partitions, on i686 it's about half speed when mounting partitions... When I work with files it's about same speed due to HDD not being nearly as fast as any encryption smile Additionally, if software is not compiled with x86_64 in mind there are no visible performance benefits.

Security is not an issue at all, at least I can't imagine one with PAE. if You thought about NX bit, then if memory serves me well, there is software NX check with PAE and to be honest, I'm not very concerned about NX smile

Reason why I'll be testing it is in 32bit mode is that I'll have like over couple of gigs more RAM than on pure x86_64, this is the only reason I'm considering PAE... See - memory usage in 32bit is about 30% lower then 64bit, which when one have 4G RAM is irrelevant due to fact that one can use only 3G in 32bit, 4G 64bit is about the same as 3G in 32bit plus 32bit + PAE gave me hibernate issues... For 8G RAM in theory I'll get about 2.5G more memory using PAE and to be honest, 2.5G is a lot smile

My only concern that I know of is hibernate which may fail again because more memory in box means more memory will be used to translate into RAM area over 2G/3G, and there it gets interesting again big_smile

Anyway, I'll definitely post the results back here when I'll test that...

regards
Kirurgs

Last edited by Kirurgs (2010-12-15 19:13:25)

Offline

#25 2010-12-17 11:51:54

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Can 32bit actually address 4GB RAM?

64 bit also means increased binaries size, which could lead to a less responsive desktop, at least when launching apps due to more time needed load them from disk.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

Board footer

Powered by FluxBB