Live data from Hacker News

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

superuser.com

31–40 of 64 posts

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

#31
post #20
post #17

Earlier quoted context omitted.

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 insta…

OK, modulo taking up extra space on already-cramped CD distros, taking more time to download updates, taking up more space on production hard disks, and having to download a new version of the software if your dataset grows over 4GB, it sounds good. :)

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

#32
The top answer seems wrong to me.

>> a process can have more memory than address space

How does that work? The best I can come up with is the author is referring to mmap? In which case the address space is still limited to 4Gb although I concede that with the OS pagefile it would be possible to have more than 4Gb in core at a time via judicious use of mmap.

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

#33
post #29

Holy Baader-Meinhof phenomenon. I ordered 8 GB of RAM for my HP laptop last night and spent well over two hours reading about this exact subject to see if I needed to install Windows 64-bit when it arrives. I think I even stumbled upon this same page. That being said, I still don't fully understand; Once I install the new RAM, will I only receive the benefits if I perform a new 64-bit install of Windows 7, or will up…

Yea, although there appear ways around it though hackery, for all intents and purposes, you need a 64bit OS to take advantage of the extra memory.

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

#34
post #29

Holy Baader-Meinhof phenomenon. I ordered 8 GB of RAM for my HP laptop last night and spent well over two hours reading about this exact subject to see if I needed to install Windows 64-bit when it arrives. I think I even stumbled upon this same page. That being said, I still don't fully understand; Once I install the new RAM, will I only receive the benefits if I perform a new 64-bit install of Windows 7, or will up…

You need to install 64-bit Windows to use anything beyond ~3.5GB of RAM.

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

#35
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…

Like the exact opposite of flat-real mode.

Flat real mode was a hack mode on old 32bit intel systems to enable flat memory mapping with 16bit code. You'd jump into protected mode, map the full 4gig address space flat, then jump back into 16bit real mode without remapping that memory space.

Afterwards you could access all your memory in a flat address space rather than using 64K segment:offsets. You had to prefix your memory access instructions with a 0x66 byte though. Also, you had to write your own runtime library.

This is the exact opposite, Giving you all the registers, but not the memory address space.

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

#36
post #23

I dual boot Ubuntu 12.04 32-bit and Windows 7 32-bit on my HP laptop, it has 8GB of RAM. When I am running Ubuntu I see 7.8GB (I'm assuming this is 1000 vs 1024 issue and doesn't concern me) in my system settings and resource monitor. When I am running Windows I only see 3.8GB of RAM in resource monitor, but I see the full 8GB if I look in device manager. Can somebody explain this to me?

It has been said here before. Linux fully supports PAE whereas Windows only uses it for execution restriction. Therefore you are not able to see anything beyond the 4 GB limit on Windows.

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

#37
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…

Like the exact opposite of flat-real mode. Flat real mode was a hack mode on old 32bit intel systems to enable flat memory mapping with 16bit code. You'd jump into protected mode, map the full 4gig address space flat, then jump back into 16bit real mode without remapping that memory space. Afterwards you could access all your memory in a flat address space rather than using 64K segment:offsets. You had to prefix your…

Interesting comparison :)

I'm curious about what you're thinking about when you say "write your own runtime library" - wasn't the whole purpose of this "unreal mode" and staying in 16bit such that you would still have access to DOS and its API? (compared to switching to full 32bit mode, where DOS went out the window unless you implemented or embedded a "DOS-extender"?).

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

#38
post #23

I dual boot Ubuntu 12.04 32-bit and Windows 7 32-bit on my HP laptop, it has 8GB of RAM. When I am running Ubuntu I see 7.8GB (I'm assuming this is 1000 vs 1024 issue and doesn't concern me) in my system settings and resource monitor. When I am running Windows I only see 3.8GB of RAM in resource monitor, but I see the full 8GB if I look in device manager. Can somebody explain this to me?

It has been said here before. Linux fully supports PAE whereas Windows only uses it for execution restriction. Therefore you are not able to see anything beyond the 4 GB limit on Windows.

Sorry, didn't see it. Thanks for your response, that makes sense!

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

#39
Most of the responses to the question seem to be "sort of" correct but missing important parts of the overall picture. Further, a complete answer to the question is going to be subject to the operating system the given application is running under as the specifics are going to be heavily dependant on OS implementation.

I can't speak for Unix systems, but on the Windows side, it's complicated and messy:

PAE (Physical Address Extensions)

Client editions of Windows do not support PAE while server editions do. If you want to physically address more than 4GB of RAM you need PAE. Realistically, you're unlikely to be able to address even 4GB under non-PAE x86 due to reserved memory ranges from hardware taking a chunk.

Funfact 1: As for why PAE isn't supported on client editions, this isn't a licensing problem (you can buy x64 editions for the same price that have massively increased RAM limits), but rather, Microsoft playing it safe with driver compatibility. Apparently, during testing a non-trivial number of drivers were found that made assumptions that don't hold under PAE and thus broke horribly. Things like using the high bit of a 32-bit pointer for data storage. Rather than risk a tsunami of bluescreens caused by poorly written drivers (which people would blame MS for out of naivety) the decision was made to simply not support PAE on client editions. Server editions do as there's the reasonable expectation that servers should be running higher quality drivers.

Funfact 2: Technically, PAE is supported on client editions, as it's required for hardware DEP support, so it's more a hard limit on addressable physical memory than it is a lack of support for PAE itself.

AWE (Address Windowing Extensions)

This is a Windows-specific capability (unlike PAE, which is a hardware capability provided by modern CPUs) which allows a process to address more memory than it has virtual address space. Further, it works hand-in-hand with PAE as you by definition need PAE support in order for the OS to address memory higher than 4GB in the first place. However, in order to use AWE, the application has to be explicitly written to utilise it as the usage of AWE requires the application itself to take a far more active role in managing its memory. AWE support is indicated via a flag in the PE header of the application binary. Needless to say, a tiny minority of applications have this support. The only one I could name right now would be Microsoft's SQL Server.

4GT (4-Gigabyte Tuning)

This is one other Windows-specific capability that isn't really related to a discussion on 4GB limitations but inevitably will be raised regardless. While PAE provides for the OS to address more than 4GB of physical memory, and AWE provides for an application to address more memory than in its virtual address space, neither of these features increase the amount of addressable memory at any given time in an application (ie. AWE allows you to change your view of memory, but not address more than 2GB of memory simultaneously). A Windows process in 32-bit has a 2GB virtual address space, with the remaining 2GB mapped to the kernel address space. 4GT, in contrast to PAE and AWE does allow you to modify the address space available to a user-mode application. By providing the appropriate bootloader parameter you can modify the usermode/kernelmode split to skew it up to a maximum of 3GB/1GB user/kernel-mode respectively. This used to be done quite a lot on large Terminal Servers for example, or to optimise database servers, however, the ramifications of doing so need to be carefully understood. You are reducing the amount of memory available to the kernel, and so, memory hungry drivers may now fail to load, or worse, outright crash the system if they haven't been coded to properly handle low memory conditions.

EDIT: I forgot to mention, that like AWE, an application won't even use the increased address space 4GT provides unless it is marked as capable in its PE Header. Merely enabling the setting won't get you anything unless your application supports this capability. Firefox, as an example, is large address aware and being 32-bit, can thus address up to 3GB instead of 2GB. While on 32-bit systems this capability is not likely used (how many 32-bit Windows users have modified their bootloader parameters to support 4GT?) it is fully used on 64-bit Windows and can use the full 3GB address space out of the box. And god knows Firefox needs it...

In summary, in the age of x64, I tend to view all of the above as far more trouble than it's worth. The virtual address space of a Windows 64-bit process is currently 8TB. Windows 7 Professional and up give you 192GB of physical memory, while Windows Server 2008 R2 Enterprise and up give you up to 2TB. So if at all possible, avoid 32-bit, 64-bit is the solution; PAE, AWE & 4GT were only ever workarounds.

If any of the above is incorrect, please correct me, as it's been a while since I studied much of the above, and if anyone can shed more light on the Unix situation, I'd be interested (in a very nerdy way).

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

#40
post #23

I dual boot Ubuntu 12.04 32-bit and Windows 7 32-bit on my HP laptop, it has 8GB of RAM. When I am running Ubuntu I see 7.8GB (I'm assuming this is 1000 vs 1024 issue and doesn't concern me) in my system settings and resource monitor. When I am running Windows I only see 3.8GB of RAM in resource monitor, but I see the full 8GB if I look in device manager. Can somebody explain this to me?

It is a licensing restriction. Windows Server supports up to 64 GB on 32-bit versions: http://msdn.microsoft.com/en-us/library/windows/desktop/aa36...
Post reply on HN