April 5th update 'Lag' Issues: Memory management & -heapsize switch

Dominar

Pre-Searing Cadet

Join Date: Apr 2007

Canada

E/Me

1st post, so go easy


After looking at all the available info I'd like to propose a possible solution to the low FPS and spiking issues many have been experiencing. This solution is provided assuming that you system was running GW just fine before the 'update'. First I'd like to review the usual suspects.

Sound update. I believe this to be a non-issue as many, including myself, have run the -nosound switch and still receive the same poor performance.

Graphics update. Nothing added by Anet(whether it be polys or textures) should be creating the 'spike' effects with the graphical power available in today's systems. Most of the players posting these issues have great specs, more than enough power to run GW. Another non-issue.

Network code. Anet has not stated that any changes were made to the network code. At this point another non-issue.

Memory management. Anet removed the switch -heapsize for the Apr.5 update. This switch allowed users to allocate memory specifcally for GW. With this knowledge I started to watch my hard drive activity during these 'spikes'. As it was, all spikes were concurrent with hard drive activity. It would appear that the constant swapping of data during gaming was creating the 'lag spikes' I was experiencing.

This procedure helped the FPS and spike problem on my system and my girlfriends. No only that, it was faster than ever. I would like to disclaimer that this involves entering and changing the registry. I take no resonsiblity for your own errors, advice given, etc...

I have my pagefile(swapfile) set to a single size(min/max)... 1024mb, therefore the pagefile will not resize while playing GW or using any other program for that matter. Here's how to change the pagefile size...

Right click on 'My Computer' to bring up a small pop-up menu. On this menu, click on 'Properties' to bring up the System Properties window. Click on the 'Advanced' tab. In the Performance window, click on the 'Settings' button. Click on the 'Advanced' tab on the top. In the Virtual memory window, click on the 'Change' button. Select the 'Custom size' option. Setting the 'Initial size' and 'Maximum size' to the same value. I use 1024mb, more than enough to run GW on systems with 512mb+ memory. Click 'Ok', then 'Ok' and reboot.

Tip... Before I defrag I select 0/0 for the 'Initial size' and 'Maximum size' and then select 'No Paging file'. This allows the area on your your hard drive which was used by your pagefile to be defragged as it is no longer there. After the defrag I reboot and reactivate the pagefile(as above) to it's previous state on a freshly defragged drive

The next two registry settings change the way XP handles file system cache, driver and code paging. To find and alter these keys...

Click on 'Start', than 'Run', then type regedit, then 'Ok'.(If you have no experience with 'regedit', do some research first as you can damage your registry if you delete/change/move a crucial entry)

Go to to the following key..

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management

The settings we are looking for are...

DisablePagingExecutive and LargeSystemCache.

DisablePagingExecutive - double click the entry and set the value data to 0 (it may be already set to 0 as it is XP's default setting). This will allow the kernal driver and code to reside in the pagefile when not in use.

LargeSystemCache - double click the entry and set the value data to 1. This will allow XP to keep large amounts of data in memory instead of paging it from the hard drive.

After applying these changes, reboot.

Run GW and let me know.

If this does not help, then I apologize for wasting your time and getting your hopes up.


Cheers.

Kuldebar Valiturus

Kuldebar Valiturus

Desert Nomad

Join Date: Nov 2006

Garden City, Idaho

The Order of Relumination (TOoR)

R/

It may be a solution and worth a try.

NOTE TO READERS:

Please take caution when editing your Windows System Registry, attention to detail and registry back-ups are a good idea if you are new to this type of tweaking.



Quote:
Easy Way to Adjust LargeSystemCache
Posted 8/12/2002 by TweakXP Member
Normally, the tweak I've seen asks you to go into HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management and change the value to either O or 1 to the adjustment the
LargeSystemCache.


However, in Windows XP, all you have to do is:


1. Right click My Computer
2. Select Properties
3. Click Advanced
4. Choose Performance
5. Click Advanced again
6. Select either Programs or System Cache under Memory Usage.

Programs = 0 for the registry tweak equivalent
System Cache = 1 for the registry tweak equivalent

EntityMaster

Ascalonian Squire

Join Date: Jul 2006

OMG! Thanks a lot Dominar! I've been having low fps issue since the April 5th update, and you LargeSystemCache method TOTALLY solve my issue, even though my machine has vista. Now I can successfully turn on 4x AA without a huge drop in fps. I strongly recommend using Dominar's method if you experienced spikes and fps drop, especially vista users who have similar problems. You're the best Dominar!

EDITED: lol nvm, empty hope, I feel so stupid when I realize the fps problem still persist in nightfall maps. I guess it helps a bit though...

Chianna

Chianna

Frost Gate Guardian

Join Date: Jan 2007

BC

R/Mo

Being a laptop gamer it took a bit to get Guild Wars to run smoothly on my rig in the first place but after the April 5th update I truly wanted to cry, that or go back to playing CS ... the majority of the towns were choppy at best & the battles & outside areas in general were giving me headaches from the pausing & jumping, 10 fps is Completely Unplayable!

BUT!! Since I did this tweak I have experienced absolutely amazing results! No more huge evil lag spikes or rubber-banding issues & I have recieved, on average, a 10-20 fps increase from my pre 'update' game in all maps... including Nightfall where I spend the majority of my time

Thank You kindly Dominar!! You are my Hero

-Chianna

Wrath Of Dragons

Wrath Of Dragons

Burninate Stuff

Join Date: Aug 2005

New Mexico

E/Mo

A tad confused, looking at the XP verson that doesnt use the registry tweak.
(Kuldebar's post)
Do i set priority to programs or cache?

http://i143.photobucket.com/albums/r...untitled-5.jpg

Kuldebar Valiturus

Kuldebar Valiturus

Desert Nomad

Join Date: Nov 2006

Garden City, Idaho

The Order of Relumination (TOoR)

R/

Wrath, unless the LargeSystemCache entry is added to the registry by the user or a program, the only way to set it is via this method:

1. Right click My Computer
2. Select Properties
3. Click Advanced
4. Choose Performance
5. Click Advanced again
6. Select either Programs or System Cache under Memory Usage.

Your screenshot shows me that you currently have the following setting:

Programs = 0 for the registry tweak equivalent <----------THIS SELECTED
System Cache = 1 for the registry tweak equivalent

And, of course, Memory Usage is the section that applies to this tweak and not Processor Scheduling.
================================================== ==============================

While we are on the subject of Tweaks, some of you may wish to take a look at this link.

The usual caveats apply: be careful, don't forget to backup your registry and generally don't do something you are unsure about.

Wrath Of Dragons

Wrath Of Dragons

Burninate Stuff

Join Date: Aug 2005

New Mexico

E/Mo

so i would want to hit the "system cache" button instead of "programs"?
is this going to mess with the performance of something like 3DSmax or adobe photoshop?

Kuldebar Valiturus

Kuldebar Valiturus

Desert Nomad

Join Date: Nov 2006

Garden City, Idaho

The Order of Relumination (TOoR)

R/

Quote:
Originally Posted by Wrath Of Dragons
so i would want to hit the "system cache" button instead of "programs"?
is this going to mess with the performance of something like 3DSmax or adobe photoshop?
That is correct. And, when you want to change it back, you can easily do so.

Concerning: 3DSmax...memory intensive programs shouldn't be negatively impacted assuming you have a healthy amount of RAM in your PC.

Here's an opinion on the CON side of the Large System cache Tweak:

Quote:
Large System Cache

Most tweaking applications think Enable Large System cache will increase I/O speed of the file system -

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management]

"LargeSystemCache"=dword:000000001

This setting is also achieved by going to Start > Settings > Control Panel > System > Advanced > Performance Settings > Advanced > Memory usage = System Cache.

Under XP this tweak could be of some value under various odd circumstances. However, it causes problems with many drivers/hardware/applications. This tweak is really designed for machines running as a server. If you use this tweak and have problems don't be whining at the driver/application writers for writing code that takes advantage of the way XP uses memory. They didn't ask you to turn your machine into a server.

Taala

Taala

Krytan Explorer

Join Date: Nov 2006

FPS hasn't been an issue for me after the update, only the annoying freezing. Unfortunately this trick did nothing to improve that.

Kuldebar Valiturus

Kuldebar Valiturus

Desert Nomad

Join Date: Nov 2006

Garden City, Idaho

The Order of Relumination (TOoR)

R/

Renamed thread topic.

The OP believes an underlying change in the Guild Wars' memory usage, related to the removal by ANet of the -heapsize switch, may be the cause of recent lag snag issues.

Pickletron

Pickletron

Lion's Arch Merchant

Join Date: Jun 2006

Australia

[Godz]

R/Mo

Doing everything he said step by step 100% helped! My game runs even better than before the update
Just wondering though.. Why did i have to do all this to get my computer running so well? Shouldn't it be set like this on default? What's the "catch"? :S

Kuldebar Valiturus

Kuldebar Valiturus

Desert Nomad

Join Date: Nov 2006

Garden City, Idaho

The Order of Relumination (TOoR)

R/

I've been running a little test of my own the last day and a half using the LargeSystemCache and switching back to normal, etc.

Dominar's Tweak works for me, your mileage may vary.

Without it, I had these freezes regularly, especially when turning corners, going up stairs and general turning.

This tweak seems to alleviate the freezes. <which were really horrendous in Cantha>

My feeling is though that ANet needs to fix this issue that seems to be impacting a fair number of us since the last major update and not before. We shouldn't have to trick our PC's into acting like a server in order to play.

Additionally, these settings can cause issues with other windows programs and some drivers, so there is a risk. Now, I'm willing to take that risk so that I can have smooth, non-annoying play, but if you make the decision for yourself, just know there can be complications with some systems.

Do not attempt to do this work around on a RAM starved system, I've posted some additional disclamatory information below...


Quote:
The "LargeSystemCache" registry entry forces XP to allocate all but 4MB of system memory, that is system memory, not available RAM, to the file system cache. The remaining 4MB of system memory is used for disk caching, though XP will allocate more memory if it is needed.

A modern hard disk will transfer sequential data to and from disk at up to 40MB per second, or even faster on some of the more expensive drives, but the LargeSystemCache tweak means that effective transfer speeds of 1GB per second or more can be obtained, depending on the amount of RAM in your system and its operating speed. This is achieved because the LargeSystemCache modification causes the OS to store data in RAM after it is read from disk. It means that the OS is always using the optimum amount of RAM instead of leaving it untouched for future use that may or may not occur. Without this part of the tweak, 200MB or more of RAM in a typical 512MB machine goes completely unused.

Some I/O intensive applications may take a hit in performance from changing the LargeSystemCache, so this particular component of the tweak should not be applied to a system that is running either SQL Server or Internet Information Server (IIS) because both of those applications perform their own caching. SOURCE
Quote:
"LargeSystemCache determines whether the system maintains a standard size or a large size file system cache, and influences how often the system writes changed pages to disk. Increasing the size of the file system cache generally improves file server performance, but it reduces the physical memory space available to applications and services. Similarly, writing system data less frequently minimizes use of the disk subsystem, but the changed pages occupy memory that might otherwise be used by applications. On workstations this increases paging and causes longer delays whenever you start a new app. Simply put enable this on a file server and disable it on everything else." - SOURCE

"System cache mode is designed for use with Windows server products that act as servers. System cache mode is also designed for limited use with Windows XP, when you use Windows XP as a file server. This mode is not designed for everyday desktop use. When you enable System cache mode on a computer that uses Unified Memory Architecture (UMA)-based video hardware or an Accelerated Graphics Port (AGP), you may experience a severe and random decrease in performance. For example, this decrease in performance can include very slow system performance, stop errors, an inability to start the computer, devices or applications that do not load, and system instability. The drivers for these components consume a large part of the remaining application memory when they are initialized during startup. Also, in this scenario, the system may have insufficient RAM when the following conditions occur:

- Other drivers and desktop user services request additional resources.
- Desktop users transfer large files.

By default LargeSystemCache is disabled in Microsoft Windows XP." SOURCE

Matsumi

Matsumi

Jungle Guide

Join Date: Mar 2006

Hey, this really helped out a bit, thanks for the info. Whenever I was experiencing huge lag spikes I also noticed my hard drive was crunching away. Never really thought too much about the system cache setting. I had already optimized the pagefile, but this was kind of the icing on the cake to get rid of the lag I was having. Thanks.

Kadavra Remnor

Kadavra Remnor

Academy Page

Join Date: Feb 2007

W/

to those of you saying dominar's registry tweak does the trick... is that with or without any shortcut switches added? i'm going to give it a try as well and see if it makes a difference.

Mineria

Mineria

Krytan Explorer

Join Date: Apr 2007

Denmark

Dragonslayers Of The [Mist]

W/Mo

Didn't test this since my windows was already tweaked to the max.
But if that really is the case, there is a memory leak issue in the game engine.

And no, there is no risk in using a large system cache, I never had problems running servers with IIS, MySQL and Java ever with large cache turned on.
Remember you can tweak those app's as well.

LargeSystemCache is for running the Windows kernel in ram instead of running it in virtual memory.
Code:
Changing the value of the key LargeSystemCache from 0 to 1 will tell XP to allocate all but 4MB of system memory to the file system cache, allowing the XP Kernel to run in memory. 
The 4MB of memory left is used for disk caching, if more is needed, XP allocates more. 
Generally, this tweak improves performance by a fair bit but can, in some intensive applications, degrade performance. 
You should have at least 256MB of RAM before attempting to enable LargeSystemCache.
From my own exspirience this tweak will not decrease performance in anny way if you got enough ram!

For conservatve swap file usage Disable Paging Executive applys.
Code:
XP pages data from RAM memory to the hard drive. 
We can stop this happening and keep more data in RAM, resulting in better performance. 
Users with a large amount of RAM (256MB+) should use this setting. 
The setting we change to disable the ’Paging Executive’, is DisablePagingExecutive. 
Changing the value of this key from 0 to 1 will de-activate memory paging.

Dominar

Pre-Searing Cadet

Join Date: Apr 2007

Canada

E/Me

Quote:
Originally Posted by Kadavra Remnor
to those of you saying dominar's registry tweak does the trick... is that with or without any shortcut switches added? i'm going to give it a try as well and see if it makes a difference.
No switch needed. Some have said using the -dsound switch makes a difference, but I have found it faster without.

For the record, I am using an onboard ALC882 Realtek EAX compatibale soundcard. Before the update I had always used - Hardware 'on'(slider center) with EAX 'on' with zero issues. I can run the same settings using the LargeSystemCache set to 1.

Hope this helps.

Dominar

Pre-Searing Cadet

Join Date: Apr 2007

Canada

E/Me

Quote:
Originally Posted by Mineria
But if that really is the case, there is a memory leak issue in the game engine.
That thought had crossed my mind too.

Quote:
Originally Posted by Mineria
And no, there is no risk in using a large system cache, I never had problems running servers with IIS, MySQL and Java ever with large cache turned on.
Remember you can tweak those app's as well.
Good to hear, since those were the noted apps that one may have problems with I personally have had zero performance issues using the LargeSystemCache setting on several systems, included laptops.

Cheers.

daraaksii

daraaksii

Desert Nomad

Join Date: Oct 2005

That helped me a lot! The game still showing ~50 FPS but it's like 70-80! Very nice guide, thanks!

onerabbit

onerabbit

Grotto Attendant

Join Date: Mar 2006

Thanks to all the guru [mods]

Quote:
Originally Posted by Taala
FPS hasn't been an issue for me after the update, only the annoying freezing. Unfortunately this trick did nothing to improve that.
Damn.. exactly what im getting

Lord Natural

Lord Natural

Wilds Pathfinder

Join Date: Jul 2005

Canada

Black Crescent [BC]

W/

Nice post. While your method did improve my overall fps and game performance, it hasn't solved the lag spikes in certain areas. For example I can have a steady 50 fps then rotate my screen and have it simply freeze for about a second, presumably to load. Not a big deal in PvE, but annoying as hell in pvp. This didn't happen prior to the update.

Is anet even going to bother to fix this? 12 days and counting now for a fairly serious game flaw.

Lagg

Lagg

Wilds Pathfinder

Join Date: Jun 2005

W/

Same problem here.

FPS are high and stable, but I do get that annoying freeze.

LargeSystemCache and -dsound seems to help some, but it's still there.

Kuldebar Valiturus

Kuldebar Valiturus

Desert Nomad

Join Date: Nov 2006

Garden City, Idaho

The Order of Relumination (TOoR)

R/

Quote:
Originally Posted by Kadavra Remnor
to those of you saying dominar's registry tweak does the trick... is that with or without any shortcut switches added? i'm going to give it a try as well and see if it makes a difference.
Yes, run the game the way you normally do.

You may find it easier to select the LargeSystemCache via this procedure:


Quote:
Normally, the tweak I've seen asks you to go into HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management and change the value to either O or 1 to the adjustment the LargeSystemCache.

However, in Windows XP, all you have to do is:
  • Right-click My Computer.
  • Select Properties.
  • Click Advanced.
  • Choose Performance.
  • Click Advanced again.
  • Select either Programs or System Cache under Memory Usage.

    Programs = 0 for the registry tweak equivalent
    System Cache = 1 for the registry tweak equivalent
  • On NT Server (in this case XP), the Large System Cache option is enabled, but disabled on Workstation. The two different settings effect how the cache manager allocates free memory. If the Large Cache option is on, the manager marks all the free memory, which isn't being used by the system and/or applications, as freely available for disk caching.
  • On the flip-side (with a small cache), the manager instead only sets aside 4MB of memory for disk caching in an attempt to accelerate the launch of applications. Or in a more technical approach, if enabled the system will favor system-cache working sets over process working sets (with a working set basically being the memory used by components of a process).
-source

Hengis

Hengis

Wilds Pathfinder

Join Date: Apr 2006

London

Better Than Life (BTL)

R/

I tried this fix last night, and it has helped to a degree.

My frame rate is now somewhat better, but still not as good as it used to be and I still have to have AA turned off. Worse than that are the "lag spikes" that others are also reporting. These are most noticable when you rotate your point of view.

This is really quite frustrating. My PC (Core2Duo E6700, Geforce 7950GT, 2gig ram, Soundblaster X-Fi Extreme) should absolutely eat Guild Wars for breakfast - and it always has done up until this update.

Thanks to the OP for the suggestion - it has certainly made the game more playable again.

Hopefully we will see a real fix for this issue soon.

Sofonisba

Sofonisba

Desert Nomad

Join Date: Jun 2005

Tucson, AZ

The Black Hand Gang [BHG] and The Black Helm Gang [BHeG]

I seem to be in roughly the same boat as Hengis. The tweak helped, I went from 3-22 fps to 30-40 fps, but -- and this may be unrelated, I know very little about computers -- still get lag spiking at the first battle of any zone, and occasionally when rotating pov.

Makes PvP pretty well impossible, especially in "quickstarting" fights like RA and TA. :/

Mineria

Mineria

Krytan Explorer

Join Date: Apr 2007

Denmark

Dragonslayers Of The [Mist]

W/Mo

Reminds me when i suggested Microsoft to release a gamer version of they'r future OS (Longhorn/Vista). A friend of mine had a new pc build up with a faster cpu, faster ram and a faster graphics card then what I had, still my pc beat his fps in every game and benchmark we crossed. Simply because I used to many hours tweaking and stripping every possible part of my XP.
I don't got the lag spikes in pvp or other crowded zones, so maybe MS should get back to my suggestion, since it would help a lot of people to get it out of the box instead of reading 1000 articles and use loads of hours to boost up windows .
All tweaks and removal of things that you wont even need as an average user, did not effect any of my software to be unable to run or decrease in performance.
Atm. Im running the game with forced quality on my graphic drivers, having around 40-60fps in 1360x768 with AA4x4, AFx16, Supersampling, Triple Buffer and everything else that gives better quality over performance.
Tried to turn a few memory tweaks off and got a performance drop 15-30fps after a few hours online. I got 3GB ram, so maybe why it takes some time before I get a noticeable result.
So there is heavy indication of a memory leak, game should run without problems on a stantard setup of XP!