Fix game stutter on Win 10 1703-1809

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by Exostenza, Apr 3, 2018.

  1. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,540
    Likes Received:
    13,556
    GPU:
    GF RTX 4070

    But have you tried to disable prefetching ?
     
  2. JonasBeckman

    JonasBeckman Ancient Guru

    Messages:
    17,564
    Likes Received:
    2,961
    GPU:
    XFX 7900XTX M'310
    Superfetch whether set to 1 or 2 or 3 doesn't seem to change the cache behavior and there's a lot of varying info on if 1 or 2 is app or boot mode for either prefetcher or the superfetcher.
    I tried each though but it didn't affect how it caches stuff, tries to use as much RAM as possible even now after 2 days with no actual gaming activity (Browser then I guess is most of what the cache consists of.) though it does leave a bit free so it's not entirely overtaken by the cache which seems to be when performance drops as it keeps unloading and loading new cache data instead of keeping a buffer of entirely empty space in RAM.

    EDIT: Disabling superfetch should work though so a value of 0 and maybe checking so the SysMain service is not currently running or even a combination of 0 and setting SysMain to disabled? (If it's not a protected service.)

    But that also impacts performance a bit on HDD's and possibly even SSD's although from my own testing it's minimal.
    (Then again that's gaming and they always load a lot of data back and forth whereas an application might be more lightweight. Still say folder or program exclusions for what you wouldn't want in the cache or being fetched wouldn't hurt if it's in excess of available RAM.)


    EDIT: Hmm wonder if the OS is a bit different in newer builds of Windows 10 in general in regards to prefetching data or using the superfetch function.

    1 or 2 both seem to create prefetch (.pf) files for software even if one of these should only be for boot mode and as the OS is starting up and keeping these loaded and initialized early.

    And superfetch seems to be the same plus the addition of using cached memory to jam in a lot of other data. :p
    Not a bad idea I suppose if the OS or well the system is fast enough HDD and RAM wise for the operation but some program several Gigabytes large is going to take a while to load into memory and it's only going to be partial due to size constraints.

    And with multiple games it'll have to dump the data anyway so it can load the new stuff though I doubt it's intended for gaming really compared to storing applications and software that have a smaller footprint in memory.
    (Well mostly, some apps can also be pretty memory hungry ha ha.)
     
    Last edited: Oct 3, 2018
  3. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,540
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    @Dynarush_333 It is not clear whether you solved the issue with OP tool(s) or it was fixed by MS...
     
  4. gl0w

    gl0w Guest

    Messages:
    1
    Likes Received:
    1
    GPU:
    GTX 1070
    @Dinarush_333

    Could you clarify how you fixed it?

    Hi everyone, I have been following this topic for a while, as I'm the ones affected by the standbylist issue, mainly on BF1.

    First I have used the schedule bat file, which does not work as I would like (sometime is doesnt initiate on startup) and i always had to check manually if the task is active, etc etc.

    So, for now i'm using the app tool by wagnard, which is very good as it keeps the standby memory / free memory in a good size not causing any stuttering in BFV.

    So thank you all for temporary helping me fixed my issue! :)
     
    Smough likes this.

  5. AveYo

    AveYo Member

    Messages:
    43
    Likes Received:
    48
    GPU:
    8800GS 384MB
    Something is wrong, maybe a copy-paste issue?
    Use the download button on pastebin link to directly download the script as .bat,
    or the download ZIP button from gist https://git.io/FreeStandbyMemory.bat
    Run the script to create the schedule, don't add it yourself by hand!
    It's possible a lame antivirus might interfere with the setup (for no other reason than creating a system task)
    for example Defender smartscreen will initially block it, so just pick run anyway and it will be fine from then on

    Anyway glad these are now almost obsolete.
    MS will surely back-port any fixes to older versions in future cumulative updates.
    Btw, I've made a MediaCreationTool.bat wrapper for all RedStone versions 1607-1809
    (if you need an older ISO/USB or upgrade to intermediary versions - business channel too)
     
    Last edited: Oct 3, 2018
    Exostenza likes this.
  6. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,540
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    OK, finished the testing, now need some time for the refactoring...
     
  7. SpookySkeleton

    SpookySkeleton Member Guru

    Messages:
    153
    Likes Received:
    23
    GPU:
    RTX 3090
    8 hours of uptime on 1809 baking some fluids on blender, and the overall performance degradation over time is not as bad as 1803, is not fluid as a fresh system restart but i guess is a little fixed now, i can game or do other stuff while i wait to the bake to finish and not in need to restart the system to do other stuff after the bake is finished of course a restart is suggested for a better performance but at least 1809 apparently fixed this a little..
     
    AveYo likes this.
  8. Wagnard

    Wagnard Ancient Guru

    Messages:
    2,746
    Likes Received:
    519
    GPU:
    MSI Geforce GTX 1080
    Updated ISLC to 1.0.0.5
    Nothing much...

    Changes since 1.0.0.4
    - Code cleanup and several optimization on the GUI updating (WPF binding)
    - Others misc stuff not worth to mention.


    SHA1: 411216788D75656DA4C9A841B4B909D296B10A31


    Note: I was asked by some if it add registry key for settings or anything.
    No, ITSC doesn't add anything to the registry or files, it play only with what it has in it's own directory.
    No playing around with task Scheduler either.
    The app is portable.
    Only need .NET 4.6+ (can lower requirement if asked)
     
    Last edited: Oct 3, 2018
    Koniakki, joe187, gl0w and 1 other person like this.
  9. joe187

    joe187 Master Guru

    Messages:
    495
    Likes Received:
    22
    GPU:
    EVGA RTX 3070ti FTW
    Thanks so much for this tool. I love it!
     
    Wagnard likes this.
  10. Exostenza

    Exostenza Maha Guru

    Messages:
    1,408
    Likes Received:
    748
    GPU:
    MSI 4090 GT
    I am on 1809 and do not have any stuttering anymore... looks like they fixed it in that patch on 1803.
     

  11. Wagnard

    Wagnard Ancient Guru

    Messages:
    2,746
    Likes Received:
    519
    GPU:
    MSI Geforce GTX 1080
    It's not completely fixed on my end when playing BF1. I do get occasional stutter if my free memory is 0 and I have a few GB of standby list. It's definitely better than the old version of Windows but when I clear the list the stutter is completely gone.
     
    Dynarush_333 likes this.
  12. Wagnard

    Wagnard Ancient Guru

    Messages:
    2,746
    Likes Received:
    519
    GPU:
    MSI Geforce GTX 1080
    *Updated to 1.0.0.6*
    Changes since 1.0.0.5
    - Free Memory and Standby list value now more precise (same as task manager)
    - More CPU efficient.
     
    Shakur92 likes this.
  13. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,540
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    @Wagnard

    Btw, you can use attribute System.Security.SuppressUnmanagedCodeSecurity for methods which call unmanaged functions (or COM, WMI ones) to speed up a bit. And attribute System.Runtime.ExcpetionServices.HandleProcessCorruptedStateExceptions to intercept exceptions when something went wrong in P\Invoke layer itself (like memory corruption).

    Example:
    Code:
    using System.Security;
    using System.Runtime.ExceptionServices;
    ...
    [SuppressUnmanagedCodeSecurity]
    [HandleProcessCorruptedStateExceptions]
    public void Execute()
    {
       try {
          ...
       }
       catch(Exception ex)
       {
          ...
       }
       ...
    
    https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ett3th5b(v=vs.100)

    Without HandleProcessCorruptedStateExceptions try - catch in your code will not catch such P/Invoke raised exceptions.
     
    Last edited: Oct 5, 2018
    Wagnard likes this.
  14. Wagnard

    Wagnard Ancient Guru

    Messages:
    2,746
    Likes Received:
    519
    GPU:
    MSI Geforce GTX 1080
    Thanks for the tip man, I'll sure try it out
     
  15. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,540
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    I wrote a system service some time ago which utilized ETW. (The amount of P/Invoke code was staggering.) And tester noted me that service was stopped due to error several times. Only after I applied HandleProcessCorruptedStateExceptions to methods I managed to intercept exceptions from ETW P/Invoke code preventing the abrupt stopping of whole service.
     

  16. Wagnard

    Wagnard Ancient Guru

    Messages:
    2,746
    Likes Received:
    519
    GPU:
    MSI Geforce GTX 1080
    Ill probably not use it unless necessary as there is some security risk associated with this.
     
  17. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,540
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    There is not. Do you use Win API functions which can bring harm being called through your code?
     
  18. Wagnard

    Wagnard Ancient Guru

    Messages:
    2,746
    Likes Received:
    519
    GPU:
    MSI Geforce GTX 1080
    Maybe NtSetInformationProcess
    But I checked only really fast what you told me, maybe I didn't understand it all.
     
    Last edited: Oct 5, 2018
  19. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,540
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    This security check is not about monolith standalone application which your tool is. It is about multi-layered multi-component systems like Web-services, WCF-services, hosted by some servers. Say you create assembly with component which calls some unmanaged function from server API. To do that this component should be labelled as full trust. But since component can be visible to many other components (hosted nearby) they can access it and call its public code. To protect from execution of full-trust-code (which calls unmanaged code) by another not-full-trust-code, .Net framework right at run time checks whole call stack for the level of trust, and if somewhere up the call stack there is less trusted code framework will fail the call.
    When you apply SuppressUnmanagedCodeSecurity attribute to your code (which calls unmanaged code),.Net framework instead of full call stack walk and check at run time checks the level of your code only during JIT-compilation from IL-code to native code.

    May be this optimization does not gain much, but considering this call stack walk and check as completely unnecessary because for your application it will never fail the call, even little gain is a win.
     
    Last edited: Oct 5, 2018
    Wagnard likes this.
  20. Wagnard

    Wagnard Ancient Guru

    Messages:
    2,746
    Likes Received:
    519
    GPU:
    MSI Geforce GTX 1080
    Thanks for the explanation , It make a lot more sense to me now. Guess I should hire you for optimizing my code on DDU and else haha.:D
     

Share This Page