Performance Boost by using Physical Cores

Performance Boost by using Physical Cores

in Guild Wars 2 Discussion

Posted by: lordhelmos.7623

lordhelmos.7623

So while I was dangerously overclocking my i7, I started getting errors from Gw2 regarding “faulty processessor or CPU overheating.”

I ran Prime95 and discovered that my system was actually stable. As I was digging deeper into the problems of Gw2 I discovered the following:

1.) It is known that GW2 is more CPU heavy than normal games. However, I found that the game is not well optimized for hyperthreading.

In layman’s terms:

CPU processors have cores on a metallic “die.” Most processors claim to have 8 to 12 cores but really have only 4 or 6 PHYSICAL cores actually on the die. When a processor with hyperthreading uses cores 5-8, its really just creating a virtual copy of the physical core and doubling the workload.

Most processors and firmware are built to do this, thus packing more power into the CPU without adding extra physical components. However, Gw2 does not like virtual cores.

With the way Gw2 seems to hog processing space, it seems to make processing requests that cause virtual cores to become unstable -hence the crashes and bad performance when overclocking a processor for this game.

So I did some research and found that using some command line hax to force Gw2 to ONLY USE PHYSICAL cores increase the stability of my game, caused all my crashing problems to go away, and significantly improved my FPS.

So here’s what you do.

DISCLAIMER: I don’t take any responsibility for anything that happens to your machine, while this fix is relatively safe, tweak at your own risk:

1.) Open the Gw2 shortcut and go to properties

If you have 4 virtual cores and 4 physical cores change the line to the right of “target” to this:

cmd.exe /c start “Guildwars 2” /affinity 55 "C:\Program Files\Guild Wars 2\Gw2-64.exe

If you have 6 virtual cores and 6 physical cores change the line to the right of “target” to this:

cmd.exe /c start “Guildwars 2” /affinity 555 "C:\Program Files\Guild Wars2\Gw2-64.exe

NOTE: This is assuming Gw2 is installed in C: and your using the 64 bit client, if your using the 32 bit client you may need to change “Program Files” to “Program Files (x86)”

And that’s it, no more virtual cores to de-stabilize gw2. Now when you run the shortcut, the cmd prompt will come up and force gw2 to only use physical cores.

Performance Boost by using Physical Cores

in Guild Wars 2 Discussion

Posted by: Behellagh.1468

Behellagh.1468

First only very lazy sites mix up simultaneous thread count with core count.

Second the Windows scheduler understands when assigning threads to cores to assign them to unused cores first before doubling them up if the CPU has HT/SMT.

Third, the thread scheduler in Windows already assigns a thread to an idle core on an HT/SMT CPU before assigning a second thread to an busy core.

Fourth, setting affinity for an application doesn’t prevent the thread scheduler from assigning threads from other applications to non-idle cores, if there’s no idle cores available.

Affinity doesn’t buy you performance on a system when you have other apps running at the same time as the game. Physical cores don’t have one logical core that performs better than the other. The only thing that affects performance when it comes to HT/SMT cores is the overall workload for the CPU in terms of active threads system wide be low enough that doubling up threads per core is held at a minimum.

Actually limiting the number of available logical cores to half may actually hurt performance as GW2 does have, as I see it on my system, 35 threads. True only 3 take up the 70% of the total CPU cycles GW2 uses but that doesn’t mean only four or less threads ever want to run at the same time. If a logical core becomes available but a thread’s affinity mask prohibits running on that logical core, that thread has to continue to wait even if it’s the next one in the queue wanting to run.

We are heroes. This is what we do!

RIP City of Heroes