Brian said:
I'm not sure if RAM + virtual RAM can exceed 3GB either.
Anyone know?
Your question is a good one, because now I realize my
description of this limit, hasn't been right
I tried an experiment here, by launching up to sixteen
copies of the SuperPI benchmark, each set to calculate
32 million digits of PI. I selected this program, because
I know it will reserve 256MB to do the calculation, and
it also strives to make that memory stay resident in physical
memory (because it eventually visits all memory locations
in the reserved space). 16 * 256MB = 4GB attempted allocation.
Each copy of the program was given a unique name. 1.exe,
2.exe, ... 16.exe.
http://web.archive.org/*/http://www.xtremesystems.com/pi/super_pi_mod-1.5.zip
When launched, my WinXP 32 bit system reports a total
virtual memory of above 4GB (might have been 4.7GB or
so when I stopped running new instances, as it was
getting too slow). My pagefile plus 4GB of physical RAM,
would appear to support an attempt to have virtual addressing
above 4GB. So you can have total system wide virtual addresses,
above 4GB.
And as expected, the amount of memory usage that can
be resident (sum total), has to be less than the physical
RAM present. Now, I have 4GB installed, and it looks
like whether memory remapping is turned on or not, I
have 3GB to work with physically. Some is reserved for
OS usage.
The shocking part, was the behavior of the programs, in
a paging situation. You expect all programs to run slow,
because they "thrash". My paging file is on a single disk,
and that disk isn't capable of coming even remotely near
the I/O level this setup creates. So you expect some programs
to run slow, not get their fair share of CPU cycles and so on.
Each program does disk I/O occasionally (between test steps),
so that isn't helping matters when it happens.
That's fine. What you would want to happen, is for everything
to remain stable. A company designing an OS, should constantly
be testing, to ensure that when a stress is applied, the
right things happen.
So in my test, I start my copies of SuperPI, until I'm well
into "swap country". The disk is chugging away... And then,
instances of the program *crash*. Um, OK. That's one way to
handle stress I suppose. I can imagine myself spending
the morning in Microsoft Word, until I suddenly see "would
you like to send this report to Microsoft" :-(
Instances continued to bow out like that, until *nine* remained.
And then, there was "peace in the valley". At that point, each
would report numbers roughly like this (it takes time for the
program to "fully inflate", as it does some disk I/O between
computation steps). So I could run nine times this number, or
roughly 9*256MB = 2304MB of 3071MB free to be used (4GB physical
RAM installed). If I were to start another instance, some instance
would then crash. This is hardly good behavior.
Mem Usage VM Size
265,272K 263,864
Now, your immediate response might be "that SuperPI program is
crap - get rid of it and buy a real program". So that called
for another experiment. The failure to play nice was
in WinXP Pro SP3 32 bit (fully patched). Next, I moved
to Win2K SP4 + rollup 1 32 bit.
When I tested there, it actually behaved as expected. The machine
was still even responsive. Some of the instances of programs
would be paged out, leading to them not able to do much
computing, so their percent CPU would be rather low. But at
least there were *no crashes*. I was able to shut each
process down, at the end of the test, without incident.
There were no attempts to "send a report to Microsoft".
It just worked.
That's about the best I can do here, with the programs I have
available as a means of testing. I've tried to use the
Sysinternals TestLimit program in the past, but it doesn't
seem to "touch" the memory and try to make it resident.
(Maybe I'm "holding it wrong".)
So where does that leave us, on a 32 bit OS.
If we had real working PAE, it would look like
(Some virtual
addressing scheme, --- page ----------- PAE 36 bit physical
process_num + 32 bit translation address
address perhaps ? )
In WinXP 32 bit SP3, it behaves like
(Some virtual
addressing scheme, --- page ----------- 32 bit physical
process_num + 32 bit translation address, as memory
address perhaps ? ) remapping in BIOS doesn't
help at all. Will not
go above 0xFFFFFFFF
physical in any case.
I guess the best way to answer questions of this sort, would
be to find a web page that details the two or three stage page
translation scheme, and how it defines limits. If I had
that, maybe I wouldn't make as many mistakes trying to
explain it.
I don't have enough physical RAM on my Windows 7 system, to
repeat the above testing. And besides, my Windows 7 laptop
is x64. So maybe someone with a Windows 7 system running x32,
with 4GB RAM installed, can try some tests and see
if Windows 7 behaves better than my WinXP did.
My WinXP x32 test results says "Yeah, you can have >4GB virtual,
but we'll crash any of the programs we don't like"
Paul