How to flush / garbage collect GPU memory - Windows 10 - Nvidia Geforce GTX 1050 Ti

Some of the applications / game i play have GPU memory leakage

The gpu memory used gets increased over time

Even after I close the game / apps gpu used memory is still there

When I disable GPU from device manager and enable back GPU memory is cleared

But I wonder if there is any software / command etc to flush GPU memory?

I have Geforce GTX 1050 Ti and I am using Windows 10

1

1 Answer

You can probably get a toggle off/on going though a powershell script like so.

  • Open Windows Powershell ISE and copy paste the following code into it

    {

    #Disable the GPU

    Get-PnpDevice -FriendlyName "GPU NAME" | Disable-PnpDevice

    #Adjust wait time to any amount you want

    Sleep -Seconds 5

    #Enable the GPU

    Get-PnpDevice -FriendlyName "GPU NAME" | Enable-PnpDevice

    }

  • Replace "GPU NAME" with the exact name of your GPU as seen inside device manager. This is the "Friendly Name". Not all commands work with friendly name though so you might need to use the -Deviceid argument instead of -FriendlyName and retrieve the Deviceid by right clicking > properties on the GPU inside device manager.

  • Save the script to your desktop and right click > run with powershell

This should now toggle your GPU off/on. For other ways to clear the ram cache you'll have to check out the NVIDIA development forum. There are some things you can script with NVIDIA GPU's. A few sample scripts should be available for you to check out here on your local C Drive:

C:\Program Files\NVIDIA Corporation\NVIDIA WMI Provider\Samples

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like