Performance Issues

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

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

    Steevodeevo Avatar

    Messages:
    1,431
    Likes Received:
    2,806
    Trophy Points:
    113
    Thanks @StrangerDiamond , i am not unfamiliar with regedits so I may give option 1 a go and see how it works out.
    2 x questions if I may:

    - q1 does changing this timeout hang default have any potential at all to heat up the cpu chip more than the default? I wouldn't have thought so, maybe the opposite?
    - q2: Would you edit this setting back to default when not playing SOTA in case it impacts anything else or is this a pretty inert change and unlikely to impact elsewhere?
     
    Sorthious likes this.
  2. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    The change DOES impact every where. Not only SotA. These are system wide.
     
    Sorthious likes this.
  3. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    1 - Nope... its first level OS entries so it should not affect the hardware... what might happen if you manage to really overload RAM is that the computer will have a hard time cycling processes, which could in theory cause a hangup, but I've never seen it and I always leave everything open, sometimes doing graphic work in one program, audio work in another, compiling, web browsing, and sometimes playing SOTA.
    2- If you are doing professional work on the machine requiring alot of application switches at a very rapid speed you might see a difference there, but honestly the default setting is usually 2 seconds, if you switch it to 5 seconds it means that if SOTA stalls for more than 5 seconds you'll have to wait longer for the desktop to be responsive, thats all.
     
    Steevodeevo likes this.
  4. Steevodeevo

    Steevodeevo Avatar

    Messages:
    1,431
    Likes Received:
    2,806
    Trophy Points:
    113
    I know @Feeyo, its a registry change I appreciate the heads up but what I mean was is the change significant. My email overlapped with @StrangerDiamond most recent one where he pointed out that desktop swapping may be impacted, so if i did do this I would probably want to change it back each time.
     
  5. Steevodeevo

    Steevodeevo Avatar

    Messages:
    1,431
    Likes Received:
    2,806
    Trophy Points:
    113
    I've just checked; I navigated the tree structure as suggested, then went back up to the root of the directory and did an universal searched from there, then tested my search principles on other reg commands... I don't have such a registry command or anything close to it in my Win 10 registry.
     
  6. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    You need to add it manually. When there is no entry, Windows will use the default setting for it.
     
    StrangerDiamond and Steevodeevo like this.
  7. TheBalance

    TheBalance Avatar

    Messages:
    291
    Likes Received:
    540
    Trophy Points:
    40
    The graphics are in no way some of the most advanced. What criteria are you using to make that statement? The graphics have limitations put on them by the engine they are rendered through, technology that is in no way advanced at this point in time.

    What definitions are you using to define a heavily used zone? There are not 200,000 ANYTHING in ANY zone this game has. You're probably looking at 1/4 of that, max, in the most populated and customized town in the game. What's the limit on decor in housing? How many houses are there in the most populated town in the game? Is every property allowed 1000 items? Do they all sit at the max? Are there 200 of them? No? Cool. Glad we cleared that up with basic math.

    Your statement will do nothing but provide ammunition for those looking to display how fervent the handful of people playing SOTA are and how instead of holding the development of the game accountable up to a standard, they pat each other on the back and straight-up lie about what it consists of.
     
    Last edited by a moderator: Aug 3, 2018
  8. TheBalance

    TheBalance Avatar

    Messages:
    291
    Likes Received:
    540
    Trophy Points:
    40
    UNDER NO CIRCUMSTANCES SHOULD YOU BE PLAYING AROUND WITH YOUR REGISTRY USING ONLY INSTRUCTIONS WRITTEN BY ANOTHER HUMAN BEING. YOU CAN EASILY IRREPARABLY HARM YOUR COMPUTER.

    Don't care that it's all caps. If you don't know what your registry is, why you'd modify it, or how to follow the steps someone gives you to modify it YOU SHOULD NOT BE ATTEMPTING TO DO IT. This is something that might seem innocuous, but is unforgiving of major errors. You can easily brick your operating system beyond repair and require someone who actually knows how to fix these things, if what you did is indeed fixable.

    This isn't a load up youtube and make a quickfix thing. Do not toy with your registry over a video game - aside from that being wholly unacceptable on every level, it affects not just one game, but all of them, ever, until you revert the change.
     
    Nog likes this.
  9. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    Here is a small performance improvement for us GNU/Linux users. Just change the USR and PATH_TO_SOTA variables.
    This adds some performance to current kernel, changing the (CPU/DISK) governors and putting the GPU to high performance mode. Also adds a higher priority to our SotA process.
    You can select if you want to make use of a small ramdisk for temporarily GPU and GL caching (AMD and Nvidia).
    Do note that when enabling ramdisk, the first boot up for SotA will seem a bit more laggy as it will start re-creating the caches, after a while it should be faster as its on a ramdisk.

    All the changes made in this script will be reset after a reboot.
    Do note that this is just a performance improvement and NOT a fix for Unity/SotA hitching bugs...

    note: As some changes need super user, execute the shell script with sudo.
    note2: This will not execute the SotA Launcher, you will need to use the Launcher to update SotA.

    Code:
    #!/bin/bash
    
    
    USR=feeyo
    PATH_TO_SOTA="/home/${USR}/SHROUD/SOTA/"
    SOTA="Shroud of the Avatar.x86_64";
    
    echo "Do you want to enable GPU RAMDISK caching for ${SOTA}?";
    echo "Do note that this will make every instance of SotA re-cache everything with every start up";
    echo "Answer: Y/N";
    read enableRamDisk;
    
    sync
    echo 3 > /proc/sys/vm/drop_caches
    echo "high" > /sys/class/drm/card0/device/power_dpm_force_performance_level
    echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    for i in /sys/block/*; do echo noop > ${i}/queue/scheduler; done
    
    if [ ! -d /home/${USR}/.cache/mesa ]; then
                    mkdir -p /home/${USR}/.cache/mesa;
                    mkdir -p /home/${USR}/.cache/mesa_shader_cache;
                    chown -R ${USR}:${USR} /home/${USR}/.cache/mesa*
    fi
    
    if [ enableRamDisk = 'Y' ] || [ enableRamDisk = 'y' ]; then
            mount -t tmpfs -o size=1024m tmpfs /home/${USR}/.cache/mesa
            mount -t tmpfs -o size=1024m tmpfs /home/${USR}/.cache/mesa_shader_cache
            chown -R ${USR}:${USR} /home/${USR}/.cache/mesa*
    fi
    
    sysctl -w vm.swappiness=10
    sysctl -w vm.dirty_ratio=50
    sysctl -w vm.dirty_background_ratio=2
    sysctl -w vm.dirty_ratio=80
    
    # Unity libSDL fix
    export XMODIFIERS=""
    # nVidia disk caching, if RAM disk enabled it will use the RAM disk.
    # If RAM disk disabled, it will use its own caching for SotA and other nvidia games will not overwrite SotA caches.
    # If using AMD, the whole GL_CACHE variable is ignored.
    export __GL_SHADER_DISK_CACHE="1"
    export __GL_SHADER_DISK_CACHE_PATH="/home/${USR}/.cache/mesa/"
    
    # Execute SOTA preserving our shell env exports
    sudo -E -u ${USR} "${PATH_TO_SOTA}${SOTA}" > /dev/null 2>&1 &
    
    # Wait 1 minute for SotA to fully boot up with all threads
    sleep 60
    # Get Process ID for SotA
    PROC=$(pidof "${SOTA}")
    # Change PRIO for SotA
    ps --no-heading -Lj ${PROC} | awk '{system("renice -10 "$4)}'
    # Change I/O PRIO for SotA
    ionice -c1 -n1 -p${PROC}
    # We are done. We can exit now.
    exit
     
    Last edited: Aug 3, 2018
  10. Sorthious

    Sorthious Avatar

    Messages:
    1,135
    Likes Received:
    1,354
    Trophy Points:
    113

    Nice contribution, but performance, in regards to FPS, isn't my issue. The constant hitching is my issue. I can be in my basement getting 70FPS crafting on a table then freeze up for a second or two, then go right back to 70FPS. As I said, I think it's a combination of things; mainly network code and garbage collection. I did actually try setting my CPU's governor to performance(was powersave), and it made no difference. It's almost like the game is throttling my CPU to 3.3GHz. Outside of the game, if I'm monitoring the CPU, it will go up to 3.6GHz on each core. The second I start the game up it drops back down to 3.3-3.4. It will go slightly higher but only briefly, and only during the load screens.
     
    Feeyo likes this.
  11. Woodchuck

    Woodchuck Avatar

    Messages:
    613
    Likes Received:
    831
    Trophy Points:
    93
    Thanks a lot for this @Feeyo

    I would like to try this, but @StrangerDiamond recommended 3 registry keys, how come your script seems to involve many more keys?

    Also, is your script for Windows 10 64-bit systems?
     
  12. Anpu

    Anpu Avatar

    Messages:
    7,944
    Likes Received:
    9,015
    Trophy Points:
    153
    Location:
    Hemut
    Interestingly, I loaded up REGEDIT and was navigating to find these entries:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control WaittoKillServiceTimeout

    This was set to a default of 5000

    HKEY_CURRENT_USER\Control Panel\Desktop HungAppTimeout
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" TDRDelay

    These 2 entries do not exit in my registry. Should they be there?
     
  13. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    I added some other tweaks to improve system and network performance.
     
    Jaesun and Woodchuck like this.
  14. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    As I said, most windows stock settings are built for desktop work... even on some gaming computers I analysed. Some graphic cards when in "gaming mode" will override some of those settings, but only the newest cards have done some serious work about it... I'm not exactly sure why but I suspect it became harder and harder to port game code to all platforms and Unity (and similar engines) made some compromises in the process, or IMO they left those optimizations out of the unity package so people would hire their freelance who usually happen to have customer support positions within the company. Microsoft did the same thing to me with their azure cloud development package, to merely complete my project with some security token handling, it would have cost me an extra 100k, which I was supposed to gladly pay the head of support from the community forums*$!*$ so he would copy a bunch of custom javascript in order to make two parts of the program which I bought with premium support in order to make a social game (their exact marketing pitch), work.

    Fair enough ?!$% we did not sue them because it isn't a gaming platform... but then I realized unity/cryengine/unreal used similar models... seems like the status quo.

    So of course... microsoft slowly but surely hid those options and expected people to continuously upgrade their video cards every time a new wave of games using the latest service pack modifications in order to pull a spectacular computing feat. Microsoft are very good friends with the graphic card manufacturers :p

    As I said, smells fishy and of programmed obsolescence... just like the iphones and their automatic upgrades...

    So unless a programmer @ portalarium is like level grandmaster... modifying unity to work with multi-cores and handle shader buffers in a way that it adapts to all older types of machines is about 100 times more complex than it used to be back then in UO for example. Unless that is, you open the wallet, cause they got it all ready for you. They hit the copy button and poof 100k appears in their bank account.

    So you can actually enter those values manually with the REGEDIT and it will override the occulted default settings. :p
     
    Last edited: Aug 3, 2018
    Woodchuck likes this.
  15. Feeyo

    Feeyo Avatar

    Messages:
    1,716
    Likes Received:
    2,520
    Trophy Points:
    113
    Location:
    Aelasar’s Forest
    But just to update, it does NOTHING against hitching. Hitching is still there on Windows, what a surprise!. (sarcastic)
     
    Sorthious and Jaesun like this.
  16. Woodchuck

    Woodchuck Avatar

    Messages:
    613
    Likes Received:
    831
    Trophy Points:
    93
    So...

    Problems known. Solutions hidden.

    I think this is called “human greed”? Or maybe some prefer the term “conspiracy”?

    Its just like anti-virus companies making and releasing viruses to sell the virus antidote.
     
    StrangerDiamond likes this.
  17. Metalton

    Metalton Avatar

    Messages:
    76
    Likes Received:
    104
    Trophy Points:
    8
    Gender:
    Male
    Location:
    Aetherverse
    Rarely have hitching, but when I do varies between a brief freeze (<1 sec) to 2-5 secs.. only thing that struck me as odd (other then environmental sfx continuing like normal), was regardless of the hitch length, the game picks up where it left off.. npcs continue walking from where they froze, fights pick right back up (no popping, health loss spikes, etc). Even in open mode.. unless I always happen to be the scene master when I'm paying attention to it ;)

    Edit: and if I am the scene master.. are those I'm in the scene with freezing to, or are they seeing rubberbandimg?
     
    Elwyn likes this.
  18. Scanphor

    Scanphor Avatar

    Messages:
    553
    Likes Received:
    977
    Trophy Points:
    63
    From the descriptions and explanations given I'd only expect it to work if the GPU was typically running at or near 100%
     
  19. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    At least we're moving forward... I am pretty sure that is what made a difference for me, but then again I did many tweaks maybe its a combination :/ maybe also there is an overriding setting in another part of the registry, current user ?

    I know I played alot in there...

    I am on windows 7, so maybe on windows 10 there are other spots where another service than the desktop kicks in on application timeout ? can you hunt the processes down ?
     
  20. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    That is indeed what I said... but if your GPU isn't running full pin... you shouldn't have any hitching.

    Something timeouts, maybe net services ?
     
Thread Status:
Not open for further replies.