Live data from Hacker News

Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

superuser.com

11–20 of 64 posts

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#11
post #9

Am I missing something, or does the top answer not address the question? Memory tricks aside, it seems the questioner is asking whether the physical RAM itself will ever be used. Short of PAE, unless my understanding is wrong, I was under the impression that the answer to this is no.

> Short of PAE, unless my understanding is wrong, I was under the impression that the answer to this is no.

PAE is used everywhere and has been around since 1995 Pentium Pros. So the answer is yes, a 32 bit OS/CPU can use 8 gigabytes (and more) of physical memory and an infinite amount of swap space. It all depends on the CPUs physical address size, not virtual.

My "64 bit" CPU has 36 bit physical addresses and 48 bit virtual addresses.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#12
This reminds me of some of the fun and games we used to have with 8-bit computers.

8-bit computers running chips such as the Z80 and 6502 were limited to 16-bit addressing and a total of 64k of addressable RAM. For most computers earlier on this wasn't a problem, but in the later 80s when machines with 128k started to become more common this meant that there were lots of strange quirks to be considered.

For example, the Sinclair ZX Spectrum (Timex TS2000 in the US) originally came with 16 or 48k of RAM and 16k of ROM (64k of total addressable memory). When the +128k came out in 1985, Sinclair used a fairly interesting way of getting around the 64k limit. The memory was turned into 16k banks, which were the manipulated via a port. A bit more info on how this worked is available here[1].

Incidentally someone built a 4Mb RAM upgrade for the Spectrum![2]

[1] - http://www.worldofspectrum.org/faq/reference/128kreference.h...

[2] - http://8bit.yarek.pl/upgrade/zx.zx4mb/index.html

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#13
post #11
post #9

Am I missing something, or does the top answer not address the question? Memory tricks aside, it seems the questioner is asking whether the physical RAM itself will ever be used. Short of PAE, unless my understanding is wrong, I was under the impression that the answer to this is no.

> Short of PAE, unless my understanding is wrong, I was under the impression that the answer to this is no. PAE is used everywhere and has been around since 1995 Pentium Pros. So the answer is yes, a 32 bit OS/CPU can use 8 gigabytes (and more) of physical memory and an infinite amount of swap space. It all depends on the CPUs physical address size, not virtual. My "64 bit" CPU has 36 bit physical addresses and 48 bi…

> My "64 bit" CPU has 36 bit physical addresses and 48 bit virtual addresses.

Just to clarify for anyone that doesn't catch what you mean and thinks PAE is the devil:

x86-64 CPUs must support in PAE when operating in long mode (64 bit mode). Further the version of PAE used is 'classic PAE' with an additional translation layer added to get some more physical address space. In other words even 64bit CPUs don't have a real 64bit physical address space, they still use PAE to access large amounts of ram.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#14
This seems like an appropriate place to ask this question. At work I have an i5 with 8 GB of ram. Unfortunately we're stuck with XP 32. So is there a away for me to use more memory over all? Specifically I have to have Outlook and my VirtualBox Linux machine running at the same. I'd like to use bank switching or PAE to give my VM 4 GB. While all of the other applications just fight out for the remaining 4.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#15
post #8
post #6

There is also a very recently developed middle ground, the Linux "x32" ABI, since Linux v3.4: http://en.wikipedia.org/wiki/X32_ABI As I understand it, this mode gains performance by sticking with 32bit pointers in user-space instead of 64bit pointers, while still allowing for taking advantage of all the new registers etc available in x86-64 ("amd64") CPUs. (Many programs doesn't really need more than 4gb virtual addr…

x32 is clearly a good technical solution. If you're running on a 64 bit kernel, x32 is superior to i686 in every measurable way. But it's also yet another architecture. It's not binary compatible with either i686 or x86_64. You need your whole userspace compiled to use it. Middleware with embedded assembly (there's a surprising amount of this in glibc, and of course things like ffmpeg, libjpeg, etc...) needs to be po…

I thought that the work that goes into multiarch support would allow you to run a single kernel and mix&match x32 and x86_64 binaries on the same system, but I might be wrong (Of course that would require a separate set of any lib/dependency).

Some numbers mentioned on the x32abi page hint on anywhere between 4% and 40% performance gains, if that is true then I'd think the benefits would outweigh the hassle of another architecture.

(Edit: Most middleware also ship straight-C versions of the routines; whether or not an x32 C compiler can measure up to handcrafted x86 or x86_64 assembly I don't know - but I'm guessing the much higher register count would help a lot. Regarding proprietary software: There are a great many server configurations that do not need anything beyond the standard open source packages available in Debian)

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#16
post #6

There is also a very recently developed middle ground, the Linux "x32" ABI, since Linux v3.4: http://en.wikipedia.org/wiki/X32_ABI As I understand it, this mode gains performance by sticking with 32bit pointers in user-space instead of 64bit pointers, while still allowing for taking advantage of all the new registers etc available in x86-64 ("amd64") CPUs. (Many programs doesn't really need more than 4gb virtual addr…

Yup, the x32 ABI is pretty neat. For most architectures the transition from 32 bit to 64 bit pointers resulted in reduced performance from the extra cache pressure the bigger pointers caused. In x86-64, though, the extra registers and guaranteed SSE2 meant that you actually saw a speed increase.

Of course, there are performance advantages to bigger pointers too, sometimes. For instance, it can be easier for a garbage collector to identify pointers is the ratio of memory addresses in use to total addresses is small.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#17
post #15
post #8

Earlier quoted context omitted.

x32 is clearly a good technical solution. If you're running on a 64 bit kernel, x32 is superior to i686 in every measurable way. But it's also yet another architecture. It's not binary compatible with either i686 or x86_64. You need your whole userspace compiled to use it. Middleware with embedded assembly (there's a surprising amount of this in glibc, and of course things like ffmpeg, libjpeg, etc...) needs to be po…

I thought that the work that goes into multiarch support would allow you to run a single kernel and mix&match x32 and x86_64 binaries on the same system, but I might be wrong (Of course that would require a separate set of any lib/dependency). Some numbers mentioned on the x32abi page hint on anywhere between 4% and 40% performance gains, if that is true then I'd think the benefits would outweigh the hassle of anothe…

A standalone x32 binary will run fine on an x64 machine. But if you want to link to any libraries, the library will also have to be x32. So an x64 system, which probably has 32-bit legacy libs as well as normal 64-bit ones, will also need a complete set of x32 libs for x32 to be practical.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#18

This seems like an appropriate place to ask this question. At work I have an i5 with 8 GB of ram. Unfortunately we're stuck with XP 32. So is there a away for me to use more memory over all? Specifically I have to have Outlook and my VirtualBox Linux machine running at the same. I'd like to use bank switching or PAE to give my VM 4 GB. While all of the other applications just fight out for the remaining 4.

No, only Windows server editions have PAE enabled and AFAIK this isn't something you can use without kernel support.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#19
post #12

This reminds me of some of the fun and games we used to have with 8-bit computers. 8-bit computers running chips such as the Z80 and 6502 were limited to 16-bit addressing and a total of 64k of addressable RAM. For most computers earlier on this wasn't a problem, but in the later 80s when machines with 128k started to become more common this meant that there were lots of strange quirks to be considered. For example,…

http://en.wikipedia.org/wiki/Bank_switching

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#20
post #17
post #15

Earlier quoted context omitted.

I thought that the work that goes into multiarch support would allow you to run a single kernel and mix&match x32 and x86_64 binaries on the same system, but I might be wrong (Of course that would require a separate set of any lib/dependency). Some numbers mentioned on the x32abi page hint on anywhere between 4% and 40% performance gains, if that is true then I'd think the benefits would outweigh the hassle of anothe…

A standalone x32 binary will run fine on an x64 machine. But if you want to link to any libraries, the library will also have to be x32. So an x64 system, which probably has 32-bit legacy libs as well as normal 64-bit ones, will also need a complete set of x32 libs for x32 to be practical.

Sure. But after the porting work has been done by the distribution vendor, it's done. The package manager software should be able to do whatever is necessary to almost transparently ensure any necessary dependencies are installed for the required sub-architecture. So I would imagine that in most cases, end-users won't notice any hassle except having the option to choose between x32 and x86_64 per package during installation. I think that sounds kind of neat :)
Post reply on HN