A Case Study, Cont

Now that we've seen what can happen when we reach the 2GB barrier and how easy it can be to pass it, let's talk about what it took to remove it in the first place for Supreme Command. Supreme Commander is unfortunately not compiled as being large address aware and must be modified so that Windows thinks that it is. Microsoft supplies a tool as part of the Visual Studio suite, Editbin, that can do just this by rewriting the file header to report to Windows that it is in fact large address aware.

To the best of our knowledge Supreme Commander was programmed using proper programming practices and can handle the larger address space, and this is merely an issue of turning it on. However on a more pragmatic note this can break future patches, and disturbingly it doesn't set off any sort of multiplayer cheat detection in the game in spite of the fact that we have modified the executable in a very visible way. Out of the changes we need to make to deal with the 2GB barrier though, this is the safer of the two.

Update: Gas Powered Games contacted us and let us know that the modified executable not setting off any cheat detection is intentional. The game code is all in a DLL, and the executable is just a launcher; it's left unchecked because of the various Digital Rights Management systems used change the exectuable.

Changing Windows on the other hand to allocate more of the virtual address space to applications is in practice just as dangerous as we theorized earlier. We initially set our copy of Windows Vista to adjust the split to 1GB kernel mode, 3GB user mode, only for Vista to encounter a BSOD while booting. We had to settle for a 1.4GB/2.6GB split before Vista would boot, and even then Vista still periodically encounters a BSOD upon booting at that allocation or any other allocation other than 2GB/2GB. While what problems may occur and with what values is highly variable from system to system, this is why trying to move the barrier at all can be dangerous.

Having made the above changes, we also used the chance to take a look at system performance both in and outside of Supreme Commander, taking interest in to the effect of allocating more user mode space. As we theorized before, taking space away from the kernel may impact performance, and this is something that needs to be tested. For this we ran a cut-down version of our normal system test suite, with allocations of 1.4GB/2.6GB, 1.7GB/2.3GB, and the default 2GB/2GB.

Software Test Bed
Processor AMD Athlon 64 4600+
(2x2.4GHz/512KB Cache, S939)
RAM OCZ EL Platinum DDR-400 (4x512MB)
Motherboard ASUS A8N-SLI Premium (nForce 4 SLI)
System Platform Drivers NV 15.00
Hard Drive Maxtor MaXLine Pro 500GB SATA
Video Cards 1 x GeForce 8800GTX
Video Drivers NV ForceWare 158.45
Power Supply OCZ GameXStream 700W
Desktop Resolution 1600x1200
Operating System Windows Vista Ultimate 32-Bit
.

Starting with Supreme Commander, the only test here that can even utilize more than 2GB of user space, we do find a minor but consistent variation in performance. Increasing the user space improved Supreme Commander performance by about 1 frame per second, which at around a 3.5% performance improvement is right along the edge of either being significant or a normal variation. We repeated this test several times just to make sure that it wasn't a variation and the results remained consistent, so it doesn't appear to be a variation. With that said the instability caused by adjusting the user space size does not justify the extremely minor performance improvement.

Going down the list of benchmarks, we find that there is no notable change in performance in any of our benchmarks. Since none of these benchmarks are capable of using more user space we weren't expecting an increase, but this puts to rest the idea of a performance decrease. There does not appear to be a performance decrease in adjusting the user space size; if it boots it'll perform well.


A Case Study: Supreme Commander Other Problems, Other Solutions
Comments Locked

69 Comments

View All Comments

  • brink - Thursday, July 12, 2007 - link

    it's a 2 prong solution for WinXP, you have to set a /3GB flag in your BOOT.INI file for the instance of windows you're booting. Additionally since Supcom doesn't have the LARGEADDRESSAWARE flag, you have to patch the EXE using the tool mentioned in the article ((someone created a batch that uses the tool to patch the supcom exe, easily found in the official supcom forums)

    I mention this since the article doesn't really say how they did it (and they used Vista, which is another boc to contend with) Since HardOCP did a comparison a while back between supcom perf in XP and Vista, I've really only installed/used supcom in XP still. With our fix for a 4GB machine (the machine I regularly use still has 2GB, I just stay away from 81KM maps) XP has still remained stable, but we did have one crash in a 40KM map game on Gentleman's Reef.

    I don't like the article's preference on FPS in Supcom, mainly because I don't look at Supcom as a FPS centric game at all. If you've played, you know when a slow computer enters the game (or you have 7 computers each with 1,000 units on a 81KM map) the in-game timer will start to crawl. 1 second of game time will take 2 seconds, or much much worse. It would have been approx 100x cooler if the bench was "it took this much before the timer started to skew".
  • jay401 - Thursday, July 12, 2007 - link

    lol funny, now that I am paging through the article I see you mention this very issue. Good!
  • jay401 - Thursday, July 12, 2007 - link

    Well you didn't address the 'WHY' - why the game uses so much memory. Hopefully I provided a little light on that subject.

    Also on Page 5 none of your graphs are labeled as to what they are measuring. Please note if they're measuring fps, which is my gut but I'm not sure because they are unlabeled.

    Thanks.
  • MadBoris - Thursday, July 12, 2007 - link

    quote:

    Well you didn't address the 'WHY' - why the game uses so much memory. Hopefully I provided a little light on that subject.


    Although you are right in part, the lead engineer did mention the units are one reason for large memory consumption. (BTW, I had heard that they are all being/were rerendered for November). There is another issue beyond that though that becomes obvious. The initial virtual address space at the beginning of a game between a 20k map and 81k map is only about 150MB difference. But as unit count climbs, the larger map gap grows somewhat exponentially compared to the smaller. So something else is askew.

    As Ryan mentioned the whys and wherefores aren't really the point, this issue is a global one and 2GB is a real hard limit now for games since we have the horsepower(CPU & GPU) for larger memory consuming texture maps, larger resolutions, yet the 2GB memory limit for a game is a definitive roadblock to forward progress so I am glad the issue is coming to the forefront.

    As much confusion and fear there is on this /3GB subject for the laymen, this is still a great rabbit in the hat for us with 32 bit OS's if more driver writers get on the ball, fears can subside. Hopefully devs like Crytek can continue to push demand for 64 bit with a nice 64 bit Crysis patch too, and we can start making the transition leaving 32 bit behind as drivers/apps also make the transition.

    I think articles like these help the cause.
  • Ryan Smith - Thursday, July 12, 2007 - link

    To be honest, we didn't address why because it really isn't relevant. Even if Supreme Commander was done perfectly in every way, the result would have been the same once it reached the 2GB barrier.
  • gigahertz20 - Thursday, July 12, 2007 - link

    They should have made Vista only 64 bit to put pressure on the transition.
  • johnsonx - Friday, July 13, 2007 - link

    The problem with going 64-bit only this time around is that there are too many 32-bit programs around that simply won't run on 64-bit windows. I have several myself that I depend on daily. They are slightly older programs that the developer doesn't intend to upgrade to be 64-bit, but that doesn't change the fact that I need them. If these apps didn't work with Vista because it was released in 64-bit only form, then I wouldn't be running Vista. Millions of others are (or would be) in this same situation, which would significantly harm Vista sales.

    If the next version of Windows were made 64-bit only, around the 2010 time frame, I think that would be quite reasonable. By then most 32-bit only programs will have been replaced or rendered obsolete.

    I think Microsoft has handled the 32/64-bit issue correctly so far, for the most part. XP64 should have been ready sooner and should have been better supported though.

    Related question for anyone who knows: I know retail Vistas include 32-bit and 64-bit on the same disc, and the user is free to install either. I also know that OEM Vistas include only the one version on the disc. What about the OEM keycodes though? Can you install a 64-bit Vista using the keycode that came with a 32-bit disc? Or has MS limited the keycode as well?
  • StygianAgenda - Thursday, June 5, 2008 - link

    To answer your question about the Windows Vista Retail package, I have 2 copies of Vista Ultimate retail, and it was packed with 2 DVDs, 1 is 32bit, the other is the 64bit build.

    The set comes with a single key, and the key is bound to the 64bit version, so if you opt to use the 32bit version instead, you'll most likely have to call into Microsoft's activation center and manually activate your copy. I've had to do this 4 times now, due to hardware changes, because Vista detects system changes, so if you remove 1 or 2 boards and boot into Vista, the system will automatically de-activate. Now, granted, the call to MS was fairly painless, but it's annoying all the same.

    Out of the 4 Vista systems I own currently (3 of which are laptops), I've had great success with the OS, itself. Unfortunately for me, the motherboard I've been using on my custom built workstation is flaky... I've done my research though (tonight), and might have a fix in the works, if it works, that is. Otherwise, I'll be ordering a new motherboard, and calling Microsoft yet again to transfer my license to the new configuration. By the way, they always ask "Is this copy running on more than one PC?". In light of all the hoopla over the licensing scheme in Vista, I would hope that no one is stupid enough to try to use a Vista Retail license on multiple PCs, because it'll cause all of them to be blacklisted. Oh, and the new Vista Enterprise edition is only available in lots of 25 licenses or higher, and requires a licensing server on the LAN with the deployed workstation licenses. It's either that, or expect to have a couple of extra hundred MB or so of net traffic from all of the Vista Ent. workstations checking in with MS everytime the systems are booted. Makes me glad that I also work with Linux very heavily, and all things considered, if Linux + WINE can run all of my criticle Win32 apps, then this will be the last Vista Licenses that I buy. I'll still keep Vista on my laptops, and I'll continue to run my XP workstations, and 2K3 servers, but MS is going to have to really do some impressive work to get me convinced to migrate to their next platform... such as maybe... a *real* 3D desktop... which is already available, stable and totally badass on Linux (check out Kubuntu + compiz).

    (btw: Sorry if I seem like I'm on a rant here... no offense intended toward the readers, at all... it's just that when you work with OS's at the level that I do, after a while stupid mistakes made by OS vendors start to get beyond aggrivating.)
  • instant - Saturday, July 21, 2007 - link

    And when we are talking about GAMES, how if at all is this relevant to the current discussion?

    x64 has been the way to go ever since it was released.
  • miahallen - Saturday, July 14, 2007 - link

    That is incorrect, Vista x64 will run x86 apps without problem (so will XP x64), that's the nice thing about it. I ran x64 for quite a while, and ran almost nothing but x86 apps on it.

    The keycodes for x86 do not chnge for x64 installs...they use the same key. And the retail versions I bought did not have both versions on one disc, I had to order a x64 disc online (and pay $10 for S&H).

Log in

Don't have an account? Sign up now