32bit game memory usage explained

Discussion in 'Performance Support' started by ARCHIVED-deadcrickets2, Sep 14, 2011.

  1. ARCHIVED-deadcrickets2 Guest

    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. It'd be able to 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 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.
    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 2003 server family. You have to manually enable it. There is a lot of bad information on the internet in referece 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.

    How to enable the switch to avoid the memory crashes:

    Vista/7/8:
    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.


    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. ARCHIVED-TSR-JoshuaM Guest

    I'll sticky this one as it does contain great information even if we, SOE, do not support the method itself.
    While SOE does not support making such modifications, that only means that you should consult an experienced technician and/or that you are proceeding at your own risk (although these commands should have absolutely no negative impact whatsoever).
  3. ARCHIVED-Brigh Guest

    If you play Oblivion then you are / should be aware of the 4 GB patcher that simply changes a line (can do this with CFF Explorer as well if you know / read where to change it) by a simple process internally for you.
    The problem with constantly changing games like EQ II (and the auto patching of Steam in the case of Steam version of Oblivion) is the auto patcher will patch it. You will need to run the auto-updater, then use the 4 GB patcher, then launch the everquest2.exe. Perhaps someone with batch file creation knowledge could make one that would do this process automatically.

    edit 12/8/11
    It seems EQ II doesn't change it now or it has been set up to use more than 2 GB as everytime I look at the header using CFF Explorer it shows it check marked as "App can handle > 2gb addressest".
  4. ARCHIVED-Hateeternal Guest

    Very very nice, thank you very much for this explanation.
    Reduced my reloading times for like NPCs and interiors in the GH plus log-in times for minutes.
    Got a question though, how can one reverse this change if one had to or wanted to? :)
    regards
  5. ARCHIVED-Caernarvon Guest

    I'm about to try this myself as playing on a 4GB system under Vista 32-bit has become very problematic since AoD even after having bumped the graphics all the way down - everything was fine before AoD on High Performance. Updating to 64-bit is just not an option for me right now and no doubt many many others too.

    Before I go ahead and invoke it, I decided to look up how to revoke this command should my system become unstable, and the command to do go back to how things were is...

    bcdedit /set IncreaseUserVa 2048
  6. ARCHIVED-Caernarvon Guest

    Ok this has worked a treat for me with Windows Vista 32 bit 4GB RAM and a 512mb GeForce 9800GT, thank you so much! I am now able to bump my graphics back up to high performance, and bounce around between multiple highly decorated / populated zones time after time just as I was able to Pre GU62 / AoD without getting the critical errors / out of memory that have been coming up since AoD - thanks again!
  7. ARCHIVED--=Hoss=- Guest

    Wouldn't just increasng the size of your virtual memory do the same thing? Or does the OS try to suck up everything beyond a certain limit?
  8. ARCHIVED-Caernarvon Guest

    -=Hoss=- wrote:
    Well I upped my virtual memory paging file size last week to around 3 times the size of my RAM, which I read elsewhere in these forums that that would help but I continuted to experience difficulties.

    This trick worked for me though, I haven't crashed since using it, whereas previously I was crashing every other major zone change pretty much, and that was on a lower graphics setting.
  9. ARCHIVED-Therendil Guest

    Thanks for this post! Not sure if it will help, but I am going to try it.
    -= Therendil =-
  10. ARCHIVED-TSR-JoshuaM Guest

    -=Hoss=- wrote:
    No, it still would not allow a single specific application to consume over 2GB of memory by itself. This switch allows an application,such as EQII, to consume more than 2GB.
  11. ARCHIVED-Kerahzey Guest

    To JoshuaM,
    I have Win 7 with 16 Gigs of RAM, 2.8 I7 Proccessor, ATI Video Card (newer). I lag real bad during raids. I Lag real real bad when the mages throw down that lighting effect on the ground. I am on the Bazaar server will this all change when we switch to Freeport Server ?? I have 64 Bit is there anything I can do if the new server does not help ??
  12. ARCHIVED-TSR-JoshuaM Guest

    Ormeelire@The Bazaar wrote:
    Post your DXDIAG info maybe we can make recommendations now. One thing I'll note right away is that you should use GPU shadows instead of CPU and disable Point LIght Shadows (CPU).
  13. ARCHIVED-Kerahzey Guest

    Wow that one setting alone helped alot, thanks alot. You want me to post that whole file dxdiag and I have two of them one for 32 bit and one for 64 bit ?? Or should I send a private mail and not clog up the forums ?? Oh ya and how do I disable Point Light Shadows, I couldn't find that. Thanks again
  14. ARCHIVED-zenbabe Guest

    deadcrickets2 wrote:
    Ok I am perfectly willing to give this a go, but though this instruction probably seems clear to everyone else on the planet, to me it is confusing (and I -really- do not want to mess this up)
    This is what appears for me to edit in notepad:

    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /usepmtimer

    As you can see, "/fastdetect" is already in there.
    Do I add "/fastdetect switch: /3GB" to the end of that line? (After "/usepmtimer"?) (And leave the other /fastdetect where it is?)
    Or do I add "switch: /3GB" after the /fastdetect which is -already- in the line?
    Also the instruction refers to adding "switches", plural. But this is only one switch, right?
  15. ARCHIVED-Brigh Guest

    Imprint@Antonia Bayle wrote:
    He is saying add /3GB in the line that includes "/fastdetect". Plural was was just a mistake obviously since only one was mentioned.
  16. ARCHIVED-zenbabe Guest

    Brigh wrote:
    Yes it seemed obvious to me as well but you have no idea how loathe I am to make assumptions when it comes to things like this. So! To make this ultra extreme ub3r|y mind numbingly clear!
    When I add the switch that part of the file I quoted will look like this:
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /3GB /usepmtimer
    Right?
    ... or will it be this?:
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /usepmtimer /3GB
  17. ARCHIVED-deadcrickets2 Guest

    Imprint@Antonia Bayle wrote:
    The order of the switches doesn't matter in this case. However, to eliminate chance of user error it's best to add it after the last switch. So in your case the second option is best.
  18. ARCHIVED-zenbabe Guest

    deadcrickets2 wrote:
    Thank you.
    Do I need to do anything to the virtual memory setting? Right now I have the "initial size" and "maximum size" set to 4096 (double my physical RAM of 2GB)
  19. ARCHIVED-TSR-JoshuaM Guest

    Ormeelire@The Bazaar wrote:
    Click the Advanced button in the display options, its also under Shadows. How big of a jump did moving to GPU shadows give ya?
    For the DXDIAG info, the best path is to open a support ticket with it included and just post your incident number.
  20. ARCHIVED-deadcrickets2 Guest

    Imprint@Antonia Bayle wrote:
    The page file should be controlled by the operating system. It doesn't work like in the old days when it was called a swap file. Those advocating a controlled size page file are often creating unforeseen problems in programs.