Shader Cache on slow HDD

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by hemla, May 6, 2018.

  1. hemla

    hemla Member Guru

    Messages:
    160
    Likes Received:
    7
    GPU:
    nvidia
    I got slow HDD and wonder should I be using NVidia Shader Cache. Most of games I run are older titles that barely use 50% of my GPU/CPU power, yet in many cases I can still notice frame rate drops and skippy frametimes. Should I disable Shader Cache? Also, is it possible to move NVidia Shader Cache to RAMDISK and would it matter?
     
  2. Vidik

    Vidik Master Guru

    Messages:
    559
    Likes Received:
    139
    GPU:
    MSI 1070 Gaming Z
    Yes you should use Shader Cache. SSD/HDD speed doesn't really matter in this case because shaders are compiled once for each application so that they could be just loaded in when you run the application next time. You'll make your GPU work extra and get longer loading times by disabling Shader Cache. As for frame rate drops and skippy frametimes, look elsewhere.
     
    Last edited: May 6, 2018
  3. hemla

    hemla Member Guru

    Messages:
    160
    Likes Received:
    7
    GPU:
    nvidia
    What about moving dx/nv Shader Cache folder to RAMDisk?
     
  4. RealNC

    RealNC Ancient Guru

    Messages:
    3,139
    Likes Received:
    1,363
    GPU:
    EVGA GTX 980 Ti FTW
    No. Shaders are small and loaded very fast. Shader compilation is slow.
     

  5. dani_tx

    dani_tx Member

    Messages:
    19
    Likes Received:
    4
    GPU:
    EVGA GTX 1080 FTW
    @hemla currently my nv shader cache is located on RAMDisk along with browser cache,downloads etc.I can't tell you that it's faster this way or not but can confirm that it's possible to move it to RAMDisk without worrying about any errors or bsods etc.

    P.S. Judging by what @RealNC posted about the slow compilation time,relocating it to RamDisk should decrease that time significantly.
     
  6. hemla

    hemla Member Guru

    Messages:
    160
    Likes Received:
    7
    GPU:
    nvidia
    AFAIK compilation as per "creation of shaders by CPU for the first time".
     
  7. VAlbomb

    VAlbomb Member Guru

    Messages:
    152
    Likes Received:
    4
    GPU:
    Nvidia G1 Gaming GTX 970
    as far as I know you can't actually disable Shader Cache compilation, the setting in the control panel only disables the Shader Cache being saved to the HDD, the Shaders Cache is still going to be created and used but this time they are saved to the RAM and later flushed so a RAMdisk is kinda redundant unless you wish to keep the cache forever by making backups before deleting the RAMdisk., this should provide with the fast RAMdisk and eliminate the stutter from shader being created.
    There is one setting you can access using Nvidia Inspector Profile and the advanced unknown settings that can disable some(but not all) shader compilation under PS_ASYNC_SHADER_SCHELUDER_FLAGS
     
    Last edited: May 8, 2018
  8. Astyanax

    Astyanax Ancient Guru

    Messages:
    5,354
    Likes Received:
    1,590
    GPU:
    GTX 1080ti
    How did you come to that conclusion based on what RealNC said?

    its a wrong one.
     
  9. Netherwind

    Netherwind Ancient Guru

    Messages:
    7,153
    Likes Received:
    1,203
    GPU:
    MSI RTX 2080Ti
    I understood his post like this:
    Shader Cache compilation is slow but is only done once per game
    Shader Cache load is fast and is done every time you start the game
     
  10. RealNC

    RealNC Ancient Guru

    Messages:
    3,139
    Likes Received:
    1,363
    GPU:
    EVGA GTX 980 Ti FTW
    Well, maybe it's confusing to someone who doesn't know how shaders are handled. So:

    Shaders are loaded by the game like any other of their assets, and sent to the driver for compilation (meaning transformed from source code form into binary form that can be used by the GPU.) The driver compiles them and sends the results back to the game. The compilation happens by the CPU, not the GPU, and is slow.

    A shader cache doesn't get rid of the loading-from-disk step. It only replaces the compilation step with a second loading step (loading the previously compiled form of the shader from disk and sending that to the game.) Even with a very slow disk, loading small already compiled shader files from said disk is much faster than generating them again.

    Also, the shader cache is meant to persist between reboots. Putting them on a RAM disk meaning losing the cache on reboot (unless you're syncing the RAM disk to disk on reboot.)
     

  11. dani_tx

    dani_tx Member

    Messages:
    19
    Likes Received:
    4
    GPU:
    EVGA GTX 1080 FTW
    So instead of helping OP here you all going after my comments??? *-* Removed
     
    Last edited by a moderator: May 13, 2018
    snight01 and jdc2389 like this.
  12. jbmcmillan

    jbmcmillan Ancient Guru

    Messages:
    2,695
    Likes Received:
    236
    GPU:
    Gigabyte G1 Gaming GTX970
    Jeez relax kid this is the internet.
     
  13. hemla

    hemla Member Guru

    Messages:
    160
    Likes Received:
    7
    GPU:
    nvidia
    I have used WinPrefetchView and found out that for certain applications, certain nv shader cache files are listed there while others not. Those are listed under application names. Sadly I don't know how to check what SuperFetch stores.
     
  14. RealNC

    RealNC Ancient Guru

    Messages:
    3,139
    Likes Received:
    1,363
    GPU:
    EVGA GTX 980 Ti FTW
    I don't know what your issue is, but I wasn't talking to you specifically.
     
    tiliarou likes this.
  15. tiliarou

    tiliarou Active Member

    Messages:
    53
    Likes Received:
    2
    GPU:
    Nvidia 980M
    8 messages and already insulting others ? Good job.

    Not only were they helping the OP to understand, they were also absolutely polite and not attacking you, while at the same time mentioning that your setup is not really useful in getting more performance, but as well risky since you could lose the cache on unexpected reboot or power loss.
     

  16. vbetts

    vbetts Don Vincenzo Staff Member

    Messages:
    14,894
    Likes Received:
    1,452
    GPU:
    RTX 2070FE
    Hey folks. Get back on topic, help that OP!
     
  17. SpookySkeleton

    SpookySkeleton Member Guru

    Messages:
    129
    Likes Received:
    19
    GPU:
    GTX 1080
    In my own flesh and experience i can say, no the shader cache doesn't improve performance in a faster disk.
     
  18. RealNC

    RealNC Ancient Guru

    Messages:
    3,139
    Likes Received:
    1,363
    GPU:
    EVGA GTX 980 Ti FTW
    How did you measure this? (Note that this doesn't affect FPS.)
     

Share This Page