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,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    Well, there are many project team paradigms where the code of each team member is reviewed by another members or by dedicated one. I could do that for you.

    PS But I bet DDU is optimized and free of bugs being developed for so long.
     
    Last edited: Oct 6, 2018
    AveYo and Exostenza like this.
  2. Wagnard

    Wagnard Ancient Guru

    Messages:
    2,746
    Likes Received:
    519
    GPU:
    MSI Geforce GTX 1080
    You'll be surprised, there is probably a lot of place for optimization and code cleanup. I just did a major class rework with the Realtek cleanup. When I started DDU, I was a complete beginner in VB.net. I did have some notions of Basic from a Tandy Color computer (Radio Shack).
    So I've learn with my best friend (Google) how to make things work by looking at others code and slowing (even now) trying to have good programming practice.

    DDU is open source on Github and you or anyone else is welcome to push code there for getting it better/ more efficient or simply learn from it.
     
  3. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    Most programmers hate to browse source files from others. But I like to do that. If code is good I can enjoy it and learn, if code is not good I can laugh...
    Have you contributors at Gtihub?

    You can watch source file of my version of this tool. I plan to publish it today. But I prefer C# since its syntax is closer to C++ which was my professional language for many years.
    Back in 80s and 90s Pascal was considered as one of the best languages to study programming.
     
    Wagnard likes this.
  4. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    @Dynarush_333
    Here you go
    http://www.mediafire.com/file/r5p3icyvnecm6np/PurgeMemCacheService.zip/file#

    Bundle contains folder 'PurgeMemoryCacheService' with files:
    - ReadMe.txt
    - setup.bat
    - cleanup.bat
    - PurgeMemoryCacheService.cs

    This purge memory cache tool is written in C# in the form of system service (under SCM control).
    All configuration is done in ini-file.
    Service creates its own event log 'Application and Services Logs\PurgeMemoryCacheService'.
    I have created Purge Query Language. Using this PQL syntax you can add any number of purge queries to ini-file.
    Very flexible approach which lets you schedule the purge of the standby list or the file cache or both.
    The purge can be initiated by timer or by the start of process (one or list of).
    The purge can be set to check the available physical memory against treshold value (in megabytes) - to postpone if available physical memory is higher than treshold.
    Detailed info is in ReadMe.txt.

    To set all up execute 'setup.bat' in elevated command prompt. To clean all up execute 'cleanup.bat' in elevated command prompt.

    Update: Aaaand first bug is discovered... Will fix now...

    Update: Fixed...
     
    Last edited: Oct 6, 2018

  5. disq

    disq Member Guru

    Messages:
    199
    Likes Received:
    185
    GPU:
    @mbk1969 i download your .zip file and ran setup.bat, notepad opened with the following inside:
    Code:
    # here is the typical purge query of standby list on timer (every 10 minutes) if available memory is lower then 500MB
    purge StandbyList on timer(10) with treshold(500)
    
    i closed it and it did nothing even after 10 minutes (free memory still on 120mb). Does this need additional user input into the .txt file?
     
  6. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    Look at event log 'Application and Services Logs\PurgeMemoryCacheService'.

    PS And where do you look for free memory?
     
    Last edited: Oct 7, 2018
  7. disq

    disq Member Guru

    Messages:
    199
    Likes Received:
    185
    GPU:
    It has one with "Starting the service", another with "1 queries in ini-file: purge StandbyList on timer(10) with treshold(500)" and 10 minutes later another one with "The query 'purge StandbyList on timer(10) with treshold(500)' is scheduled".

    [​IMG]
     
  8. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    OK.
    Redownload bundle http://www.mediafire.com/file/r5p3icyvnecm6np/PurgeMemCacheService.zip/file#
    Run cleanup.bat, then run setup.bat, but instead of
    purge StandbyList on timer(10) with treshold(500)
    paste this
    purge StandbyList on process(calc.exe) with treshold(500)
    to not wait 10 minutes, but schedule the purge on the start of calc.exe. And start the calc.exe when the memory is low.
    I changed (a bit) the code which compares treshold with available memory.
     
  9. disq

    disq Member Guru

    Messages:
    199
    Likes Received:
    185
    GPU:
    Win + R > calc.exe ? Nothing happens
     
  10. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    Have you rebuilt the service with new bundle?
    Have you changed the ini-file?
    Has service started?

    Are there new events in event log?
     

  11. disq

    disq Member Guru

    Messages:
    199
    Likes Received:
    185
    GPU:
    Yes, i did what you said. ran cleanup.bat > setup.bat > changed seconds line of .txt file to "purge StandbyList on process(calc.exe) with treshold(500)" > Win + R > calc.exe

    two entries on event log, one with "Starting service" another with "purge StandbyList on process(calc.exe) with treshold(500)".
     
  12. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    And events???

    I tested new code here and it worked.

    PS ini-file you mean, not txt-file?
     
  13. disq

    disq Member Guru

    Messages:
    199
    Likes Received:
    185
    GPU:
    Yep, the "PurgeMemoryCacheService.exe" file

    i'm following your instructions but it doesn't seem to work over here
     
  14. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    It can be that WMI is not working there for some strange reason.

    Download debug version
    http://www.mediafire.com/file/fr2ymt9k8nadn6q/PurgeMemCacheService_dbg.zip/file

    Do all the steps, and try this purge query
    purge StandbyList on timer(1) with treshold(500)
    - to wait only 1 minute instead of 10.
     
  15. disq

    disq Member Guru

    Messages:
    199
    Likes Received:
    185
    GPU:
    That one worked

    1 queries in ini-file:
    purge StandbyList on timer(1) with treshold(500)

    The query 'purge StandbyList on timer(1) with treshold(500)' is scheduled

    StandbyList is purged by the query 'purge StandbyList on timer(1) with treshold(500)'
     

  16. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    Can we move to a conversation, I just started, to not litter this thread?
     
    disq likes this.
  17. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    I went to bed, so I will continue the project later, but I had an idea of improvement of PQL:
    instead of "purge XXX on process(calc.exe)" I will add two forms - "purge XXX on start(calc.exe)" and "purge XXX on finish(calc.exe)" - i.e. to purge either on the start or on the finish of process(es). That gives more clear syntax and semantics, and greatly increase flexibility. Ain`t that cool?
     
  18. yobooh

    yobooh Guest

    Messages:
    260
    Likes Received:
    15
    GPU:
    Gigabyte 970 G1
    I have 2 questions:
    1) Process lasso trim memory does the same of this script?
    2) windows 10 october update still benefits for the script? There is a way to test this?
     
  19. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    OK. Next version
    http://www.mediafire.com/file/r5p3icyvnecm6np/PurgeMemCacheService.zip/file#

    Change log:
    - replaced the keyword "process" with "start" ("purge XXX on start(calc.exe)" instead of "purge XXX on process(calc.exe)");
    - monitoring of started processes is re-worked a bit;
    - calculating of available physical memory is changed to use the performance counter "\Memory\Free & Zero Page List Bytes" instead of the Win API function "GetPerformanceInfo";
    - if treshold is specified in the purge query and the query is scheduled, but "\Memory\Free & Zero Page List Bytes" is greater than treshold then informational event is written to event log with values of "\Memory\Free & Zero Page List Bytes" and treshold.

    Monitoring of stopped processes did not work out, alas. WMI is one heck of a mystery. May be later I will solve this and then I will add "on stop" feature.

    @disq Try this new version on your mysterious rig. Try this query "purge StandbyList on start(calc.exe)".

    PS And this needs to be tested on non-English locales. Who knows, may be English names of performance counters will fail on non-English locales.
     
    Exostenza and disq like this.
  20. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,543
    Likes Received:
    13,563
    GPU:
    GF RTX 4070
    Most probably.

    You can initiate the low memory state with the help of Testlimit64.exe from SysInternals Suite. Execute in elevated command prompt:
    testlimit64 -d -c NNNN
    where NNNN - the amount of MBs you want to "eat".
     
    Coldblackice and yobooh like this.

Share This Page