Performance Issues

Discussion in 'General Discussion' started by Money Mike, Apr 6, 2018.

Thread Status:
Not open for further replies.
  1. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    *sigh*... ok I will dig in my post history and bring it back up later tonight...

    It's a simple registry fix having to do with application timeout settings... as I said the problem occurs because the OS prepares the desktop while the GPU is already running at 99%, it thinks SOTA has timed out every 2-3 seconds... this also causes graphic shaders to reload their buffers and causes memory leaks.

    For manually throttling your GPU, you will have to look it up yourself depending on the card, might have to sniff around forums if its not included in the card drivers.
     
  2. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    Sure dig it up please for the Windows users here, I will try to convert that fix for the GNU/Linux users.
     
    Barugon, Woodchuck and Jaesun like this.
  3. Gix

    Gix Avatar

    Messages:
    2,203
    Likes Received:
    4,014
    Trophy Points:
    153
    I wasn’t claiming that the issue is due to faulty or underpowered GPUs and CPUs... I’m just saying that it’s related to them and that there are other potential causes.

    I play with both Windows and Mac OSX clients on the same hardware and I don’t suffer from any hitching so I’m in no position to actually troubleshoot the matter to find the causes. I can only make speculations based on the problems I've heard and my understanding/experience in video game development and CGI computing... hence why my original response was related to the game's settings.
     
    StrangerDiamond likes this.
  4. Floors

    Floors Avatar

    Messages:
    4,265
    Likes Received:
    6,621
    Trophy Points:
    165
    Well... there are also people that don't use an OS that has a registry, so it won't work for everyone.

    I also now have experienced the hitching people are talking about, so it can't be only releated to specific OS's handling of memory....
     
    Barugon, StrangerDiamond and Feeyo like this.
  5. Woodchuck

    Woodchuck Avatar

    Messages:
    613
    Likes Received:
    831
    Trophy Points:
    93
     
  6. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    Hitching come from multiple player in a scene mostly. How photon work is you have a master client which hold room info (the first one to join the scene) and server send data to him, then he send data to all other in the room. So less people get connected to the server (which can now hold alot more people) but if the guy live in china and you are in america, there is a delay. Its supose to be set by region (which is what sota tryed to do with russian having their "own server" and such). But now we all together and we living all around the world. So there is a delay that cause that hitching.
     
    Sorthious, Feeyo and Solazur like this.
  7. Billy Bologna

    Billy Bologna Avatar

    Messages:
    10
    Likes Received:
    8
    Trophy Points:
    3
    Side note: Heat also plays a major role in your computers performance. My system will chug if I don’t at least turn a fan or air conditioning on, being as it’s the middle of summer. I get all sorts of weirdness happening and realize “OH! Just because I’ve gotten used to the warm weather, doesn’t mean my computers have.”
     
  8. Solazur

    Solazur Avatar

    Messages:
    1,429
    Likes Received:
    3,477
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Pacific NW
    We'll be waiting :)
     
    Sorthious, Jaesun and Feeyo like this.
  9. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    Found it :
    Start Regedit.
    Navigate to HKEY_CURRENT_USER\Control Panel\Desktop
    Select HungAppTimeout from the list.
    Right on it and select Modify. Make sure the value is decimal (default will be 2-5000 milliseconds, you can start by doubling it it sufficed for me but some computers might take higher).
    There are also a few other values you can modify for example :
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
    Has WaittoKillServiceTimeout, if not you can add it (advanced : read about it before doing this)
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
    Has TDRDelay (advanced)
    Reboot.

    For controlling the GPU load I used an application called RadeonPro, it rarely is part of the GPU driver itself... many cards can't even be throttled so you have to check for 3rd party software if available. But with the programmed obsolescence fiasco you'll maybe have to buy a new card, now you'll know to look for one that allows such customization.

    The hung application timeout setting alone if there is no other bottleneck should already remove FPS rollercoasting, hitching, and many crashes.

    @devilcult has it right... its pretty simple, the network delay makes the OS believe that the application hung, and it tries to pre-load the desktop so you can tab out, the problem is your GPU is already @ 99% and it will as I said start to reset buffers and reload, causing havoc for both client and OS (that is a unity problem that can be fixed).
     
    Jaesun, Sorthious, Solazur and 2 others like this.
  10. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    That was my first guess when I started going nuts about it because I was running the heaviest benchmarks I could find @35FPS. But SOTA was 8-15 FPS, up and down all the time, honestly it felt more like 8 FPS and I was getting motion sickness.

    But my GPU although running at full power with overclock was steady around 68 degrees...

    The application was doing a full timeout routine every few seconds... that was its problem... now I'm running a stable 28-32 FPS, 0 hitching.

    I can double-click everywhere and even play music without lag in the biggest cities. It made the game finally playable for me with my low-end system :)

    Even high end systems might run into this problem so hopefully everyone gets to enjoy this easy fix with your translation @Feeyo !
     
    Sorthious and Feeyo like this.
  11. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    Thanks, will give it a go after work. I already started a shell script for us GNU/Linux users to reflect this and add some other system improvements.
    Hopefully I can post this tonight after some testing at home.
     
    Sorthious and Ravenscar like this.
  12. Barugon

    Barugon Avatar

    Messages:
    15,678
    Likes Received:
    24,293
    Trophy Points:
    153
    Gender:
    Male
    Turning off these two settings has maybe improved my framerate in town but it has had no affect on the heinous hitching.
     
  13. Barugon

    Barugon Avatar

    Messages:
    15,678
    Likes Received:
    24,293
    Trophy Points:
    153
    Gender:
    Male
    I'm playing mostly in private mode.
     
  14. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    BTW @Gix I didn't mean to call you out like that, its because you also read and participated in those threads where we discussed the 98% load bug, where I tried to explain the fix. And I know your level of proficiency so I was like "nooooooo" :) You know I did follow your recommendations, got myself a SSD, got myself a cheap radeon (but still supposed to be much better than the onboard graphics)...

    It's all I could afford... but it improved by "top FPS" only slightly, 4-5 FPS tops... thats when I went nuts and peeled every document about resource handling on windows that I could find.

    And I hit me head on the desk more than once... stock settings on windows are horrible, stock settings on unity are horrible...

    its almost as if they were leaving those in such a state so you pay for custom support in order to fix the issue they created :p
     
    Last edited: Aug 3, 2018
    Gix likes this.
  15. Barugon

    Barugon Avatar

    Messages:
    15,678
    Likes Received:
    24,293
    Trophy Points:
    153
    Gender:
    Male
    We, as players, shouldn't have to jump through hoops to make SotA run smoothly. It should do so out of the box and anything less is complete garbage.
     
  16. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    I have played with unity/cryengine/unreal enough to have an idea how to fix it, but it requires modifying the shader buffer routines and network code of unity which is pretty hard and costly to do especially for a game built like SOTA. I think its possible to do if they at least acknowledge the source of the problem. My PMS and e-mails were ignored and it seems like they tried a few band-aid fixes but nothing very substantial IMO. I don't think I'm a pro, but when faced with a mystery, I tend to think out of the box and that often produces remarkable results.

    I'm not even sure what type of Unity license Port bought, so its hard to speculate on the reasons for refusing the modifications I proposed. Maybe they asked Unity freelances for a fix but they told them it would cost a leg and an arm to fix it. To be honest its more of a windows/unity problem...

    Port must be saying the same thing to Unity "we shouldn't have to walk through hoops to make your product work"...

    But then they'll say their marketing pitch : Well the engine wasn't really designed for a MMO at this scale, it requires custom programming that you can buy from us, btw (pricing scales with intended concurrent players too).

    sad story, but I walked that path more than twice, it ruined 3 of my projects and wasted so much... and I tried to warn the devs about it riiiight after kickstarter.

    I was told ok shut up Ahu we are industry veterans this is not our first ride in the park.
     
    Last edited: Aug 3, 2018
    Barugon likes this.
  17. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    So I created a batch script for the Windows users, this is a modification to what I mostly use on my windows box plus the added 3 options from @StrangerDiamond .
    Create a new file on your desktop: tweak.bat edit it with an text editor and add:

    Code:
    @echo  off
    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "LargeSystemCache" /t REG_DWORD /d 1 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "Size" /t REG_DWORD /d 3 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "DirectoryCacheLifetime" /t REG_DWORD /d 0 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "DisableLargeMtu" /t REG_DWORD /d 0 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "DisableLargeMtu" /t REG_DWORD /d 0 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "EnableTCPA" /t REG_DWORD /d 1 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "DisableTaskOffload" /t REG_DWORD /d 0 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "SynAttackProtect" /t REG_DWORD /d 1 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "EnableConnectionRateLimiting" /t REG_DWORD /d 0 /f
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v "NetworkThrottlingIndex" /t REG_DWORD /d 4294967295 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "MaxFreeTcbs" /t REG_DWORD /d 65535 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "MaxHashTableSize" /t REG_DWORD /d 65535 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "MaxUserPort" /t REG_DWORD /d 65534 /f
    reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "TcpTimedWaitDelay" /t REG_DWORD /d 30 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "autodisconnect" /t REG_DWORD /d 4294967295 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\lanmanworkstation\parameters" /v "KeepConn" /t REG_DWORD /d 32000 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "EnableWsd" /t REG_DWORD /d 0 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "SynAttackProtect" /t REG_DWORD /d 1 /f
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v "SystemResponsiveness" /t REG_DWORD /d 1 /f
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d 0 /f
    reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "HungAppTimeout" /t REG_SZ /d 10000 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "WaittoKillServiceTimeout" /t REG_SZ /d 25000 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v "TDRDelay" /t REG_DWORD /d 8 /f
    
    net stop Server
    net start Server
    
    @echo off
    
    Right mouse click and use execute as Administrator.
     
    Woodchuck, Jaesun and Sorthious like this.
  18. DavidDC

    DavidDC Programmer Moderator SOTA Developer

    Messages:
    1,532
    Likes Received:
    3,236
    Trophy Points:
    113
    Gender:
    Male
    Hmm playing with a wide range of registry like that could be dangerous for people who dont have much idea about what they doing tought. So be warned. Changing registry value especially the windows one could literally stop your computer from running. I would wait that a dev acknowledge this and make the change themself if they find it useful.
     
    Nog and Sorthious like this.
  19. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    Well these entries are pretty safe really.. And are not dangerous. But then again who am I :)
     
    Sorthious likes this.
  20. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    Good advice for people new to this... my suggested changes could make some things slower like switching between applications...

    however people shouldn't be discouraged from trying it, windows can take a beating I have over a 100 registry tweaks and not a shadow of a problem, it just works better :)
     
Thread Status:
Not open for further replies.