where is my 4 gb ram

Upload: muhammad-javeed

Post on 07-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Where is my 4 GB RAM

    1/18

    *

    programming and human factors

    by JeffAtwood

    Mar 8, 2007

    Dude, Where's My 4 Gigabytes of RAM?

    Due to fallout from a recent computer catastrophe at work, I had the opportunity to salvage 2 GB of memory. I installed the memory in my work box, which brings

    it up to 4 gigabytes of RAM 4,096 megabytes in total. But that's not what I saw in System Informaon:

    Only 3,454 megabytes. Dude, where's my 4 gigabytes of RAM?

    The screenshot itself provides a fairly obvious hint why this is happening: 32bit Operang System. In any 32bit operang system, the virtual address space is

    limited, by definion, to the size of a 32bit value:

    232

    = 4,294,967,296

    4,294,967,296 / (1,024 x 1,024) = 4,096

    As far as 32bit Vista is concerned, the world ends at 4,096 megabytes. That's it. That's all there is. No ms.

    Addressing more than 4 GB of memory ispossible in a 32bit operang system, but it takes nasty hardware hacks like 36bit PAE extensions in the CPU, together

    with nasty soware hacks like the AWE API. Unless the applicaon is specifically coded to be take advantage of these hacks, it's confined to 4 GB. Well, actually, it's

    stuck with even less 2 GB or 3 GB of virtual address space, at least on Windows.

    OK, so we're limited to 4,096 megabytes of virtual address space on a 32bit opera

    ng system. Could be worse.* We could be back in 16

    bit land, where the world

    ended at 64 kilobytes. Brr. I'm geng the shakes just thinking about segments, and pointers of the near and far variety. Let us never speak of this again.

    But back to our mystery. Where, exactly, did the other 642 megabytes of my memory go? Raymond Chen provides this clue:

    In the absence of the /PAE switch, the Windows memory manager is limited to a 4 GB physical address space. Most of that address space is filled with

    RAM, but not all of it. Memorymapped devices (such as your video card) will use some of that physical address space, as will the BIOS ROMs. Aer all

    the nonmemory devices have had their say, there will be less than 4GB of address space available for RAM below the 4GB physical address boundary.

    Ian Griffiths offers a more detailed explanaon:

    To address 4GB of memory you need 32 bits of address bus. (Assuming individual bytes are addressable.) This gives us a problem the same problem

    that IBM faced when designing the original PC. You tend to want to have more than just memory in a computer you need things like graphics cards

    and hard disks to be accessible to the computer in order for it to be able to use them. So just as the original PC had to carve up the 8086's 1MB

    addressing range into memory (640K) and 'other' (384K), the same problem exists today if you want to fit memory and devices into a 32bit address

    range: not all of the available 4GB of address space can be given over to memory.

    For a long me this wasn't a problem, because there was a whole 4GB of address space, so devices typically lurk up in the top 1GB of physical address

    space, leaving the boom 3GB for memory. And 3GB should be enough for anyone, right?

    So what actually happens if you go out and buy 4GB of memory for your PC? Well, it's just like the DOS days there's a hole in your memory map for

    the IO. (Now it's only 25% of the total address space, but it's s ll a big hole.) So the boom 3GB of your memory will be available, but there's an issue

    with that last 1GB.

    And if you think devices can't possibly need that much memorymapped IO, I have some sobering news for you: by this summer, you'll be able to buy video cards

    with 1 GB of video memory.

    To be perfectly clear, this isn't a Windows problemit's an x86 hardware problem. The memory hole is quite literally invisible to the CPU, no maer what 32bit

    operang system you choose. The following diagram from Intel illustrates just where the memory hole is:

  • 8/3/2019 Where is my 4 GB RAM

    2/18

    Geng the Most Out of PNG Soware Internaonalizaon, SIMS Style

    The proper soluon to this whole conundrum is to use a 64bit operang system. However, even with a 64bit OS, you'll sll be at the mercy of your motherboard's

    chipset and BIOS; make sure your motherboard supports using 4 GB or more of memory, as outlined in this MSKB arcle.

    264

    = 18,446,744,073,709,551,616

    18,446,744,073,709,551,616 / (1,024 x 1,024) / 8 = 2 exabytes

    In case you're wondering, the progression is giga, tera, peta, exa.

    Although the performance benefits of 64bit are somewhat dubious on the desktop, a 64bit OS absolutely essenal if you run applicaons that need to use more

    than 2 GB of memory. It's not common, but we're geng there.

    The memory hole for IO sll exists in the 64bit world, but most modern BIOSes allow you to banish the IO memory hole (pdf) to some (for now) ridiculously high

    limit when you're running a 64bit OS. Don't get too excited, though. The usermode virtual address space in 64bit Windows is a mere 8 terabytes. Suffice it to say

    that we won't be running out of physical or virtual address space on 64 bit operang systems for the forseeable future. It's the final soluon, at least for the

    lifeme of everyone reading this blog post today.

    Here's one parng bit of advice: if, like me, you're planning to sck with a 32bit operang system for the next few years, don't waste your money on 4 GB of RAM.

    You won't be able to use it all. Buy 3 GB instead. Every motherboard I'm aware of will happily accept 2 x 1 GB and 2 x 512 MB DIMMs.

    * Could be raining.

    Posted by JeffAtwood

  • 8/3/2019 Where is my 4 GB RAM

    3/18

    Comments

    Brandon Paddock wrote "To those claiming Linux doesn't have this problem: You're wrong. A 32bit Linux OS will have the exact same limitaons, right down the

    the kilobyte."

    But what about 64bit Linux?

    keylime on March 9, 2007 1:00 AM

    Jeff:

    Your math is incorrect. In both calculaons, you forget to convert from bits to bytes (8 bits = 1 byte). Also, you're not considering memory paging. Without

    paging, x86 processors using a 32 bit address word can only access 0.5 GB of memory. See hp://spreadsheets.google.com

    /ccc?key=pYK6MlUiNyheNUOvbGxggNQhl=en_US for the math. NOTE: Clicking the sheet names at the boom displays different calculaon sets.

    FWIW, I completely agree with Ian (and others) when he says that the issue isn't quite as facile as Jeff's thesis makes it seem. Look at Mac OS X: it's (now) a 64bit

    kernal, but the maximum amount of RAM a MacBookPro will take is 4GB, while a MacBook will only handle 3GB. The MacPros, however, handle up to 16GB of

    RAM. Different chip set, same OS = different specs. Apple simply didn't include the extra hardware to allow higher memory configuraons.

    Jae:

    x86 is a processor architecture. 'Nbit ' (where N is 16, 32, 64, etc) refers to the word size a processor operates on. x86 processors began with 16bit word sizes,

    moved to 32 and are moving to 64.

    One (very inexact) way to think about it is to say that CPUs are like internal combuson engines. They may differ in how the bits fit together, how many bits there

    are or even how quickly they do their jobs. But, basically, they're all prey much alike: fuel comes in, combuson happens, piston moves, and wheels turn.

    Word size can be likened to the amount of pistons an engine has; more pistons means more fuel is combusted (work is done) every cycle. Also, relevant to the

    above discussion, larger word size means more physical address lines are available (32 more, in this case). See above link for the math behind this.

    Josh Butcher on March 9, 2007 1:09 AM

    That link should've been: hp://spreadsheets.google.com/ccc?key=pYK6MlUiNyheNUOvbGxggNQhl=en_US

    Josh Butcher on March 9, 2007 1:10 AM

    If your hardware is physically capable of addressing more than 4gb of RAM (this can be limited in the chipset), then you can access up to 64 gigs of RAM with

    Linux in 32bit mode. Using PAE, which is invisible to applicaons, you just don't have to worry about system memory; if you've got it, you can use it.

    However, I think there's sll a 2gb limit per process, 3 if you use a special boot parameter to the kernel. You can run a lot of 2gb processes, but can't run a single

    32gig program, as far as I know.

    If, of course, you have a 64bit CPU, you can use as much RAM as you like. Programs can easily use all the RAM too, but they do have to be recompiled for 64bit.

    32bit compiles are sll limited to 2 or 3 gigs.

    Linux is a prey damn good soluon, overall, but the 32 to 64bit transion is painful on all OSes. Linux runs 32 bit code quite nicely when the kernel is 64 bit, but

    you can't use a 32bit plugin, like Flash, with a 64bit Firefox. You have to be aware of the differences and work around occasional problems.

    It'll probably be least visible on the Mac. They go to great pains to hide the 32 versus 64bit problems.

    Malor on March 9, 2007 1:12 AM

    Actually it is O/S issue hp://www.microso.com/whdc/system/plaorm/server/PAE/PAEdrv.mspx

    Shows that XP is limited to 4GB whereas Datacentre is limited to 128GB! Once you start dealing with kit in this range ($80K+) you want to have all your RAM

    available (why do you want 16GB? well if you have a 20GB database and it gets hammered you want in RAM)

    hp://support.microso.com/kb/283037 describes what happens with /3gb and /pae

    If you really want to see problems check out "Desktop Heap" hp://support.microso.com/kb/126962hp://support.microso.com/default.aspx?scid=kb;

    ENUS;184802

    The desktop heap is set on 32Bit systems to 48MB! That's all, and on servers where processes can run as users, it's a problem. The limit is about 90 users (each

    starng out with 512KB used) on a box as more than this (48/.5=96) starts to hit the usage by system/service accounts. see hp://support.microso.com

    /kb/169321 on how windows can start a new process in a new windows desktop

    alister on March 9, 2007 1:18 AM

    Very good arcle. I work on BIOS for a living, and I have to give this explanaon to testers all the me.

    Which plaorms are mote likely to support remapping over 4GB ... servers. Most desktops and notebooks won't support it.

    If the memory controller will support remapping memory above 4GB, then you're fine. The "memory hole" will get pushed up over 4GB. If not, then you lose

    that memory to all of the PCI devices on the system.

  • 8/3/2019 Where is my 4 GB RAM

    4/18

    On AMD Athlon/Turion/Opteron plaorms, the memory controller is in the CPU. On Intel plaorms, this is the MCH/GMCH (also called a "northbridge").

    spambrian on March 9, 2007 1:51 AM

    In any 32bit operang system, the physical address space

    is limited, by definion, to the size of a 32bit value

    No... the /virtual/ address space is limited to 32 bits. It's possible to have more /physical/ memory than this, and it's even useful if you want to run more than

    one large process at a me. PDP11s did this, AFAIR.

    I don't know enough about Windows or Intel architecture processors to know whether this is possible in that environment, though.

    John on March 9, 2007 2:18 AM

    Do you need 4gigs of ram on a desktop machine though?

    Well a few years ago I would have laughed at you but seeing how 2gigs actually makes a difference in Vista due to the improved memory management, I'd have

    consider going for it... If it didn't mean I had to scrap my 4* 512 sck... But I guess even that's offthe table unl people stop faffing around with 32bit desktop

    applicaons and decide they're bored of it.

    Oli on March 9, 2007 2:25 AM

    John: you're absolutely right. Corrected.

    And the 36bit PAE Intel extensions are what you're thinking of, but they're sll a nasty hack. Far beer to lace up your boots and go 64bit now that AMD blazed

    the trail.

    JeffAtwood on March 9, 2007 2:26 AM

    I'm geng confused with all these comments, eheh. Isn't there a difference between physical memory and virtual memory? Can't the x86 architecture handle

    enormous amounts of virtual memory?

    What I'm being taught in college is that certain memory addresses are reserved for ROM memory and I/O devices. And since the physical limit is 4GB, if you have

    addresses that are fixed to other devices than what we know as the RAM memory, then you won't use all those 4GB because a por on of those 4gb is not even

    addressable.

    That's what I understand, anyway. But then I heard that there is virtual memory, but that's where those page files come into play, I guess. I sll don't understandit very well :P

    Julius on March 9, 2007 2:26 AM

    When I built up my current PC I chose "Windows XP x64 Pro" for this very reason (plus I didn't see the point in restric ng my shiny new 64bit CPU).

    Sadly support for XP x64 has been mediocre at best. Some major hardware players (e.g. Netgear) have outright refused to produce drivers for it. Others have

    produced cutdown soware that funcons, but misses important features when compared to the 32bit version.

    Even Microso, who marketed x64 as meeng the "increasingly sophiscated demands for making home movies, working with digital photographs, using digital

    media" have not issued x64compable versions of their "Color Control Applet" or the "RAW Thumbnail Viewer" both of which would be very useful addons for

    people working in exactly those fields.

    Given this experience I am watching Vista 64bit with quiet interest. A quick trawl around various hardware websites shows that most drivers offered are labelledas Vista 32bit only. Is history set to repeat itself?

    GrahamStw on March 9, 2007 2:27 AM

    "It's the final soluon, at least for the lifeme of everyone reading this blog post today."

    You really want to say something like that? I remember geng a 16k expansion for my Apple II+ (cost $200 and brought me to 64k). I would bet that 64bit isn't

    enough to last the next 40 years, probably not the next 20.

    Jiro on March 9, 2007 2:29 AM

    Graham, I expect the driver situaon to be much beer with Vista x64. The 64bit version of XP release was a weird, outofband release that never had proper

    levels of support. XP was released in 2001, and x64 XP was released in, what, 2005? That's weird.

    But with Vista, x64 is a firstclass cizen, released at the same me alongside all its x86 brethren.

    Of course it'll sll take me. Some companies sll don't have plain old x86 drivers for Vista that are any good. But within the next 2 years, I expect x64 driver

    support to at rough parity with x86.

  • 8/3/2019 Where is my 4 GB RAM

    5/18

    JeffAtwood on March 9, 2007 2:32 AM

    [quote]In case you're wondering, the progression is giga, tera, peta, exa.[/quote]

    Nope.

    Because you are obviously talking powers of two, the progression is gibi, tebi, pebi, exbi.

    (hp://en.wikipedia.org/wiki/Binary_prefix#IEC_standard_prefixes)

    Mihai on March 9, 2007 2:33 AM

    I'm a lile disappointed with my recent install of Windows Vista (32bit). I have three gigs of ram (2x1GB 2x512mb) but BIOS and Vista only recognizes 2GB (the

    2x1GB scks). When I run applicaons like CPUZ in Windows, it recognizes all four scks. This isn't the same issue but kind of related. Wondering if anyone had

    any idea what was going on? I was thinking the scks were just not compable but I'm not posive.

    raid5 on March 9, 2007 2:36 AM

    "Suffice it to say that we won't be running out of physical or virtual address space on 64 bit operang systems for the forseeable future. It's the final soluon, at

    least for the lifeme of everyone reading this blog post today"

    Eh? I remember when the Mac II came out, the arcle in MacWorld being amazed at the vast 4 gigabyte address range addressible by its 32 bit processor and

    proclaiming that we'd never hit that limit. Not to menon the old (if apocryphal) 640kshouldbeenoughforanyone chestnut. You're falling into the same trap.

    Starng with 4GB, and assuming Moore's Law holds constant, we hit 8192GB in 16 and a half years. I'm 27 now, and I damn sure intend to sll be alive when I'm

    44.

    Allan Crain on March 9, 2007 2:39 AM

    Julius:

    "Isn't there a difference between physical memory and virtual memory? Can't the x86 architecture handle enormous amounts of virtual memory?"

    Yes and yes (depending on your definion of enormous, I suppose).

    Physical memory is just that, the 'scks' you physically plug into slots inside your computer. Virtual memory, in a nutshell, refers to the method of an OS

    presenng nonconguous memory as if it were conguous. I ts an abstracon layer. Oen mes this means that some of the non conguous memory is actually

    a file on the hard disk, 'swapped' into and out of RAM as it's needed.

    "What I'm being taught in college..."

    Sounds like they're telling you the truth. During bootme, some peripherals are assigned memory locaons that the CPU reads from/writes to. This happens

    dynamically now (PlugAndPlay) but in the past, folks used to have to set the memory address themselves via DIP switches. That sucked. Reassigning these

    memory locaons during runme isn't normally done (never, as far as I know).

    "But then I heard that there is virtual memory, but that's where those pagefiles come into play, I guess."

    Pages (pagefiles) may be files on disk or regions of memory or even something else (Vista lets users plug in a USB thumb drive to increase system memory). They

    don't *have* to be files on disk.

    See hp://en.wikipedia.org/wiki/Virtual_memory for more info.

    See my above link for some background math.

    Josh Butcher on March 9, 2007 2:49 AM

    You say [quote]"To be perfectly clear, this isn't a Windows problem it's an x86 hardware problem. The memory hole is quite literally invisible to the CPU, no

    maer what 32bit operang system you choose. The following diagram from Intel illustrates just where the memory hole is: image"[/quote]

    and then show an image of a DOS compable memory layout. As far as i'm aware, the only OS to actually use this kind of layout would be from a certain

    company in Redmond. I know none of my machines have a DOS compability region in place, so i would say this in fact _is_ a windows issue, not and x86 one.

    Kris

    kris on March 9, 2007 2:51 AM

    Jeff, I do hope things will improve, but I won't be convinced that 64 bit has hit mainstream unl I see major OEMs shipping PCs with Vista 64 installed as

    standard.

    Personally I wish Microso had *only* released a 64bit version. Aer all, it is supposed to be the OS for the next generaon of PCs isn't it? And I doubt many of

    them will be 32bit.

    Paul Thurro makes some important points on his Windows SuperSite:

    hp://www.winsupersite.com/showcase/winvista_ff_x64.asp

  • 8/3/2019 Where is my 4 GB RAM

    6/18

    GrahamStw on March 9, 2007 2:55 AM

    Jeff:

    " Exactly where is that magical PAE memory supposed to appear?

    It'll only "appear" in apps that explicitly code to support the AWE (address windowing extensions) API, which makes use of the PAE extensions in the CPU. I don't

    think the base OS does this, but applicaons might.

    "

    No PAE increases the available pool of memory in total. AWE isn't directly connected with it, though the two go together from necessity for super huge apps on32bit.

    a href="hp://blogs.technet.com/tristank/archive/2006/05/27/430507.aspx"hp://blogs.technet.com/tristank/archive/2006/05/27/430507.aspx/a

    TristanK on March 9, 2007 3:02 AM

    Man, are you sure 4GB will be _enough_ at all, for Windows Vista?

    Salvatore Iovene on March 9, 2007 3:08 AM

    "Virtual memory, in a nutshell, refers to the method of an OS presenng nonconguous memory as if it were conguous."

    Of course in pracce, on 32bit Windows, you sll have the problem of actually geng a conguous memory block greater than ~1.5Gb.

    Windows maps drivers and suchlike at the boom of the virtual memory for each process, then at around 2Gb, you'll find it places system dll's! So your poor

    process can never actually map a conguous block of memory 1.5gb, even though it can access 1.5Gb + memory from the upper limit (~1Gb) using the /3Gb

    switch.

    A _real_ pain when you're constrained to 32Bit Windows and aempng to create memory hungry processes used memory mapped files for shared mem.

    hp://msdn2.microso.com/engb/library/ms810613.aspx

    Jamesm on March 9, 2007 3:14 AM

    Jamesm:

    "Of course in pracce, on 32bit Windows, you sll have the problem of actually geng a conguous memory block greater than ~1.5Gb."

    I didn't say the OS had to be any good at it... :)

    Josh Butcher on March 9, 2007 3:19 AM

    Nice arcle, again. You menoned BIOSes that move the mapped PCI memory to a very high address. Actually the Asus BIOS I have works the other way round:

    the RAM between 2 GB and 4 GB is remapped to 4+ GB.

    I've recently upgraded to 4 GB because I'm dumb and curious and have too much money. Now I found that I have to enable this seng when running

    Memtest86 1.70 so that it can see all 4 GB. It will test them in to chunks: 116KB (or so) to 2 GB, and 4 GB to 6 GB, because that's where the BIOS has mapped the

    second 2 gigs.

    But for boong Windows (XP 32bit) I have to disable memory remapping in order to get at least a measly 3 GB (the 8800's video RAM takes up all the rest!).

    Chris Nahr on March 9, 2007 3:28 AM

    Here's Microso's guidance on what operang systems support the 36bit PAE extensions, and what the memory limits are for each:

    hp://www.microso.com/whdc/system/plaorm/server/PAE/pae_os.mspx

    It hasn't been updated for Vista yet, but here are the physical memory limits from Thurro:

    Starter: 256 MB (!)

    Home: 8 GB

    Home Premium: 16 GB

    every other edion of Vista will use as much physical memory as the hardware supports.

    JeffAtwood on March 9, 2007 3:31 AM

    AWE = EMS for the early Noughes :)

    TristanK on March 9, 2007 3:57 AM

  • 8/3/2019 Where is my 4 GB RAM

    7/18

    no.. This is a real system: [snipped]

    cat /proc/meminfo

    [ 16 GB RAM ]

    cat /proc/cpuinfo

    [ 4 Opteron 2.4 GHz dualcore CPUs ]

    Dan on March 9, 2007 4:03 AM

    Kris, I think how did you correlate the limitaon of 32bit addressing with DOS compability?

    Damian on March 9, 2007 4:05 AM

    So if I really want everything I get out of my memory, don't I want 3x 1GB s cks, AND 1x 512MB sck?

    then you loose the dual channel benefit.

    18,446,744,073,709,551K of RAM ought to be enough for anybody.

    anyway since windows has a limited life..(vista is like 5 year support)

    NBC on March 9, 2007 4:08 AM

    So... if we buy x64 hardware, will a 32 bit OS sll see all 4 GB, or do you have to have a 64 bit OS as well?

    I won't be going to a new OS anyme soon ( I want Vista, and don't have the money for it yet). But my church is looking at upgrading to 4GB in the recording

    computer...

    Eric D. Burdo on March 9, 2007 4:53 AM

    haha great jeff! very interesng this arcle!

    its silly but i never thought about a limit like that in the modern computer architecture.

    i just hope to live unl the day that i can say: dude!! where are my 19 EB (aka Exabyte)??? hahah

    ps. hey jeff i would to suggest you the topic of one of your next arcles, cause i was thinking if exist a diet, or beer like posion to improve producvity for

    programmers cause i am geng prey fat haha :D. sorry i go always offtopic. Regards.

    Donnie from Rome on March 9, 2007 5:06 AM

    Actually, the physical processor does have, to this day, DOS compability in microcode and bios. (Maybe in stub form, running DOS probably won't actually work

    anymore with new hardware anyway, I don't know if anyone's even tried it in years.) When they say x86 ISA is 'legacy baggage' they don't just mean the silly

    register layout and instrucon set.

    The northbridge or HT bridge controls all access to memory, both DRAM and PCI chips (and bios and other device junk), and it's the one that ini alizes PCI

    devices into certain slots. That's why the cpu, and thus the OS, is incapable of seeing through it.

    Foxyshadis on March 9, 2007 5:06 AM

    That, my friends, is why Apple does not offer 4GB of RAM in laptops. Which makes me wonder how all the other manufacturers explain to the rich idiots who

    splurged their kilobucks on their loaded Lenovos, Toshibas and HPs, why they can't see all of their expensive RAM.

    DMB on March 9, 2007 5:06 AM

    "The usermode virtual address space in 64bit Windows is a mere 8 terabytes.... It's the final soluon, at least for the lifeme of everyone reading this blog post

    today."

    You think? In the early 90's, I had a computer with 2MB of RAM. Today (17 years later), it is feasible to have 4GB. That's 2,000 mes more memory. If the same

    trend connues, we could have 8TB by 2024. Certainly within most of our lifemes.

    Jeremy on March 9, 2007 5:25 AM

    If and when Adobe's new InDesign Suite goes to 64bit, then I will certainly buy a PC to take full advantage of those available features. Unl then I will just

    connue to run at 2GB RAM.

    Michael on March 9, 2007 5:30 AM

  • 8/3/2019 Where is my 4 GB RAM

    8/18

    Kris, you are embarrassing yourself with such comments, so the 1MB "DOS compability" is what makes the 4G limit ? LOL.

    PL on March 9, 2007 5:31 AM

    Ya know, I thought it was common to be using the PAE kernel these days, at least on recent NXcapable hardware.

    You haven't disabled DEP, perchance?

    hp://msdn2.microso.com/enus/library/ms791508.aspx

    I'm running X64 at home and at work, so can't readily check :)

    Mental note to look that up someme.

    TristanK on March 9, 2007 5:32 AM

    Jeff, I think you should edit this arcle, because your recommendaon:

    "The proper soluon to this whole conundrum is to use a 64bit operang system"

    is misleading, and may well cause people serious grief. There are loads of systems out there with 64bit CPUs that only have a 32bit physical address range. For

    example, the vast majority of laptops only have a 32bit physical address range, even though many are now available with 64bit CPUs. And plenty of desktop

    systems have the same issue.

    People following your advice are liable to put themselves to the inconvenience of switching to a 64bit OS only to

    find that it doesn't actually solve the problem

    they're sll limited to 3.5GB of RAM, but now they have the addional problems that half their devices are no longer properly supported, and their OS now has a

    bigger memory footprint thus *reducing* the amount of memory available for doing useful work... Most people will not regard this as an improvement, and they

    could reasonably be annoyed with your advice.

    The boom line is this: a lot of chipsets only use 32 address bits the higher order address bits on the processor are not wired up to anything more than

    terminang resistors. Turning on /PAE or switching to 64bit won't help you if you have such a chipset because the CPU doesn't have a way of asking for stu ff

    above the 4GB mark. 64bit will let you get more than 2GB of *virtual* address space in a process, but you'll sll be stuck with 3.5GB or so of physical memory.

    So if I were you I'd qualify your recommendaon before you get a horde of angry people beang a path to your door... Make it clear that you need to have a

    suitable chipset. Moreover, if you do have a suitable chipset you probably don't actually need to go 64 bit. /PAE may actually be a beer opon in reality, given

    today's less than total support for 64bit. PAE may be a hack, but who cares? The OS deals with it; it's no uglier than the fact that my machine has 4GB of virtual

    memory (my physical memory + page file is 4GB, on my 32bit system). 64bit isn't about breaking through the 4GB barrier of physical addressing it's only really

    useful if you've hit *virtual* address space limits, which is really a completely different class of problem than the one you open this blog entry with.

    (Although if you need more than 64GB of memory, I believe 64 bit is necessary. PAE only goes up to 64GB of physical address space.)

    In short: the 3.5GB problem is usually a chipset thing, not a 32 vs 64 thing. Unless you have individual processes requiring more than 3GB of memory, /PAE is

    oen a beer soluon. (With most people I know who need this much memory, it's because they are hosng a couple of VMs, and /PAE is just fine for that.) And

    if /PAE doesn't work on your system, switching to 64bit probably won't either.

    Ian Griffiths on March 9, 2007 5:35 AM

    Thanks for the p....I am in the process of planning my new rig and was about to make that mistake. The problem is that I can't a fford to lose all of the programs

    that don't run well (or at all) on the 64 bit OS. And I hear that drivers for Vista 64 are a nightmare so I guess 3 gigs of ram it is.

    John

    hp://www.monomachines.com

    John on March 9, 2007 5:40 AM

    I'm in the same boat as Graham, well not exactly, I can't even find all the proper drivers for 32 bit Vista. So it's a waing game to first get all the necessary drivers

    for my hardware then for the applicaons I require to be compable.

    Kevin Taylor on March 9, 2007 5:50 AM

    Nobody will ever need more than 4 X 10^24 exabytes of memory...

    Gee, I wonder what the equivalent neural capacity of the brain is...

    Oops, were comparing apples to kiwis, or should I say analog to digital.

    If there is one thing that I've learned, if you offer more hardware capacity it will be used.

    "Is your name Sahra O'Conner?"

    Rabid Wolverine on March 9, 2007 5:57 AM

  • 8/3/2019 Where is my 4 GB RAM

    9/18

    Here's a nickel, kid. Go buy yourself a real computer.

    nitrogen:~# cat /proc/meminfo

    MemTotal: 4051648 kB

    MemFree: 66600 kB

    Buffers: 360016 kB

    Cached: 2215200 kB

    SwapCached: 12 kB

    Acve: 818808 kB

    Inacve: 2175504 kB

    HighTotal: 0 kB

    HighFree: 0 kB

    LowTotal: 4051648 kB

    LowFree: 66600 kB

    SwapTotal: 9823672 kB

    SwapFree: 9823244 kB

    Dirty: 272 kB

    Writeback: 0 kB

    Mapped: 449972 kB

    Slab: 970272 kB

    CommitLimit: 11849496 kB

    Commied_AS: 799204 kB

    PageTables: 4424 kB

    VmallocTotal: 34359738367 kBVmallocUsed: 5024 kB

    VmallocChunk: 34359733327 kB

    Eugen Leitl on March 9, 2007 5:58 AM

    I ran into the exact same problem on my Vista 32bit box... the memory showed up properly in the BIOS, but not in System Informaon. It turns out that

    Microso recently released a KB arcle to describe the problem (although they didn't go into the level of depth that you did... great job!)

    hp://support.microso.com/kb/929605/enus

    The system memory that is reported in the System Informaon dialog box in Windows Vista is less than you expect if 4 GB of RAM is installed

    Sean on March 9, 2007 6:00 AM

    Ian, what 64 bit chipset uses 32 bit addressing ? That is by definion not a 64 bit chipset then, sounds very strange to me but it wouldn't suprise me if you are

    correct that some do (probably Intel).

    Go with AMD64 which was the orginal inventor of the EM64 extensions that Intel then "stole" (yes I know they can with the patent agreement from 94) and

    you'll most likely be safe from such issues.

    As for the prople coming here posng some printouts from various *nix systems, you really need to read the arcle again, this is NOT a Windows issue, my good,

    you are embarrasing.

    PL on March 9, 2007 6:05 AM

    I'm currently running an Intel Core Duo that is about a year old and it simply isn't x64 capable. This is in response to the poster who "wished Microso had only

    released an x64 version of Vista". They would have le a lot of us out in the cold.

    With that said, you can see why many hardware manufacturers haven't been too quick to come on board. x64 Win XP has only been used by a select few to date

    because you would have had to buy fairly high end processors to even run it. Only now are mass consumers finally being offered processors that can support the

    x64 OS's (at least for Intel).

    Ma on March 9, 2007 6:30 AM

    bah, Eugene, here's a _real_ system:

    root@/proc# cat cpuinfo

    processor : 0

    vendor_id : GenuineIntel

    cpu family : 6

    model : 6model name : Intel Celeron ("GenuineIntel" 686class, 128KB L2 cache)

    stepping : 5

    cpu MHz : 501

    fdiv_bug : no

    fpu : yes

  • 8/3/2019 Where is my 4 GB RAM

    10/18

    fpu_excepon: : yes

    cpuid level : 2

    wp : yes

    flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr

    root@/proc# cat meminfo

    total: used: free: shared: buffers: cached:

    Mem: 257118208 62099456 195018752 0 0 0

    Swap: 511995904 0 511995904

    MemTotal: 251092 kB

    MemFree: 190448 kBMemShared: 0 kB

    Buffers: 0 kB

    Cached: 0 kB

    SwapTotal: 499996 kB

    SwapFree: 499996 kB

    cat: meminfo: Invalid argument

    David H. on March 9, 2007 6:49 AM

    "Could be raining!"

    I just watched that movie last night, and I read this blog post directly aerwords. What are the odds?

    TM on March 9, 2007 6:51 AM

    You know what's funny? I am running 4GB of physical RAM on 64bit hardware, but I don't have a 64 bit version of my O/S. I really should upgrade, but since I get

    to see 3.4 GB of it anyway, there's not much incenve...

    Ellio C. Bck on March 9, 2007 7:02 AM

    Ma, I disagree that only now are consumers geng x64 CPUs. Athlon64s have been available since late 2003. I built my current PC in September 2005 and I

    specced it with an Athlon 64 X2 3800+ which wasn't unusually expensive or "high end" even back then.

    Look at a major manufacturer like Dell and even some of the cheapest amd most basic systems they offer use 64bit capable CPUs.

    Okay, perhaps it is too much to expect Microso to exclude 32bit completely, but why is it the default? It currently isn't possible to buy a retail version of Vista

    64. Instead you buy the 32bit version and then follow the instrucons inside to send offfor the 64bit one!

    Given my experiences with XP x64, I don't find that approach very comforng.

    GrahamStw on March 9, 2007 7:02 AM

    On the whole 64bit / x86 that was menoned earlier in the comments...

    I avoided 64bit carefully for a number of reasons. First, X32 is the supported standard, and I knew that Intel was coming out with mul core processors. I

    figured, and I think I may have figured correctly, that people were going to be more willing to figure out multhreading than they were going to be willing to

    figure out X64 architecture. I sort of saw this coming when Apple began releasing dual processor G5s several years ago.

    Much as I think the whole concept of "more processors equals beer computer" argument is rather silly, it is the way the industry tends to trend. I mean, it took

    years for all the diehard Apple fans to swap from Motorola to PowerPC chipsets, and they only did that because they more or less had to for speed purposes.

    Apple connued to support FAT applicaons right up the the release of OS X.

    To this point, most PCs since the industry really got offthe ground with the 8086 have all been based on that exact architecture. S'why we call 'em X86. Of

    course, I never knew if "286" was shorthand for 8286, or if it literally went 8086, 268, 386, 486, Penum, Penum II, Penum III, Penum 4, Intel Core Duo, etc.

    I'm sure I've missed one or two iteraons in there.

    I'm hoping they're going to have the quadcores available for purchase this summer when I'll be trolling for yet another new computer. If they don't, I'll probably

    just max out a dual core system. It's something, anyway.

    Jae on March 9, 2007 7:20 AM

    @Josh,

    Last I checked, the machine addresses memory in bytes, not bits...

    LS on March 9, 2007 7:22 AM

    I did have a point in there: adopon will be slow, but it WILL happen, eventually.

  • 8/3/2019 Where is my 4 GB RAM

    11/18

    My curiosity is that since I never really studied 64bit, what is its relaonship to X86?

    Jae on March 9, 2007 7:27 AM

    Ian, using /PAE to address memory 4 GB on 32bit systems has its own problemac issues, according to Microso. There's a performance penalty because I/O

    requests from 32bit devices must be doublebuffered, and some devices might not work at all, depending on the driver. I wouldn't want to recommend THAT to

    a general audience, either!

    Chris Nahr on March 9, 2007 7:28 AM

    "Ian, what 64 bit chipset uses 32 bit addressing ? That is by definion not a 64 bit chipset then, sounds very strange to me but it wouldn't suprise me if you are

    correct that some do (probably Intel)."

    By the logic of the chipset/motherboard manufacturers supporng stuffthat customers are unlikely to use is pointless, and thus it's unusual for motherboards to

    support the full address range of the CPUs they have. Aer all how many customers are going to have more than 2gb of memory?

    Factory on March 9, 2007 7:33 AM

    @Brandon: I didn't say Apple is(n't) 64bit. I was replying to your statement saying Apple's "behind the mes technologywise" I even said that was what I was

    replying to.

    If any mainstream OS is behind the mes technologywise, it's obviously Microso's.

    Ludo on March 9, 2007 7:35 AM

    Okay, I just checked... my XP SP2 Pro system has PAE enabled (comes automacally with DEP). So for shits and giggles I enabled memory remapping in the BIOS

    and rebooted Windows. I know from MemTest that 2 out of my 4 gigs will now appear in the 4 6 GB range.

    Yet Windows tells me that it has only 2 GB total! Total available memory, according to Task Manager: 6 GB = 2 GB RAM + 4 GB page file.

    Exactly where is that magical PAE memory supposed to appear?

    Chris Nahr on March 9, 2007 7:40 AM

    Mac Pro handles up to 16GB of RAM and 3TB of disk space.

    Two 3GHz 64bit DualCore Intel Xeon Woodcrest processors.

    hp://www.apple.com/macpro/specs.html

    And with Parallels, you can run Windows, Linux, and MacOS x at the same me.

    hp://developer.apple.com/documentaon/Performance/Conceptual/ManagingMemory/Arcles/AboutMemory.html

    Charles Kens on March 9, 2007 8:02 AM

    Charles: Mac OS has always been a lile ahead of the curve in what sizes it will handle, both in RAM and Hard Drive capacity.

    I seem to recall Macs handling the GB threshold more easily than did PCs.

    Jae on March 9, 2007 8:11 AM

    To be perfectly clear, this isn't a Windows problem it's an x86 hardware problem

    Indeed. The latest Intel Core Duobased iMacs have the same issue. You can put 4GB in them, but they'll never be able to use more than 3 GB.

    Dave C. on March 9, 2007 8:29 AM

    "It's the final soluon, at least for the lifeme of everyone reading this blog post today."

    Are you serious? I was a kid when we were sll in the world of kilobytes, and now we're tossing around gigabytes like candy. We could very well be fooling

    around with petabytes before I'm dead, though we probably wouldn't be doing it on Vista.

    CrashCat on March 9, 2007 9:03 AM

    "Suffice it to say that we won't be running out of physical or virtual address space on 64 bit operang systems for the forseeable future. It's the final soluon, at

    least for the lifeme of everyone reading this blog post today".

    Wrong statement. I'm not yet in my 30, and I've seen how addressing has grown from 640k to 4GB and then became short. That's a x6250 factor!! 4GB to 8TB it's

  • 8/3/2019 Where is my 4 GB RAM

    12/18

    only a x2000 factor, and HD video and photorealisc games didn't come yet.

    danner on March 9, 2007 9:04 AM

    So if I really want everything I get out of my memory, don't I want 3x 1GB s cks, AND 1x 512MB sck?

    JJ on March 9, 2007 9:14 AM

    Thanks for an interesng post. I'll have to look into it some more because I'm faced with this same issue right now.

    I have a ASUS A8N32SLI Delux mobo with 4 gigs or RAM. (4 * 1GB Dual sided). When I go into the bios, it tells me that there is 4GB installed but only 3.38 Avail

    for use. Now I'm not sure if this is a bios issue or a mobo issue but if anyone has any clue, I'd love to hear it. (I'm planning an upgrade to my bios some me this

    weekend maybe that might work?).

    I also have Vista 64 bit installed with VPC 2007 (The reason for my 4gb is so I can run an XP image with ease).

    Sushant Bhaa on March 9, 2007 9:34 AM

    Most of this went over my head, but I have a brand new intel core 2 with 4gb of ram, only 3070mb showing in windows. Dell support showed me in the bios that

    4gb was there.

    The issue is, I also had it installed with Office 2007 and what a memory hog it is! Right now I have Outlook 2007 open, along with a browser and I'm running at

    55% of memory used.

    I wondered if adding more memory was an opon...guess not. :(

    Good read..thx for the info.

    Ron

    Ron on March 9, 2007 9:35 AM

    64bit processors have been around, but not everyone buys or feels comfortable buying AMD. There are the hardheaded people that use what they grew up with

    and that's Intel. However, it seems like EVERY system I see adversed either has a Intel 64bit or AMD 64bit processor in it. To all those people I say "your

    welcome" as I have been running my AMD FX55 since the thing came out. I tried XP 64 bit when it came out, and not only did I have driver issues, I had so ware

    issues geng Flash to run in IE, etc.

    Now I am running Vista Business 64bit edion and I must say there is great 64bit driver support. If the company has a 32bit Vista driver chances are they havethe 64bit edion too. Some companies like HP don't have Vista drivers yet for all their printers, their short term resoluon is to use the USB cable instead of the

    Network connecon for things like Fax/Scanning. Other companies like Razer don't even have Vista drivers yet.

    This leads me to my point, how long have these companies known Vista was coming? You can truly see which companies are dedicated to ensuring there

    products work with any OS and those companies that are just too small to spend the me developing drivers for every OS. Logitech Razer, etc. Suprisingly about

    the only Vista driver Razer does have is for the Habu mouse they make for Microso.

    But for those of you thinking about upgrading to 64bit OS, do it! There is no disnguishable issues that I have run into outside of the lack of general Vista (32bit

    and 64bit) driver support for some of my devices. I am able to run IE, Firefox, Adobe CS2, Unreal Tournament 2004, Open Office, Office 2007, etc without issue. To

    me aer I disabled all the extra stuff(Defender, Firewall, System Restore), I swear Vista boots faster then my old XP install.

    And the Vista GA release doesn't crash like the RC1 version did either. There is a good availability of virus soware out there, personally I use Kasperky. If you

    bought or are thinking about buying a new system that has a 64bit CPU, you paided for it, might as well use it!

    Tim on March 9, 2007 9:37 AM

    CrashCat had a good point.

    "It's the final soluon, at least for the lifeme of everyone reading this blog post today."

    Note that you're talking about problems addressing 4GB in 2007, and also quote Ian Griffiths menoning how the 8086 (designed in 1976) had to carve up 1MB.

    If that growth rate were to connue, we'd be looking at addressing 16TB in another 31 years. Of course we won't be using Vista then. (We aren't really using it

    now but that's another topic.)

    I suspect it will be a lot less than 31 years unl we see wide consumer adopon of some kind of terabytelevel opcal memory or something else that leaves

    Moore's Law in the dust.

    Dave on March 9, 2007 10:03 AM

    Mac Pro handles up to 16GB of RAM and 3TB of disk space.

    Kind of academic, since OS X itself is not fully 64 bit.

    hp://arstechnica.com/reviews/os/macosx10.4.ars/4

  • 8/3/2019 Where is my 4 GB RAM

    13/18

    So if I were you I'd qualify your recommendaon before you get a horde of angry people beang a path to your door... Make it clear that you need to have a

    suitable chipset [to use 4 GB+ of physical memory]

    Ian, good point, will do.

    Exactly where is that magical PAE memory supposed to appear?

    It'll only "appear" in apps that explicitly code to support the AWE (address windowing extensions) API, which makes use of the PAE extensions in the CPU. I don't

    think the base OS does this, but applicaons might.

    When I go into the bios, it tells me that there is 4GB installed but only 3.38 Avail for use [and I am running a 64 bit OS]

    As Ian pointed out, this is due to the BIOS; check your BIOS for an opon that remaps IO memory above 4GB.

    JeffAtwood on March 9, 2007 10:04 AM

    18,446,744,073,709,551K of RAM ought to be enough for anybody.

    Bill Gates on March 9, 2007 10:11 AM

    Well, you guys keep worrying about your need for 4GB RAM. Personally, my max RAM is 512MB, and since I run Linux, not WinDoZe, my systems run the latest

    soware just fine with between 256 and 512MB RAM. My older Dell P3/Xeon can have 2GB RAM, but I only have 512MB, and even tho I looked at upgrading, I

    can't see the point. My newer Dell Xeon 2.67Ghz only has 256MB RAM, and only because I had to use 2 scks for the dual channel memory speed. It's a server

    without even a GUI, so again, why do I need 4GB RAM? Oh yeah, you guys run that spy ware, adware, virus infested, buggy, full of holes and backdoors thingcalled WinDoZe. Well, like SpongeBob said to Plankton: Good luck with that!

    I'll sck with my Linux......

    Larry on March 9, 2007 10:11 AM

    Not really knowing what the 32bit Windows can or can not do, probably it does not know how to use memory at above 4 GB physical address, and you are stuck

    to 3 GB plus some. (Which for a salvaged memory is not too expensive..)

    My current home computer is ASUS A8N SLI Deluxe with AMD X2 (stepping 02) processor, and it definitely can use all 4 GB of installed memory.

    However original BIOS didn't setup the "memory hoisng" correctly, and the end result was rather horrible crash if I tried to "hoist" and to use the memory

    above that limit. Then very recently there came out a new BIOS release that did it correct, and I am happy big memory spender...

    So, if the motherboard BIOS setup has "memory hois

    ng" buried somewhere in the advanced menus, turning it on may help

    or maybe not.Then running your 32bit operang system with /PAE enabled may let your operang system to use all 4 GB, perming more big programs to run simultaneously

    without resorng to swapping.

    By the way, for performance reasons I do prefer to run 64bit operang systems, and 32bit applicaons.

    This is equally true for SPARCs running Solaris, as well as PC hardware running whatever.

    Very few applicaons do benefit from 64bit pointers, but operang system core is usually a different story, especially if you do have more memory than fits

    inside the first 4 GB.

    Ma Aarnio on March 9, 2007 10:31 AM

    the real problem is that everybody keeps just going bigger with memory, meanwhile memory access me is only geng slower, not faster, instead of focusing

    efforts on speeding up processing power someone needs to get on top of that memory speed curve and push the limits a bit, if you could double your memory

    access speed you could exponenally increase the available address space for total memory because you could doubleclock memory accesses. there are lots of

    smaller and singlepurpose sdram chips that do this already, currently i'm using one because i'm designing an FPGA system with limited I/O pins and i'm sending

    video frames through ethernet from a submarine to a console. granted it's much more feasible because my FPGA's clocking at 50 MHz, so doubleclocking the 133

    MHz sdram isn't a problem, but sll...anyone who wants to set a market trend, there's your place.

    Ryan on March 9, 2007 10:43 AM

    Maybe all programs in near future comes in a usbmemorylike device that holds its own memory usage? Even its own cpu.. Would be nice.

    Moving memory handling to the program instead of bios/OS.. Every program runs in its own world (virtual machine) with pipelines in and out to communicate

    with the host OS.

    The real machines memory mapping will be to handle those pipes.

    Stefan on March 9, 2007 11:13 AM

    Moral of the story buy AMD? j/k

    ryan on March 9, 2007 11:27 AM

  • 8/3/2019 Where is my 4 GB RAM

    14/18

    Yeah, why mess with Windows when there are dozens of Linux distros with thousands of precompiled packages for the x64 architecture?

    D on March 9, 2007 11:35 AM

    the behavior of the PAE switch on workstaon versions of Windows changed beginning with SP2 for XP. Too many drivers were choking when handed addresses

    outside the 32bit address range limit and MS was red of being blamed for the resulng problems, so in SP2 they removed the poron of the PAE switch's

    behavior that remapped otherwiseinaccessible RAM below the 4G boundary to above the boundary.

    john on March 9, 2007 11:39 AM

    "Linux?"

    umm Linux has the EXACT SAME PROBLEM so I'm not sure what this is in reference to. This is purely a hardware issue and has nothing to do with the OS. It is so

    funny to see how many people have absolutely zero idea how their system works... but are quick to recommend things like Linux to fix the problem rofl.

    Joe on March 9, 2007 11:41 AM

    Old informaon.

    Kalibr on March 9, 2007 11:51 AM

    Reminds me of my first 60 GB hard drive.

    Took me a while to realize why I was trashing the FAT table/drive every me I wrote beyond 32GB.

    engtech on March 9, 2007 11:56 AM

    Why doesn't 32bit Windows support PAE correctly?

    Here's linux:

    Linux 2.4.x does support greater then 4GB of physical memory (ie. RAM)

    It does this by supporng Intel's PAE (Physical Address Extension) features which are in all Penum Pro and newer CPU's.

    It does this via indirect pointers to the higher memory locaons, so there is a CPU and RAM hit for using this.

    Benchmarks seem to indicated around 36% CPU hit just for using the PAE extensions (ie. it applies regardless of whether you are actually accessing memory

    locaons greater then 4GB).

    The PAE extensions allow up to a maximum of 64GB of physical memory that the CPU (not a process) can address.

    PAE does not increase Linux's ability for *single* processes to see greater then 3GB of RAM (see below).

    Escape75 on March 9, 2007 12:03 PM

    What about dual channel mode? I have to be honest that I'm not exactly what the requirements for dual channel mode are, but would going 2x1GB and

    2x512MB work properly with dual channel mode? Each channel would have 1x1GB and 1x512, so it seems like it should work...

    Adam on March 9, 2007 12:04 PM

    Windows XP will use 4 GB, but you have to do some tuning. You can do this as described in some Microso arcles. Here is an example:

    hp://support.microso.com/kb/291988.

    My understanding is that this will allow it use "most" of it, but even then, it may appear in XP as less then 4 GB... even though it is indeed using it for "most"

    soware applicaons.

    Raedyn on March 9, 2007 12:15 PM

    First it was the hard drive size in Windows 98, and now RAM. Microso doesn't plan far enough ahead.

    Raedyn on March 9, 2007 12:16 PM

  • 8/3/2019 Where is my 4 GB RAM

    15/18

    Joe: this problem does NOT exist on Linux. It's been many years since this problem was fixed in the Linux kernel. With Linux you can use at least 8GB of RAM (I

    believe it's 16GB, but not sure) on a 32bit architecture. And no, applicaons don't need to specifically support it or any of that crap. It just works right out of the

    box, without you having to mess with it.

    So this _IS_ in fact a Windows problem. Sure, it's caused because of the architecture's 32bitness, but other OS's have worked around this for a long me.

    Ludo on March 9, 2007 12:23 PM

    I run Vista 64 RTM as my *primary* OS. Not in a VM, but on my Dimension 9200 with 4 GB of RAM. I must say that I am very impressed with the driver support

    on it. Everything works, from my GeForce 7900GS (some major glitches with the driver right aer RTM, but they've been fixed now) to my soundcard (a

    CMedia... though it can't pipe mike/linein sound directly to my speakers... WTF...).

    I've had a lot of iTunes crashes (unl 7.1 came out, that fixed the problem) and VMWare Server sll isn't supported on my plaorm at all (though that's a Vista

    thing I believe, not a Vista 64 thing). 32 bit apps run great (you'd never know they weren't 64 bit), with the excepon that Visual Studio.NET 2005 can't do edit

    and connue on 64bit apps (w?).

    Other compability issues: some browser plugins (Flash, I'm looking in your general direcon) aren't compable with IE7 64bit, so I have to use IE7 in 32bit

    mode most of the me. Not a big deal, though.

    What I was most surprised at was the memory ulizaon. ALMOST ALL OF THE TIME, NO MATTER WHAT I AM DOING, over 2GB of RAM is used. I chalk a lot of

    this up to SuperFetch. And I must say that SuperFetch uses the memory WELL. Apps launch incredibly fast. VS.NET 2005 comes up (even with the .NET 3.0 CTP

    designers all installed) in about a second. So far, I've been extremely pleased. And yes, for a developer, 4+GB on a desktop with Vista is definitely worth it

    (especially if you also consider that apps intrinsically use more memory if they're 64bit nave).

    David Markle on March 9, 2007 12:24 PM

    that is why i work on a mac. the g5 for the past 4 years gave us 64bit memory space, worked great for us video editors, and there is no fall out between a 64bit

    Mac OS X and a 32bit. Acutally there is all this talk about dual binary (intel. ppc) for the past year but apple has been doing this since they had the G5 out there,

    64bit or 32bit. now with the intel core duo 2s people can use more then 4GB of Ram.. 64bit CUP and all

    cheers

    rob on March 9, 2007 12:42 PM

    Brandon: seriously, when you're claiming the Mac is "behind the mes technologywise", you're making a total fool out of yourself (and no, I'm not a mac fanboy

    I don't even own one).

    Ludo on March 9, 2007 12:45 PM

    The effect of using the PAE switch on 32 OSs is NOT uniform based on how many cpu's are in place. I've seen 1gb or less allocated to the OS and the remainder

    available for applicaon use. When you expand beyound a single cpu, the paroning of memory is not uniform either

    the scheduler is very acvely trying to spread out the load across mulple CPU's. .. . Also PAE induces a translaon table which degrades performance versus

    direct access. Memory above 4gb can only be used for db buffer space.

    kev on March 9, 2007 12:57 PM

    If we were all using DEC/Compaq/HP Alpha Processors invented

    by Digital Equipment Corp and runs Windows NT 64, Linux, Tru64 Unix,

    VMS, etc this discussion would be moot. The Alpha world was done

    clean as 64bits from the ground up, 64 bit cpu registers, cache, and

    memory, file system, etc etc. Intel stole proprietary info about

    the Alpha from DEC, got caught, and guess what the punishment was?

    They had to make Alpha chips for DEC at LOW cost for several years

    in a brand new foundry. The Alpha processor (now hanging on only by

    the virtue of the endless popularity and reliability of VMS which

    everything from Blockbuster Video to Wall Street to hospital systems

    to .....;) is prey much the only excing thing to happen in hardware

    IT since the VAX which was the most excing thing since the PDP11.

    Oh well, we always take a step forward and then take 2 back and we

    have Intel to blame. You'd think they would have learned *something*

    from what they stole about Alpha's internals but no, we get the

    Itanium and Itanium 2 abominaons. All because everyone wants to

    run ancient soware FOREVER.

    Bob Eckert on March 10, 2007 1:00 AM

    An interesng arcle. Thanks.

    I sll don't own any computers with more than 512MB of ram, but me and my friend were arguing the possible bene fits or myths of a 64bit operang system

  • 8/3/2019 Where is my 4 GB RAM

    16/18

    just two days ago. This was very interesng.

    TopHat Stuffon March 10, 2007 2:22 AM

    What's worse is that you've got a 64bit processor (hey, wouldn't that cover the 4GB's of RAM) and you're only running a 32bit OS. Get a 64bit OS and get rid of

    the problem, no hardware upgrade necessary.

    Gabriel Smolnycki on March 10, 2007 4:38 AM

    Why are you running 32bit Windows on a 64bit machine anyways?

    Gabriel Smolnycki on March 10, 2007 4:44 AM

    For those claiming that 32bit flash will not work with 64bit Firefox, do a search for "nspluginwrapper". I have it loaded, and I can view any flash site in 64bit

    Firefox 2.0.0.1 (on Linux).

    Hmm, seems like it'll only work on *nix plaorms at the moment. Here's the link if you're a 64 bit Linux user and want to try this

    hp://gwenole.beauchesne.info/projects/nspluginwrapper/

    Also check your distro, they may have this available as a package (Gentoo did).

    Foxbat on March 10, 2007 5:07 AM

    In the interest of correcng the inaccurate informaon posted in this thread.

    Physical Address Extensions (PAE)

    Every IA32 processor since the Penum Pro has had PAE36 allowing 64GB of memory to be physically addressed. Most AMD64/EMT64 processors have PAE40

    allowing 1TB to be physically addressed however I believe the early 64bit P4s didn't.

    Cacheable Area.

    On many processors the address space cacheable by the processor, and therefore praccally usable is less than the size of the address space. For example the old

    Slot 1 Celerons could only cache 512MB and PII era Slot 1 CPUs could only cache 4GB. Having a 64GB cacheable area starng in the Xeon line and migrated down.

    PAE OS Support

    A poster further up was correct that a 32 bit OS cannot address more than 4GB. Address is the key word here it means that each process cannot have no more

    than 4GB of virtual address space. Nothing says that has to map onto physical RAM below 4GB. However the original poster was correct in that device memory

    must be below 4GB.

    Microso arficially limited desktop versions of Windows to only support 4GB of physical address space probably due to the issues with device driver quality.

    However some server versions can address more, Microso can very ghtly control what device drivers run on systems running these versions of Windows and

    therefore allow the PAE suport code to be switched on.

    Windows 2000 Advance Server 8GB Physical

    Windows 2000 DataCentre 32GB Physical

    Windows Server 2003 Enterprise 32GB Physical

    Windows Server 2003 DataCentre 64GB Physical

    All other versions of Windows including Windows Vista do not have the PAE code enabled and cannot access memory which has been relocated above 4GB in

    order to make room for device memory.

    Every version of Linux since the early 2.6 kernels has supported 64GB assuming the kernel was configured for it.

    Chipset Support.

    Even if the OS and the CPU support PAE it sll might not be possible to map the physical RAM that has had to be moved to make space for the device memory

    above 4GB so it can be used. Chipset support is required to make this magic happen and, especially on laptop and "value" segment chipsets this magic is not

    present. This is the reason the MacBook Pro cannot support more than 3GB of physical RAM but the Mac Pro (based on Xeon processors and chipsets) can.

    Address Window Extensions

    This is a Windows API to allow a 32 bit process to address memory outside it's 4GB virtual address space. It works by remapping memory below the 4GB barrier.

    It's a horrible slow hack and never really caught on. MS did it because they needed it internally for things like the 32 bit version of SQL Server and Exchange.

    AMD64/EMT64

    As noted above processors implemenng a 64 bit x86 instrucon can address 40 bits or 1TB of RAM. A 32 bit program running under a 64 bit OS can sll only use

    4GB of virtual address space, where as a 64 bit program can use 64GB of virtual address space. The machine is therefore capable of physically addressing less

    memory than the programs running on it can virtually address.

    Both MacOS and Linux support running both 32 and 64 bit binaries on a 64 bit kernel with no slow down.

    Windows cannot do this and requires and emulated 32 bit subsystem called WOW (Windows on Windows) which incurs a slow down. Exactly the same was done

  • 8/3/2019 Where is my 4 GB RAM

    17/18

    with the transion from 16 to 32 bit Windows, in that case having a 16 bit emulated system on 32 bit Windows.

    Real Big Iron processors such as POWER, Alpha generally have 48 or 50 odd bits of physical address space. In fact when the Alpha was being designed a customer

    complained that the processsor couldn't do 64 bit physical addressing. DEC replied that if the customer was willing or order enough RAM from DEC to require

    the physical address space DEC would redesign the processor to support it :)

    To sum up

    A good idea (PAE) was hamstrung in the consumer market by lacklustre OS support from Microso leading to supporng hardware not being designed to be

    compable with it and driver support being broken.

    PAE did extremely well in the server market due to rapid OS support via Linux and the ability for third pares to fix broken drivers in this OS. As it was in constant

    use supporng chipsets were designed and qualified to support it. Microso also eventually supported it in the server market but aempted to charge a

    premium for it.

    Chelgrian on March 10, 2007 6:30 AM

    PL you asked "what 64 bit chipset uses 32 bit addressing ? That is by definion not a 64 bit chipset then"

    Plenty of systems ship 64bit processors with 32bit chipsets. So you're asking the wrong queson. You're right that no 64bit chipsets use 32bit addressing. But

    that doesn't stop vendors wiring a 64bit CPU into a 32bit chipset. (In just the same way that the presence of a 36 bit address bus on most of the CPUs Intel has

    shipped since the Penum Pro hasn't stopped vendors only providing 32bit addressing in the chipsets.)

    Ma you said "Not really knowing what the 32bit Windows can or can not do, probably it does not know how to use memory at above 4 GB physical address,".

    Not true. You've been able to use more than 4GB on 32 bit versions of the server versions of Windows for years. (Although not all edions supported it.) It waspossible even back on Windows 2000. (Maybe even NT 4 I can't remember exactly when they brought in this support.)

    Incidentally, the 'double buffering' DMA issue has been with Windows since NT 3.1 I know this because I used to write device drivers for NT back then... You

    had to do it for the various RISC systems (Alpha, MIPS, PPC) because most of those systems did something completely different from the x86: the physical

    addresses seen by the CPU were, in general, not the same as the physical addresses presented on the peripheral buses like PCI. They had a mapping layer in there

    of exactly the same kind that you need for a 32bit PCI device to be able to DMA into a 64bit address space. Drivers are supposed to use the APIs that work with

    this mapping layer on *all* hardware. (The exact details of the mapping layer, and whether it was even present, were dealt with by the HAL the Hardware

    Abstracon Layer. On typical prePAE x86 hardware, the HAL would provide a 'donothing' mapping layer.)

    Device drivers that are wrien correctly should just work you don't need to do anything different to enable a device on a 32bit bus to DMA into the higher

    ranges of a 64bit physical address space. The Windows NT memory APIs have supported the necessary mechanisms since day 1, and a driver wrien back in, say,

    1995 that used the APIs correctly should work today with 4GB on a /PAEenabled system.

    However, lazy device driver writers may have noced that the relevant APIs for mapping from CPU physical addresses to busspecific physical addresses are

    always a NOP on 32bit x86 systems, as are the APIs for creang DMA mapping ranges. So if they decide not to bother calling the appropriate APIs those drivers

    will stop working when you enable /PAE. This has never been 'correct' it's in clear violaon of what the documentaon tells you to do. However, it happens to

    work on the vast majority of x86 systems, so you just know there will be some drivers out there that do this. (I would hope that any that have been through the

    WHQL cerficaon won't have this problem, but loads of drivers aren't cerfied.)

    My understanding is that this is the issue that makes /PAE a potenal nonstarter even where your motherboard happens to support it. The reason switching to a

    64bit OS makes this a nonproblem is that the driver writer will have had no opon but to write the driver correctly, whereas if you're using 32 bit drivers, you

    have to hope that it was wrien correctly. And there are a lot of crappy drivers out there.

    Ian Griffiths on March 10, 2007 8:29 AM

    I have read the posts and most if not all is way above me. But is there a consensus about how much RAM the average user should get? So if I a person buys a PC

    or makes one, and plans on using Vista 32, they only should invest in 3 gigs of memory because anything over that won't be seen without some workarounds. Is

    this right?

    Spike on March 10, 2007 10:46 AM

    If anyone is interested, I managed to get the FULL 4GB to get recognized on my machine. Its an A8N32 SLI Deluxe and previously was only geng about 3.3GB.

    1. Update bios to v1303.

    2. Enable Memory Hole. (This is Important!!)

    I also disabled the serial parallel port and a few other things but I'm prey sure thats not of much concern.

    Cheers.

    Sushant Bhaa on March 10, 2007 12:16 PM

  • 8/3/2019 Where is my 4 GB RAM

    18/18

    Thank you for the clarificaon. So the most common Windows versions (XP and Vista) actually don't support PAE to access RAM beyond the 4 GB limit, due to

    concerns about driver compability.

    That explains why I only see 2 GB under XP when telling my BIOS to remap memory around the PCI "hole", even though Memtest can see all 4 GB. So PAE is really

    a nonstarter for most readers of this blog.

    Chris Nahr on March 11, 2007 4:57 AM

    xp and vista is no god I personaly sck whit my win 2003 server

    i have sql servers whith 16 G of ram

    but a guy from micros told me that 2003 server will not work whith more then 20G of ram i have a server where ai can plug 120G of ram :D

    victor on March 11, 2007 6:03 AM

    This is confusing. Even the "sum up" has a few points wrong.

    Enabling "PAE" means that an extra level of page tables gets used. This leads to the following changes:

    One extra level is added to the page table lookup. This can possibly make memory address slower, but usually the difference is not noceable since the lookup

    is cached in TLBs.

    Data Execu

    on Protec

    on (DEP) is possible. Adding the extra level of page tables frees up a few bits in the page table descriptor. One of these newly freed bits is

    now used to mark a page as notexecutable.

    Access to up to 16 GB of physical memory is possible.

    Some kernel pointers are now 64 bits.

    So if you enable PAE, and your motherboard actually connects at least 33 address pins from the CPU to the memory, and your BIOS supports memory remapping,

    you should be able to get a full 4 GB of RAM, right?

    Nope. Not if you have XP SP2 or Vista, anyway.

    Noce that part about kernel pointers being 64 bits. A whole bunch of drivers don't handle that correctly. So as of XP SP2 (also in Vista), even in PAE mode,

    pointers are limited to 32 bits. Even though the OS and the hardware is fully capable of working with more memory, the OS never touches anything above the

    4GB boundary. This was a conscious decision. Stability of the system was considered more important than access to the extra physical memory.

    Doug on March 11, 2007 7:18 AM

    "Dude .. you ate my ******* schnitzel!!!" :)

    Nice post. I started my Vista usage with an x64 version but caved in and reverted to 32 Bit due to lack of so ware, and drivers. It's gonna get beer ... but were

    not there yet.

    Lars on March 12, 2007 2:54 AM

    More comments

    Post a comment

    To comment, please sign in using TypePad, Twier, Facebook or OpenID.

    Content (c) 2009 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved.