Shader Cache on slow HDD

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

  1. hemla

    hemla Master Guru

    Messages:
    239
    Likes Received:
    27
    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:
    620
    Likes Received:
    221
    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 Master Guru

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

    RealNC Ancient Guru

    Messages:
    5,089
    Likes Received:
    3,372
    GPU:
    4070 Ti Super
    No. Shaders are small and loaded very fast. Shader compilation is slow.
     

  5. dani_tx

    dani_tx Member

    Messages:
    23
    Likes Received:
    6
    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 Master Guru

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

    VAlbomb Guest

    Messages:
    152
    Likes Received:
    6
    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:
    17,035
    Likes Received:
    7,378
    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:
    8,839
    Likes Received:
    2,415
    GPU:
    GB 4090 Gaming OC
    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:
    5,089
    Likes Received:
    3,372
    GPU:
    4070 Ti Super
    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:
    23
    Likes Received:
    6
    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 Guest

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

    hemla Master Guru

    Messages:
    239
    Likes Received:
    27
    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:
    5,089
    Likes Received:
    3,372
    GPU:
    4070 Ti Super
    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:
    61
    Likes Received:
    13
    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:
    15,140
    Likes Received:
    1,743
    GPU:
    GTX 1080 Ti
    Hey folks. Get back on topic, help that OP!
     
  17. SpookySkeleton

    SpookySkeleton Member Guru

    Messages:
    153
    Likes Received:
    23
    GPU:
    RTX 3090
    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:
    5,089
    Likes Received:
    3,372
    GPU:
    4070 Ti Super
    How did you measure this? (Note that this doesn't affect FPS.)
     

Share This Page