Performance guide and tests to help finding the issues

Discussion in 'Feedback' started by Xithar, Jun 16, 2020.

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

    Xithar Avatar

    Messages:
    21
    Likes Received:
    36
    Trophy Points:
    3
    Location:
    Germany
    Since I searched in vain for an actual performance guide I will start to create one.
    This is a "work in progress".




    "Camera Effects".
    That's the ultimate performance killer atm. Usually it only works well within the first areas. In any areas you enter afterwards it may take 50-90% FPS! Disable it.

    "Detail level / Level of Detail:
    Like AoiBlue wrote, this option has perhaps the biggest influence how long your game works without getting the performance issues. This is especially true in big Player owned Towns, as well as in some adventure maps which are made with many small details.
    Same is true if the map allows a very far sight; a good example for this is Highvale, outside the Monastry (I get lag there with any options I set.)

    "Resoluion": If your PC is fast enough for whatever you use usually (no low FPS in fights on the first map) don't change it. Effects of changes are minimal if your hardware usually does run other games without lag at that resolution (*caught* most of them with much more complex graphics *caught*) . If you have a cheap or very old LCD it's important that you use the ideal one for it, because you may get all kind of errors (from lag to your screen gettiung black or in very worst cases even broken (especially if it gets glaring white and then even more glaring white turn it off!) if you use a wrong one.
    "Frequency" (the number in Hertz behind the resolution). Same; but if it was set above 60 Hz try to set it to 60/59Hz if your game is constantly slow and look if you may see any difference. I don't see one in SotA, but in many other games (*mumbles* but most of these may reach higher framerates than 60 FPS). This setting is most important if you use old CRT monitors, Head mounted displays (Occulus etc) or 3D shutter glasses. As with the resolution you should be sure your monitor may do the higher ones before you try it out. These might also damage very old CRT and old LCD monitors if set to high for a longer time (most OS will not show these or the monitor powers off before damage is done nowadays, but better be safe than sorry. Especially if you use customized / override monitor settings be careful with both options).

    "Fullscreen": If you have no fullscreen issues and if you use no other tools while playing use it. Most games are faster with it. With SotA this also had no effect on my framerate for my PCs (on the slower one perhaps a bit).

    "Depth of field" <Quote AoiBlue> In this feature a range is selected as "in focus" and the further you move from that distance, the more blur is added. </Quote>

    "Camera Bloom"
    enable it, if you have a good Graphic Adapter (I guess Nvidia 1080 or faster adapters)

    "Volumetric lightning"
    same. Might help a bit to disable it if it gets slow in some kitchy Player owned towns or when many spells are cast, fires burn etc. But even if I set off any lightning in the options and set all sliders to the lowest possible settings to many dynmic lights / fog / rain kills the performance.

    "Periphal Lightning" Didn't work for me with AlienFX, nore with Roccat Talk or AMDs light system

    "Cull interior deco" disable only if your load times are unbearable (and this game loads really, really looooong.. even if you use NVME drives). However it will lead to more FPS drops ingame if it is disabled

    "Aggresive Deco Loading": I'm not 100% sure what this does, but in other games "Aggresive loading" is usually more taxing for the disk, but you get shorter loading times. So I think enable it if you use NVME or SSD which doesn't have a heat problem. Disable if your SSDs run hot. Also disable it on Laptops or if you are still using a classic harddrive.

    "Load time baking": Leave it on if you have enough memory. It will heighten your load times, but it's better to have as much of the game loaded before you enter an area (else your FPS will suffer more often)

    "Cloth simulation": Not sure about this one, but disabling this option might possibly help if you get framedrops around players and NPC.

    "GPU Occlusion" If you have a high end PC enable it, if you get problems try to disable it as one of the first options

    "Field of Views" & "Camera distance": High settings here might be much more taxing for your PC.
    First person view might help with some performance issues, but is usually for solo plying or immersive players. I use it all the time, while not in a party, but it lacks oversight; especially if your Filed of View (First person) isn't set to maximum.


    (@Devs: Pretty please add some screen effect for 1st person when you got hit in the direction of the opponent hitting you (like a short red flash on the left/right/bottom screen side for each hit - like most 1st person games do).

    A possible work-around might it be adding an option which does a full reload of the game each time you change the area / map. Or perhaps add a slash command like /reload for that)

    -----

    My testgear:
    AMD Ryzen 9 3990X
    64GB RAM
    Nvidia RTX 2080 Super
    NVME SSDs
    Ultra-widescreen Monitor (3440x1440)
    &
    Intel I7 4790
    32 GB RAM
    Nividia 1080
    NVME SSD
    Same monitor

    Would it suprise someone, that my old Intel gets the performance issues later than the AMD?
    The code is most likely Intel optimized. To be exakt I get mostly even the same framerates out at the same settings..
     
    Last edited: Jul 3, 2020
    Tirrag, StarLord, Anpu and 3 others like this.
  2. AoiBlue

    AoiBlue Avatar

    Messages:
    406
    Likes Received:
    319
    Trophy Points:
    55
    Gender:
    Male
    Depth of field controls a feature called "Z-Buffer controlled Blur" In this feature a range is selected as "in focus" and the further you move from that distance, the more blur is added.

    It mostly just blurs stuff in the distance. It's really not very noticible, but it's a fairly inexpensive effect that can easily be combined into other postprocessing stage effects such as bloom and camera blur to make it more inexpensive.

    The most expensive option is setting the LODs to be high quality. This is largely due to it affecting lot loading. I wish they would set a separate slider for adventuring areas from towns.|

    I've noticed a lot of hitching and lag sometimes causing me to network timeout. It is MUCH worse if I up the LOD. Things causing memory loading and unloading also make it worse.

    Camera Effects is also a major performance killer as is volumetric lighting. Still, nothing compares to LOD on performance killing in PoTs.

    PS, I use Kubuntu Linux 20.04 (Current Kernel 5.4.0-37-generic)
    CPU: AMD Ryzen 5 1500X Quad-Core Processor,
    GPU: Radeon RX 5500 XT (NAVI 14)
    Driver: Mesa 20.1.1 - kisak-mesa PPA, LLVM 10.0.0, DRM 3.35.0
    Supported API versions:
    OpenGL 4.60 (Core and Compatibility)
    OpenGL ES 3.20
    GLX 1.4
    EGL 1.5 X11 / 1.4 GBM / Wayland not installed
    Vulkan 1.2.131 (Mesa/RADV Driver)

    Typical log sequence to lag-out crash:
    Code:
    FPSMeter, HitchTime=21.2, SceneId=POT_island_metropolis_01_template/Diamond Fields, pos=(30.373, 89.045, 6.167), graphicsDeviceName=Radeon RX 5500 XT (NAVI14, DRM 3.35.0, 5.4.0-37-generic, LLVM 10.0.0), graphicsMemorySize=7876, systemMemorySize=16007, processorType=AMD Ryzen 5 1500X Quad-Core Processor
    (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
    
    PersistenceService.EnqueueAction(Void <GetBagContents>b__0()) Send queue now has 50 items.
    (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
    
    PersistenceService.EnqueueAction(Void <GetBagContents>b__0()) Send queue now has 100 items.
    (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
    
    OutgoingMessageQueue, Total=31,Master=True,SceneId=POT_island_metropolis_01_template/Diamond Fields,timeScale=1.00,SetViewState:29,Ping:1,RecordMovementMetric:1,Room=f7dd8b03-c4d9-4f0d-acb5-b41657661805
    BankInventoryListUI, LoadTime=23.5, Total=594
    IncomingBytes, GameBytes=582, GroupBytes=82, SceneBytes=58, TotalBytes=722, NumPlayers=1, SceneId=POT_island_metropolis_01_template/Diamond Fields
    IncomingMessages, Total=10, NumPlayers=1, SceneId=POT_island_metropolis_01_template/Diamond Fields,Room=f7dd8b03-c4d9-4f0d-acb5-b41657661805
    Network storage reset
    local player destroyed.
    Network storage reset
    NetworkingPeer: Connecting to "38.140.214.157:5055"
    SceneServer: OnStatusChanged:Disconnect
    PlotManager: SceneServer disconnect. Load status = Initialized
    Setting up 2 worker threads for Enlighten.
      Thread -> id: 7fc4c0ff3700 -> priority: 1
      Thread -> id: 7fc29f9e6700 -> priority: 1
    camera controller destroyed.
    GroupServer: OnStatusChanged:Disconnect
    ChatChannelManager: OnDisconnectedFromGroupServer: chat channels cleared
    Cleaning up PID file on exit.
    
     
    Last edited: Jun 17, 2020
    Juan Solo likes this.
  3. Xithar

    Xithar Avatar

    Messages:
    21
    Likes Received:
    36
    Trophy Points:
    3
    Location:
    Germany
    I took the performance table out since it's numbers did not really help. Instead I overtook what AoiBlue wrote and did some more tests, related to the performance hang-ups.

    One of the worst maps in the regard of this is Highvale, doing Esmeralda's ghost quests with heavy use of these teleport windows.
    I tried this even with all settings at the lowest setting and lower resolution, but after ~15-30minutes I had to do a relog, because the game went down to ~10 FPS each time.
    My debug log was in most cases very green, without many errors or warnings, expect some sounds which couldn't load (but switching any sound off didn't help with these either).
    In playertowns or towns in general (Aerie as example) I get often not loadable obejcts as error in the debog log.. like trees and crates. Mostly it's just 1-4 of them but as soon as these errors start showing performance gets down and only exit of game & relog will help.

    Also I got the impression that one of the main issues I get might be related to resolutions higher than Full HD, especially in combination with an utrawidescreen monitor.
    Most people who told me they got no or not much issues use Full HD or lower resolutions and no widescreen. Unfortunately when setting my game to Fulll HD it looks terrible compared to 3440x1440 and playing it a longer time could bring head- as well as eyeache. (I'm used to Oculus, Gear and such HMDs, so it's not that I'm terrible sensible with such things).
    Most other desktop games don't have this. Some 3D HMD titles get it and most often it's similar to the 3D motion sickness, but without the motion as trigger factor.. I don't know what SotA does special here, but it's like using too much blur, paired with lightly flickering lines. This is even worse if the resolution is switched in-game, but if I set it lower (I may switch to highest resolution at any time, this causes no further problems).

    Btw: Is there really no option for UI scaling?
     
    Last edited: Jul 3, 2020
  4. Xithar

    Xithar Avatar

    Messages:
    21
    Likes Received:
    36
    Trophy Points:
    3
    Location:
    Germany
    If the game gets awful slow in towns & PoTs:
    Shadow is even a higher FPS Killer than LoD. Don't set it higher than low, you may even consider to switch them off (however shadows add often to the atmosphere of the game)
    Reflection: Also a FPS killer, not as high as shadows, but higher then LoD. Especially when fishing around a sea refletion can get your game slower and with each further minutes even slower.

    System-sided configs: Depending on your gear these might have very different effects. This is what I found for AMD Ryzen 3900X + Nvidia 2080 Super.
    PhysX:
    There is a big problem with PhysX and it's autodetection, and SotA. Most times it did auto-select CPU and that did cause the biggest issues I had. After setting it to GPU it got much better. It was possible then to set most options to max, crafting in a small PoT for ~2h without the framerate going to low (~45FPS. I even could play 4 random encounters afterwards. after this FPS werte still above 25.
    However, when going fishing at a lake it did only take ~10 min to slow down to 10FPs, even with reflections set to low.

    On my Intel with a NVIDIA 1080 the autodetect often selected the GPU and even if not the effects were not as freezing as with the Ryzen, but framerate was also better when I set PhysX to use the GPU.
     
    Wilfred, Anpu, Gia2 and 3 others like this.
  5. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    Interesting info on the PhysX not using the GPU unless forced. Good stuff.
     
    Wilfred likes this.
  6. Lord Andernut

    Lord Andernut Avatar

    Messages:
    3,340
    Likes Received:
    10,087
    Trophy Points:
    165
    Gender:
    Male
    Location:
    New Britannian Market
    Thanks for starting and elaborating on this @Xithar. I'll keep revisiting the thread. I would love to know real-world performance gains on load times with various SSDs and processors. I'm less concerned with on the fly fps issues because I can always adjust the settings as needed but the load-times, especially first load are what I constantly watch. I get relatively short gaming sessions so boot-up is just more noticeable for me.

    I always have thought my CPU was my limiting factor in this game. Especially that first load-time, as I always enter/exit the game in my POT which goes heavy on deco and lighting. I have the 4790k processor still coupled with a getting elderly GTX 970 and using SSD drives. (It's full upgrade time for me when the next generation of video cards arrives though!)
     
    Wilfred likes this.
  7. Gia2

    Gia2 Avatar

    Messages:
    358
    Likes Received:
    638
    Trophy Points:
    55
    Gender:
    Male
    Can confim Physx not using GPU unless forced thank you
    Any info about Vertical Sync - Gsync?
     
  8. Cora Cuz'avich

    Cora Cuz'avich Avatar

    Messages:
    4,648
    Likes Received:
    7,614
    Trophy Points:
    153
    Location:
    Veritas Sanctuary
    Is this a game setting, or something found in your device drivers?
     
  9. Xithar

    Xithar Avatar

    Messages:
    21
    Likes Received:
    36
    Trophy Points:
    3
    Location:
    Germany
    It's a system setting of Nvidia Control Center. If you have NVIDIA drivers installed from the Nvidia Homepage right click at an empty space on your desktop. In the context menu showing then click NVIDIA Control Center (the name might be a little different, mine isn't installed in english)
    If you use custom drivers or nvcleaninstall (which is a very nice tool, I put a link below) it might be that you have to install it from Microsoft store.

    Within NVIDIA control center select on the upper left side "Configure Surround, PhysX" and select your GPU in the setting on the right side. Here is a link to a screenshot. It's in German, but the buttons should be on the same position on English installed systems

    https://drive.google.com/file/d/1ykjn-OtBN45n5bnoSXIoy9dMmK0pKMQA/view?usp=sharing

    For people who don't like NVIDIA spying too much ("telemetry") as well as want to get cleaner installs of the driver take a look at this small tool:
    https://www.techpowerup.com/download/techpowerup-nvcleanstall/
     
    Last edited: Jul 11, 2020
    Wilfred and Anpu like this.
  10. Net

    Net Avatar

    Messages:
    3,727
    Likes Received:
    11,178
    Trophy Points:
    153
    NVIDIA Control Panel, I actually have system in English, because it is so much easier to find on-line help for English settings than for my language.

    And thanks for the nvcleanstall tip, I have to check it out since it is getting really hard for me to get clean drivers from NVIDIA...
     
  11. Cora Cuz'avich

    Cora Cuz'avich Avatar

    Messages:
    4,648
    Likes Received:
    7,614
    Trophy Points:
    153
    Location:
    Veritas Sanctuary
    I have an AMD card, but thanks.
     
  12. Alley Oop

    Alley Oop Bug Hunter Bug Moderator

    Messages:
    15,679
    Likes Received:
    19,463
    Trophy Points:
    153
    side note: nvidia physx on linux requires cuda, which is not automatically installed.
     
    Last edited: Jul 12, 2020
  13. Xithar

    Xithar Avatar

    Messages:
    21
    Likes Received:
    36
    Trophy Points:
    3
    Location:
    Germany
    I have some interesting new findings. Most of them are most likely very hardware dependant. I haven't tested these for a longer time yet, but nevertheless the results looked very promising.

    Let's test some startup parameters:
    -force-vulcan
    The game will use the Vulcan API instead of DirectX 11. If I remember it right Vulcan is better supported by AMD, both CPU & GPUs. On my PC it did both heighten the framerate, as well as made the game look a bit better.
    -force-d3d12
    The game will use DirectX 12 instead of 11. This will only work if you use Windows 10. With my PC it got faster and also looked a bit better, but some graphic bugs I have in SotA got a bit worse (flimmering lines). Also some objects tend pop up later with this parameter, especially when I run through a small city (I tested it in Mud).
    -force-d3d11-no-singlethread
    I'm not 100% sure about the "-no-singlethread" ones, in other games it usually enables more multi core CPU use instead of running mostly at one core. But when looking at my performance graphs I can't see that in SotA, it did use all cores already. Instead I think the CPUs get a bit more used over-all. This did sometimes double my framerate. I think it's especially a feature if your CPUs run under 50% use while you play SotA.
    -force-d3d12-no-singlethread
    Like before, just with DirectX 12
    -force-vulcan-no-singlethread
    Like before, just with Vulcan
    ( -force-glcore )
    Did not work on my PC. Might perhaps work with older cards, or older Windows, or perhaps if you use Linux or a Mac.
    ( -force-metal )
    I think this option is for Mac Users only, maybe it might also work with Linux. I thought Metal was a Parallels feature, but am not sure about it.
    Also I guess adding -no-singlethread might work with these two, too.

    How to use startup parameters:
    With Steam: Go to Steam Library page > right click Shroud of the Avatar > Set startup options, then enter the parameter there
    Without Steam: Go to the folder where you did install SotA, copy the SotA launcher then right click at an empty space on the Desktop > Insert shortcut
    Then rightclick this shortcut > properties > and add behind the "target" a space and the parameter afterwards.
    As an example: if the target is "d:\sota\Shroud of the Avatar.exe" change it to
    "d:\sota\Shroud of the Avatar.exe" -parameter

    Happy testing ;)
     
    Last edited: Jul 13, 2020
    Anpu likes this.
  14. Alley Oop

    Alley Oop Bug Hunter Bug Moderator

    Messages:
    15,679
    Likes Received:
    19,463
    Trophy Points:
    153
  15. AoiBlue

    AoiBlue Avatar

    Messages:
    406
    Likes Received:
    319
    Trophy Points:
    55
    Gender:
    Male
    Unfortunately the launch script in the Linux Steam release is removing the launch parameters. Could we see about getting this fixed?

    p.s. I noticed something earlier when examining the SOTA process' open files.

    It seems it's not holding the chat log file open. If it is opening and closing the file each time it writes to it this could create MASSIVE heap bloat.

    I was looking into the proper way to do this while keeping the file open. The proper way is to create a file handler object and add the new lines with System.IO.TextWriter. I'd recommend using the async string at once methods to append lines.

    I also noticed a series of Memory IO objects under the System.IO class you could use for the chat buffer in the windows instead of an ever growing string. This could also see improvements. There is also a nice fixed size one, although you would need a cleanup routine to cut the partial lines at the top.

    I don't know if this issue is upstream in a component gotten from the Unity Store, but you should look into it if this is the case.

    As a note, maybe my utils are just looking in the wrong place for the file handle and this is a red herring.

    Edit: More details.
     
    Last edited: Jul 14, 2020
Thread Status:
Not open for further replies.