A Workaround To CPU Bottlenecking

SergeiPavlovSergeiPavlov
First Assault Rep: 1,600
Posts: 111
Member
edited September 9, 2016 in Operatives Helping Operatives
As I have explained in previous posts, the game bottlenecks the graphics card by saturating Core 0 of the CPU. Also, it doesn't detect Nvidia cards installed, so it allocates PhysX to the CPU, worsening the problem.

Assigning PhysX manually to your graphics card reduces the workload on Core 0 by 3-7% in-game, which helps, but I found a much better solution.

By manually setting Core Affinity for the process GAME.exe, I managed to distribute the CPU load evenly among my four Cores with a nice 50% load on two cores and around 15% on the other two.

image

image

In summary, no more bottlenecking.

The easy way to do this is to go to Task Manager > Processes > Game.exe, right click and select Go To Details. Right click again on Game.exe and select Affinity. Disable all Cores above 3, leaving enabled Cores 0, 1, 2 and 3.

The problem with this method is that you will have to do it every time you start the game.

But there's a better solution: Go to your game folder > Shipping, and create a shortcut to nxsteam.exe.

image

Move the shortcut to the desktop. Right click on it and select Properties. Replace the Target with this command line:

C:\Windows\System32\cmd.exe /C start /affinity F C:\Steam\steamapps\common\firstassault\Shipping\nxsteam.exe

image

Replace the game folder address with your own address (notice my Steam folder is not on Program Files, but on the root drive).

Now, when you want to play the game, double click the new shortcut, and violá, your game will have the affinity set automatically, and you will experience a drastic improvement in performance.

FOR ADVANCED USERS:

The letter "F" next to /affinity in the command line above is a hexadecimal value. You can tweak the specific cores you want the game to use by replacing it with another one:

1 = Core 0
2 = Core 1
3 = Core 0 and 1
4 = Core 2
etc.

I will provide technical support regarding this workaround to a limited extent. Please ensure you follow my instructions to the letter before asking questions.

Enjoy.

EDIT:

I found that setting affinity to Cores 1, 2 and 3 gives me the best results (350+ FPS in-game). For some reason, this game hates my Core 0! This correspond to a hexadecimal value of E. :)
HolorynGodsGunmanSash0MrWrongporcofonnopp

Comments

  • MidlordMidlord
    First Assault Rep: 4,225
    Posts: 789
    Member+
    edited August 31, 2016
    Nevermind, I was being a complete noob, I somehow was missing the start command. Whoops.
    SergeiPavlov
  • SergeiPavlovSergeiPavlov
    First Assault Rep: 1,600
    Posts: 111
    Member
    edited August 31, 2016
    Please make sure you followed the steps exactly as described. Did you change the game address with your own?

    What do you mean with change to Game.exe?
  • TerranwolfTerranwolf
    First Assault Rep: 840
    Posts: 16
    Member+
    edited August 31, 2016
    From what I see in this, your shortcut won't actually work. You are setting the affinity for the launcher (nxstream), which isn't bottlenecking the performance. GAME.exe is, which is run from the launcher explicitly. You can still change affinity of processes from task manager, yes.
  • SergeiPavlovSergeiPavlov
    First Assault Rep: 1,600
    Posts: 111
    Member
    edited August 31, 2016
    It will work, @Terranwolf. If you want to test it yourself, start the game by clicking on my nxsteam.exe custom shortcut, then go to game.exe's details, and you will see that the affinity is being applied as I explained.
  • HolorynHoloryn
    First Assault Rep: 525
    Posts: 12
    Member
    edited August 31, 2016
    I can confirm it does work. Probably some crazy inheritance Windows does for child processes.

    I did have to alter the Target text slightly to get it working though, I'll edit this post later showing what I changed.

    Edit: I am curious as to why limiting available cores improves multithreading for this game though... seems counter intuitive. Apparently disabling only core 0 will cause the game to use all remaining cores. Also Sergei, I run the same CPU as you (at 4.6GHz) and I've noticed that there's higher overall CPU usage when setting affinity to cores 1/2/3 than 0/1/2/3 as well. Very weird.
    GodsGunman
  • SergeiPavlovSergeiPavlov
    First Assault Rep: 1,600
    Posts: 111
    Member
    edited September 1, 2016
    Holoryn
    Holoryn said:

    I can confirm it does work. Probably some crazy inheritance Windows does for child processes.

    I did have to alter the Target text slightly to get it working though, I'll edit this post later showing what I changed.

    Edit: I am curious as to why limiting available cores improves multithreading for this game though... seems counter intuitive. Apparently disabling only core 0 will cause the game to use all remaining cores. Also Sergei, I run the same CPU as you (at 4.6GHz) and I've noticed that there's higher overall CPU usage when setting affinity to cores 1/2/3 than 0/1/2/3 as well. Very weird.
    Yes, I observed the same thing.

    It seems that the kernel function "copy_user_enhanced_fast_string" increases CPU load when affinity is enabled. My theory is that affinity is expensive in resources, and that's why it shouldn't be used under normal circumstances.
  • TarkinTarkin
    First Assault Rep: 2,245
    Posts: 320
    Member+
    edited September 1, 2016
    I have access denied error when I'm clicking on affinity option
  • SergeiPavlovSergeiPavlov
    First Assault Rep: 1,600
    Posts: 111
    Member
    edited September 1, 2016
    Tarkin
    Tarkin said:

    I have access denied error when I'm clicking on affinity option
    Do you have UAC turned on?

    If you do, then when you are in Task Manager, on the processes tab, select "Show processes from all users". Accept the UAC prompt.
    This will run Task Manager with administrator privileges. You should now be able to set affinity.

    EDIT: If you go for the permanent solution (the custom desktop shortcut), you don't have to set affinity manually, and you wouldn't have your problem.
  • TerranwolfTerranwolf
    First Assault Rep: 840
    Posts: 16
    Member+
    edited September 1, 2016
    Tried it, and it didn't work (the shortcut method); all cores are still enabled as is default. Something's missing if it is working for some of you. I'll take a look at it later and try to figure it out.
  • TarkinTarkin
    First Assault Rep: 2,245
    Posts: 320
    Member+
    edited September 1, 2016
    SergeiPavlov



    If you do, then when you are in Task Manager, on the processes tab, select "Show processes from all users".
    Got it, thanks!
  • SergeiPavlovSergeiPavlov
    First Assault Rep: 1,600
    Posts: 111
    Member
    edited September 1, 2016
    No problem, @Tarkin, happy to help.
  • K1B4N00UK1B4N00U
    First Assault Rep: 780
    Posts: 28
    Member
    edited September 5, 2016
    Edit. Works!
    SergeiPavlov
  • scikscik
    First Assault Rep: 3,505
    Posts: 401
    Member+
    edited September 5, 2016
    I think I've done something wrong because I've followed your instructions for the shortcut method and when I check the affinity using Task Manager it shows that I'm using cores 1,2 and 3 but not 0. I still get the same fps as before when core 0 was enable, my fps still dips to 80 fps on Terminal Conquest when there's a lot of spam and I still average around 140. Neither my GPU or my processor are low-end..
  • GodsGunmanGodsGunman
    First Assault Rep: 905
    Posts: 59
    Member
    edited September 6, 2016
    Very nice. Good job!
  • SergeiPavlovSergeiPavlov
    First Assault Rep: 1,600
    Posts: 111
    Member
    edited September 7, 2016
    scik
    scik said:

    I think I've done something wrong because I've followed your instructions for the shortcut method and when I check the affinity using Task Manager it shows that I'm using cores 1,2 and 3 but not 0. I still get the same fps as before when core 0 was enable, my fps still dips to 80 fps on Terminal Conquest when there's a lot of spam and I still average around 140. Neither my GPU or my processor are low-end..
    That corresponds to a hexadecimal value of "E" in the affinity command, which is the one I use (I find it more efficient than using all four cores).

    I assume you used the value I recommend at the end of the OP, instead of the default value of "F" that I mentioned at the beginning of the post?
  • SergeiPavlovSergeiPavlov
    First Assault Rep: 1,600
    Posts: 111
    Member
    edited September 7, 2016
    GodsGunman

    Very nice. Good job!
    Thanks, happy to help.
  • scikscik
    First Assault Rep: 3,505
    Posts: 401
    Member+
    edited September 7, 2016
    SergeiPavlov

    scik
    scik said:

    I think I've done something wrong because I've followed your instructions for the shortcut method and when I check the affinity using Task Manager it shows that I'm using cores 1,2 and 3 but not 0. I still get the same fps as before when core 0 was enable, my fps still dips to 80 fps on Terminal Conquest when there's a lot of spam and I still average around 140. Neither my GPU or my processor are low-end..
    That corresponds to a hexadecimal value of "E" in the affinity command, which is the one I use (I find it more efficient than using all four cores).

    I assume you used the value I recommend at the end of the OP, instead of the default value of "F" that I mentioned at the beginning of the post?
    Yes, I'm currently using 'E' as the hexadecimal value.
  • SergeiPavlovSergeiPavlov
    First Assault Rep: 1,600
    Posts: 111
    Member
    edited September 7, 2016
    scik
    scik said:

    SergeiPavlov

    scik
    scik said:

    I think I've done something wrong because I've followed your instructions for the shortcut method and when I check the affinity using Task Manager it shows that I'm using cores 1,2 and 3 but not 0. I still get the same fps as before when core 0 was enable, my fps still dips to 80 fps on Terminal Conquest when there's a lot of spam and I still average around 140. Neither my GPU or my processor are low-end..
    That corresponds to a hexadecimal value of "E" in the affinity command, which is the one I use (I find it more efficient than using all four cores).

    I assume you used the value I recommend at the end of the OP, instead of the default value of "F" that I mentioned at the beginning of the post?
    Yes, I'm currently using 'E' as the hexadecimal value.
    Ok, I understand your point now.

    Some FPS drops and stutters are due to CPU bottlenecking, but not all of them. By using my workaround you will see an improvement of performance, but it won't solve all the issues the game has at the moment. It may even be possible that you don't see ANY improvement at all, depending on your rig.

    I think most of the performance issues we are seeing come from bad netcoding, and there's nothing we can do on our end to fix that. We'll have to wait and see.
  • KodaiganKodaigan
    First Assault Rep: 2,195
    Posts: 229
    Member+
    edited September 7, 2016
    SergeiPavlov

    I think most of the performance issues we are seeing come from bad netcoding, and there's nothing we can do on our end to fix that. We'll have to wait and see.
    Patience, is the Key to Success! My dear Cyber-fellows!
    SergeiPavlov
  • fury_fury_
    First Assault Rep: 100
    Post: 1
    Member
    edited September 9, 2016
    i don't have a steam, only nexon launcher so there is no nxsteam.exe file. what should i do?