A Messy Transition (Part 3): Vista Buys Some Time
by Ryan Smith on August 13, 2007 3:00 PM EST- Posted in
- Systems
As we saw in part 1 of this series, large applications and games under Windows are getting incredibly close to hitting the 2GB barrier, the amount of virtual address space a traditional Win32 (32-bit) application can access. Once applications begin to hit these barriers, many of them will start acting up and/or crashing in unpredictable ways which makes resolving the problem even harder. Developers can work around these issues, but none of these except for building less resource intensive games or switching to 64-bit will properly solve the problem without creating other serious issues.
Furthermore, as we saw in part 2, games are consuming greater amounts of address space under Windows Vista than Windows XP. This makes Vista less suitable for use with games when at the same time it will be the version of Windows that will see the computing industry through the transition to 64-bit operating systems becoming the new standard. Microsoft knew about the problem, but up until now we were unable to get further details on what was going on and why. As of today that has changed.
Microsoft has published knowledge base article 940105 on the matter, and with it has finalized a patch to reduce the high virtual address space usage of games under Vista. From this and our own developer sources, we can piece together the problem that was causing the high virtual address space issues under Vista.
As it turns out, our initial guess about the issue being related to memory allocations being limited to the 2GB of user space for security reasons was wrong, the issue is simpler than that. One of the features of the Windows Vista Display Driver Model (WDDM) is that video memory is no longer a limited-sharing resource that applications will often take complete sovereign control of; instead the WDDM offers virtualization of video memory so that all applications can use what they think is video memory without needing to actually care about what else is using it - in effect removing much of the work of video memory management from the application. From both a developer's and user's perspective this is great as it makes game/application development easier and multiple 3D accelerated applications get along better, but it came with a cost.
All of that virtualization requires address space to work with; Vista uses an application's 2GB user allocation of virtual address space for this purpose, scaling the amount of address space consumed by the WDDM with the amount of video memory actually used. This feature is ahead of its time however as games and applications written to the DirectX 9 and earlier standards didn't have the WDDM to take care of their memory management, so applications did it themselves. This required the application to also allocate some virtual address space to its management tasks, which is fine under XP.
However under Vista this results in the application and the WDDM effectively playing a game of chicken: both are consuming virtual address space out of the same 2GB pool and neither is aware of the other doing the exact same thing. Amusingly, given a big enough card (such as a 1GB Radeon X2900XT), it's theoretically possible to consume all 2GB of virtual address space under Vista with just the WDDM and the application each trying to manage the video memory, which would leave no further virtual address space for anything else the application needs to do. In practice, both the virtual address space allocations for the WDDM and the application video memory manager attempt to grow as needed, and ultimately crash the application as each starts passing 500MB+ of allocated virtual address space.
This obviously needed to be fixed, and for a multitude of reasons (such as Vista & XP application compatibility) such a fix needed to be handled by the operating system. That fix is KB940105, which is a change to how the WDDM handles its video memory management. Now the WDDM will not default to using its full memory management capabilities, and more importantly it will not be consuming virtual address space unless specifically told to by the application. This will significantly reduce the virtual address space usage of an application when video memory is the culprit, but at best it will only bring Vista down to the kind of virtual address space usage of XP.
37 Comments
View All Comments
johnsonx - Monday, August 13, 2007 - link
While Vista may be worse than XP in regards to how much of the user address space it uses for the same app, isn't it better in that it's safer to increase user address space to 2.6Gb on Vista than it is to use the /3Gb switch in XP? As long as the developers of big game apps make them large memory aware, then won't Vista provide a net benefit? (ie the same app under Vista will allocate a 10-20% larger chunk of the 30% larger address space vs. XP).Of course this requires fiddling in the Registry to enable the 2.6Gb allocation; perhaps MS could add something to SP1 to smooth this process, or maybe even make it default if it can be determined to be safe enough for mass use?
Chadder007 - Monday, August 13, 2007 - link
Does anyone know why its hard to get X64 still on PCs from the likes of Dell/HP/Lenovo still? I know that HP offers Ultimate x64 at least on some of their consumer PCs but not basic or premium.johnsonx - Monday, August 13, 2007 - link
simple: support headaches. Too much stuff still isn't 64-bit compatible. They just don't want the hassle of all the extra calls to support, and the angry customers who are told they have no recourse but to purchase a retail copy of 32-bit windows.johnsonx - Monday, August 13, 2007 - link
and I can't blame them either.ikjadoon - Monday, August 13, 2007 - link
BF2 literally CTD's with this issue.I've heard claims that with this you cannot use unsigned drivers with these hotfixes, can Anandtech confirm that for us? Many of us using Vista are using Beta (aka unsigned) drivers because WHQL versions are few and far between. Thank you!
~Ibrahim~
Ryan Smith - Monday, August 13, 2007 - link
All of the games we used also can crash due to the issue(and much more frequently than BF2).As for this hotfix, it does not stop using unsigned drivers. I have heard however that one of the other subpacks for SP1 does break this under x64.
MadBoris - Monday, August 13, 2007 - link
Thanks Ryan for showing the before and after effects of the patch. It is clear Vista still has it's overhead unfortunately. Even if a game avoids hitting the 2GB wall by thorough testing and optimization (in a fixed footprint game unlike SupCom), the problem is all developers are being handicapped by RAM for PC now. We have the GPU and CPU power to render more and handle more, but memory size is a restraint to overall game design now for certain genres. Even though console games won't be very effected by PC ports, but standalone PC games that could really address more memory in a couple years won't be able to. As for now 2GB RAM is the current sweet spot for a gaming rig, but it's a slippery slope as we get close to the ceiling.I'm all for the 64 bit solution, as it is the only viable one. It really needs to become more mandatory that applications and games start doing proper x64 versions, some good apps still lack support. I fear the "strong encouragement" from MS isn't enough, maybe new tools they can come down with Visual Studio could make it easier for devs to verify code and do a proper 64 bit build.
Also, I think Microsoft should do a special promotion where users can buy a 64 bit Vista upgrade if you own 32 bit. 1/4 the price or better will make the transition easier and more inviting to Vista 32 users. I think MS would make plenty of money because more people would take the leap, and at the same time help the market adoption to 64 bit. Without MS making it an easy transition price wise for platform saturation, it also won't happen. As it is, 64 bit support is growing very quickly over the last 6 months by developers, it's promising but we need a 32 bit cutoff by MS I fear, maybe with the next OS would be a good time.
BikeDude - Thursday, August 16, 2007 - link
No, 2GB is no longer the sweet spot for a gaming rig. One year ago -- sure.Even though your game will at most utilize 2GB memory, there is still a need for the OS to cache stuff, and you might have other applications running in the background. Nothing is sweeter than having BF2 not touch your hard drive after a while... (I've had 4GB memory for two+ years now)
Given how cheap memory is now, 3GB or 4GB is closer to the sweet spot.
leexgx - Thursday, August 16, 2007 - link
vista norm running you should have 2gb at least or pc mite be an little slow with 1gb with just running norm programs like norton and 1 copy of internet explore + msn printer and so on can realy lag the pc out (gameing on 1gb ram can be an drag but if the game settings are low any way mite not matter)gamers on vista should aim for 3gb min
for later on maybe just buying 4x1gb or 2x2gb ram be better so all the ram is the same and you can get 64bit windows later on or Now (seems to be working fine for me but some games perform not so well game is jumping when FPS is high)
Shawn - Thursday, August 16, 2007 - link
You can switch from Vista 32bit to Vista 64bit by just using the 64bit installation dvd. You can use your same key. You don't need to re-buy Vista.