7

Weird question: In the office whe are discussing if whe have a machine that is 64bit infrastructure (hardware) with a 32bit OS (Server 2008 std) and 8 gigs of ram.

The OS detects the full 8 gigs of ram, BUT, being a 32 bit OS, will the OS use the full 8 gigs of ram?

How can we prove how much ram is really being used, or Windows Server is fooling everybody?

more: whe need some tests done, is there any benchmatking software out there for this purpose?

Dany
  • 91
  • 3

3 Answers3

8

A 32-bit OS using PAE can access up to 64GB of physical memory, but a process running on it will still be restricted to 4GB unless it uses a hack such as AWE.

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
  • Even with PAE, the 32-bit kernel has hard-coded memory limits for a few purposes. So you may have unused memory and still be memory starved. – Zoredache Mar 23 '11 at 23:32
  • plus using PAE is usually slightly slower – mbx Mar 23 '11 at 23:33
  • 4
    This is not entirely correct. One process can only use 2 GiB of virtual address space when running on 32 bit Windows, because the rest is used by the kernel (3 GiB if the /3G kernel parameter is used *and* the executable has the "large address aware" flag set). – Axel Gneiting Mar 23 '11 at 23:36
  • @mbx: Context switches are certainly more costly, but is this really measurable? – Axel Gneiting Mar 23 '11 at 23:38
  • @Axel: Sure, but it can still *access* 4GB, even if it can't write to all of it. – Ignacio Vazquez-Abrams Mar 23 '11 at 23:56
  • @Axel: You're right, it is measurable with long running tasks on dedicated cores. It also depends on the MMU implementation. – mbx Mar 23 '11 at 23:58
  • @Ignacio: You can't. First of this is virtual address space, which doesn't map to physical memory directly. Secondly most of the kernel addresses aren't accessible at all of course. – Axel Gneiting Mar 24 '11 at 00:02
  • @Axel: So you run more than one process. And the 2-3GB user space limit is a Window's architectural limitation: as different OS could use a different address space for the OS so each process could reach 4GB while the OS also has 4GB. – Richard Mar 24 '11 at 07:08
  • @Richard. The question was about Windows ("Server 2008 std"). But yes, as far as I know 32 bit Mac OS X uses a 4 GiB user space. The problem with this model is the cache trashing that occurs when switching to kernel space, because you need to change the page tables. – Axel Gneiting Mar 24 '11 at 15:27
1

SQL Server definitely uses it with AWE enabled so there's your not-just-theoretical proof. Even without AWE, any one process could only access 2 GB but if you have multiple such processes you can use it all.

Mark Sowul
  • 1,839
  • 1
  • 11
  • 14
0

You could try to verify it by disabling swap space and creating some 2g consuming processes. Consuming as in random data (to prevent Copy-On-Write and lazy access to unused pages).

mbx
  • 454
  • 9
  • 21