32bit EQ2 and your gaming experience

Discussion in 'Players Supporting Players' started by Drunk Ninja Monkies, Nov 11, 2012.

  1. Drunk Ninja Monkies Member

    I thought it might be a good time to do a very simplified post as to why a 32bit application such as EQ2 is limited to 2Gb on a 64bit operating system.

    The main idea behind a 64bit operating system is to allow a computer to use beyond 4Gb of RAM, use larger datasets and in theory run faster than a 32bit operating system. When you run a 32bit application such as EQ2 it is limited to the 2Gb RAM limitation that is not automatically extended by the operating system.

    Therefore you can run into a situation where the game can crash due to a memory error.

    There are exceptions such as when an application is using the flag IMAGE_FILE_LARGE_ADDRESS_AWARE. EQ2 is, by default, using this flag. And certainly any DirectX 10 rendering pathway game such as Skyrim makes use of it. However, EQ2 is a DirectX 9.0c rendering pathway game and is still limited to 2Gb despite the IMAGE_FILE_LARGE_ADDRESS_AWARE flag. This may change in the future but for now it's what we have.

    One way around it is to use a switch recommended by Microsoft. The way to use the switch varies based on whether you are using Windows XP or Vista/7/8. Essentially what you are making use of is called 4GT. 4GT per Microsoft:

    "The technology called 4-gigabyte tuning (4GT), also known as application memory tuning, or the /3GB switch, is one of two technologies that increase the amount of physical memory available to user mode applications."

    "4GT makes more of the computer’s virtual memory available to applications by making less virtual memory available to the operating system. By enabling 4GT, applications are able to access 3 GB of virtual memory instead of the 2 GB normally allocated for user mode processes. This is a 50 percent increase in virtual memory, allowing more data to be cached and potentially significantly increasing performance

    Again, per Microsoft, this is not automatically done except on the Windows server family. You have to manually enable it. There is a lot of bad information on the internet in reference to this and many other switches available on the operating system. I suggest users only follow legitimate sources, such as Microsoft itself, to determine if this is right. As always, this solution is not endorsed by SOE. Do not use this switch on Windows x32!

    How to enable the switch to avoid some memory crashes:

    Vista/7/8 x64:

    Click on the Start menu, type in cmd.exe. Right click on cmd.exe and click Run as Administrator. Once the command window pops up type in bcdedit /set IncreaseUserVA 3072 and press enter. Restart your computer.

    If you need to undo it simply repeat what you did prior but change the command to bcdedit /set IncreaseUserVA 2048.

    On Windows XP x64:

    1. Right-click My Computer and select Properties. The System Properties dialog box will appear.
    2. Click the Advanced tab.
    3. In the Startup and Recovery area, click Settings. The Startup and Recovery dialog box will appear.
    4. In the System startup area, click Edit. This will open the Windows boot.ini file in Notepad.
    5. In the [Operating Systems] section, add the following switches to the end of the startup line that includes the /fastdetect switch: /3GB
    6. Save the changes and close Notepad.
    7. Click OK two times to close the open dialog boxes, and then restart the computer for the change to take effect.

    These changes are not meant for systems that have under 4Gb of system RAM nor a computer using integrated graphics as the integrated graphics shares system RAM.
  2. Salavar Active Member

    So if my system is operating well, the game is operating well, I have no crashes and I am running a 64 bit system are there any advantages / disadvantages to enabling this?
  3. TSR-AlexS Well-Known Member

    Thanks for posting this Drunk Ninja (Dig your forum name)! Very good info :D
  4. Drunk Ninja Monkies Member

    Technically speaking there are no disadvantages for enabling this.
  5. Salavar Active Member

    I enabled it and EQ2 was using 2.9 Mb I saw no improvements in game but I will leave this enabled for a few days to see how it goes.
  6. Arweena New Member

    So on the page linked by Drunk Ninja Monkey it specifically states:
    'On 64-bit editions of Windows, 32-bit applications marked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag have 4 GB of address space available.'

    So if EQ2 has the IMAGE_FILE_LARGE_ADDRESS_AWARE flag and you are running a 64-bit windows modifying the switch would only DECREASE the amount of available memory for the application there by making it run worse not better.

    Now if you are running an x86 ( AKA 32-bit version of widows ) then modifying this switch could have an impact.

    I think there's a little bit of a misunderstanding on someones part here of exactly how all this memory addressing works. If you really want to know more about how the 64-32 bit memory management is done I would recommend reading up on it in the MSDN http://msdn.microsoft.com/en-us/library/windows/desktop/bb427430(v=vs.85).aspx Though I will warn you that unless you are a programmer 99.9% of it will probably make no sense.

    A page from the MSDN that might make this information a bit more clear - scroll down to the table, top entry right hand side you will see that if the IMAGE_FILE_LARGE_ADDRESS_AWARE is cleared there's a 2GB limit if it is set there is a 4GB limit for a 64-bit edition of Windows. where for the x86 (32-bit edition) it is a 2GB Up to 3GB with the flag and 4GT set
  7. Avirodar Well-Known Member

    If the OP is who I suspect, I tried explaining that very same thing in a thread on the old forums.

    However, they insisted the resource monitor on my PC is wrong, that it was impossible for EQ2 to use more than 2GB of RAM even though I got mine up to 2.8GB (must be magical phantom pagefile data??), or that I had somehow magically activated 4GT in my sleep...

    When it comes to changing system settings, I advise people to proceed with extreme caution. Do not take some random forum posters advice. Look into it for yourself, read all the documentation, not conveniently selected snippets from a section revolving around a 32 bit OS), and ensure you are confident and understand what is being done. This is nothing like changing a desktop wallpaper...

    I am all for helping people improve their EQ2 experience, and I commend the OP for attempting to do just that. But trying to be helpful and actually being helpful are not always guaranteed to go hand in hand.
  8. Drunk Ninja Monkies Member

    DirectX 9.0c applications are capped at 2048. Thus, they actually gain the amount of memory available from the flag. Instead of 2/2 applications/WOW64, it's 3/1.

    Per Microsoft:

    "If an application creates its own in-memory copy of its video resources, or the application uses DirectX 9 or an earlier version, the virtual address space contains the WDDM video memory manager's virtualized range and the application's copy. Applications that use graphics APIs that are earlier than DirectX 10 and that target GPUs that have large amounts of video memory can easily exhaust their virtual address space."

    So when you see a DirectX 9.0c application, such as EQ2, using 2.9Gb of RAM it's not what it's really using. You are seeing the video card's memory addressing plus the game's memory usage as video card RAM is copied into system RAM.

    Yes, it's confusing and you have to understand the way Windows works to be able to follow it all.

    I'll give an example. Let's say you have 4Gb of system RAM with 2 x 1Gb video cards in SLI. Per SLI it only uses the RAM on ONE of the video cards. Since that's 1Gb of RAM you automatically subtract 1Gb of system RAM under a DirectX 9.0c game under a 64bit operating system. That leaves you with 3Gb of usable RAM. The default for Windows is 2048 per 32bit application before this switch. Which is why I tend to recommend it mainly for those with 4Gb of RAM or preferably higher.

    * Also of note:

    "To enable an application to use the larger address space, set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the image header. The linker included with Microsoft Visual C++ supports the /LARGEADDRESSAWARE switch to set this flag. Setting this flag and then running the application on a system that does not have 4GT support should not affect the application."

    Another thing to keep in mind is that IMAGE_FILE_LARGE_ADDRESS_AWARE does nothing unless it's set in a very specific way.

    This was found to be extremely useful for gamers on the prior forum. Most found it to fix their crashes and it's often mentioned in-game as well. The issue isn't so much them using IMAGE_FILE_LARGE_ADDRESS_AWARE. It's them properly compiling with with the right switches and they have coded properly references to the memory pointers.

    "Since the high bit of a pointer referencing an address below 2GB is always zero, they would use the high bit in their pointers as a flag for their own data, clearing it of course before referencing the data. If they ran with a 3GB address space they would inadvertently truncate pointers that have values greater than 2GB, causing program errors including possible data corruption."
  9. Wirewhisker Well-Known Member

    So for those at home that are not tech-heads or tinkerers, what would this switch be likely to improve, if anything? Would it be likely to increase system instability? What about multi-boxers who multiply instances of EQ2 on one system?

    It's cool to see a nifty feature and want to suggest it to the masses, but you want to be aware of potential downsides and point them out.
  10. TSR-AlexS Well-Known Member

    Avirodar is correct, and after reviewing the post once more, this isn't a simple change.
    Avirodar, thank you again for bringing it to my attention.
  11. Drunk Ninja Monkies Member

    It won't really assist multi-boxers. The best thing for a multi-boxer to do (at least what I do) is to have the copies of EQ2 installed in different locations. You have your main copy with the settings you want, then you have the other copies with everything set to minimum (beyond the minimum extreme performance) and with the multiple core feature turned off in options. I know that a growing number of boxers use programs like IsBoxer and I think it'd be great if someone were to create a thread on how to properly box!

    Stability wise it does help. Just be aware that there will still be rare moments when the game may crash.
  12. Drunk Ninja Monkies Member

    I've already addressed their concerns and explained why they are seeing what they are seeing. I do, still, want to thank Avirodar for bringing it up in the first place as it did force me to study into it more all those months go and talk directly with some MSVPs to find out more. I will note that occasionally I did get some conflicting answers but as you guys can see... it's complex under the hood.

    The old thread: http://forums.station.sony.com/eq2old/posts/list.m?topic_id=506883

    You will see that many found it stopped their crashing in that thread. It was also pointed to often across the rest of the tech forum.
  13. Arweena New Member

    So you have now contradicted yourself. you said that turning the flag on would allow the app to use more than 2GB yet you are now saying that because it's a DX9.0c app that it's limited to 2GB. Can't have it both ways sorry. Also in your link to the WDDM_VA.doc there it specifically states on page 3 under the heading 'Virtual Address Space Limits in 32-Bit Windows'

    'the long-term solution is to migrate such applications to 64-bit platforms'

    Drunk Ninja Monkies, so far everything you have linked to is directed to running on a 32-bit OS, and provided that someone is still running a 32-bit version of windows I agree that using this flag could help them if they have 4GB or more installed in their system and are running into issues.

    For those on 64 bit windows I would recommend increasing the amount of Virtual memory allowed for the paging file if you are running into issues with the amount of memory available to your system
  14. Toran Member

    If you are still using a 32bit system you are just hurting yourself. Upgrade, any $200 computer with a 64bit OS would be a improvement over a 32bit system.
  15. Arweena New Member

    For anyone who may have done this "fix" in hopes of improving performance on a 64-bit OS that is now getting that nice little pop up that says that windows has detected that you system may not be running properly go into the command prompt and use the following command to reset the VA back to the default 4GB
    'bcdedit /set IncreaseUserVA 4096'
  16. Junih New Member

    Not everyone has a budget of 200 dollars to blow on a new OS. This isn't the early 2000's where everyone has job andf everyone has money.
  17. Junih New Member

    Im guessing by this post Windows XP 32 bit can't do this huh?