VRAM Cleaner 1.0.2

Do not ask when mod authors will update their mods or if they can upload older versions of their mods.
Bothering mod authors will lead to warnings and repeat offenses will lead to bans.
Due to an unusually high volume of traffic, our site may be experiencing intermittent slowdowns. If you notice any issues, log out of your account and browse anonymously so you can better utilize caching or try using forge.sp-tarkov.com to search for and download mods.

Clears up unused assets after raid start timer finishes

Have you ever wanted to play SPT at 12k resolution but your VRAM keeps maxing out?


Well, now you can! No not really, but this mod should help clear up about 1-2GB of VRAM. There will be a small lag spike right after the start raid countdown finishes, this only happens once at the start of each raid.


If it isn't obvious, this is different than - Ram Cleaner Fix - No they will not conflict, you should be able to run both without issue. My mod unloads unused assets such as textures, meshes, and audio and as a result, clears up a chunk of VRAM. Ram cleaner fix runs BSG's code to "clean" RAM (not VRAM) on an interval, in reality what BSG's code does is actually just allocate the RAM to your paging file.


After testing, I haven't noticed any negative side effects from this, I also can't confirm if it'll cause issues for other mods that load any assets like textures/models. If anyone does notice any negative side effects let me know what it breaks and I'll add a list here for what it's not compatible with. It should definitely work with base SPT and other just general non-asset related mods.


I've made this mainly for the SPT VR mod I'm working on because VRAM usage can get pretty insane on there, figured it'd be better as a mod on its own though because I tested it on flat screen and found it clears up a good amount of VRAM even on there. Check out SPTVR - SPT-VR


Warning:

I've heard from 2 testers of the sptvr mod that after installing this, they got an issue where their gun would shoot once then stop firing. I personally haven't been able to reproduce this and I'm also unsure if it's a mix of using it with sptvr or if it's just an issue with this mod in general. If anyone does notice this happening on flatscreen too, please let me know.


Compatibility:

This may have compatibility issues with the declutter mod


Install instructions:

  1. Move Bepinex folder into your SPT folder
  2. Don't install onto a fika headless client


Support me on ko-fi <3 https://ko-fi.com/matsix

  • Version 1.0.2

    Hotfix:

    • Added a check to see if the cleaner ran at the start of the raid and avoid any calls to run it again during raid (this is just for compatibility sake with other mods if there's any UI mods that call EFT.UI.PreloaderUI.ShowRaidStartInfo regularly)


    Also, just want to explain something about this. I know someone in the comments mentioned that EFT allocates VRAM so this mod could functionally be doing nothing. I'm not so sure about that though, something weird is going on. When you use the fps 3 command to view VRAM usage, you'll notice, none of the VRAM usage numbers in there change with this mod installed vs not installed. Despite that, VRAM usage still shows a considerable drop in windows task manager. I have no idea what's going on here but it doesn't seem to break anything so it could be BSG not handling VRAM allocation right or something weird is going on with the fps 3 command monitor.

  • Version 1.0.1

    Hotfix:

    • Much cleaner initiating of the cleaner, I noticed it didn't always work with Fika because the countdown timer doesn't always reach 0 when you run a headless client. No more delay involved, found a different method to connect it to and it'll happen as soon as the raid start countdown finishes
  • Version 1.0.0

  • Just to give an idea on how this can help, if you're like me and you were ripped off by Nvidia with their low VRAM graphics card models like the 3080 10GB model... This can help quite a bit with avoiding VRAM maxing out and reducing VRAM induced stutters.


    It is especially helpful in the SPTVR mod I am also working on. In flatscreen tarkov I usually get around 8GB VRAM usage, using this reduces it down to 6-7. In SPTVR I end up capping it out often at 9.7GB and it starts spilling over to RAM causing stutters and just overall bad performance. With this mod, it goes from 9.7GB to 7-8GB.


    I have no idea what it's clearing out and I also have no idea why this is NEVER ran in BSG's code took a closer look and it looks like BSG does run it occasionally but it seems like only after a raid. From what I can tell when searching about the method I'm running in here, it is common practice in Unity games to run this when loading new scenes.

    Heart 1
  • is it possible that this mod can increase power usage? i was having a problem where my circuit would trip and it only stopped when i deleted this mod. To be clear this wouldn't be the mods fault, more that I'm playing on a 3050 laptop w/ 4gb vram in case any others encounter tripped circuits and cant work out why.


    edit: i was having a separate issue where my game would freeze mid raid and seemed to be a vram max out issue and this mod definitely helped stop that so it works, just in my case for some reason the power would trip the circuit

    • No idea how this would increase power usage. The method that is ran here is also ran after a raid by BSG so the game already runs this at other times in the game without the mod, this mod just makes it run at the start of the raid. So it'd make little sense for it to cause that.

  • Your mod definitely works. Im hosting a FIKA server for me and 3 friends and your mod was the only way to getting off my stutters. I use a 3070TI and a 7800X3D with 32GB ram.


    so thx for your mod. literally game changer.

    Heart 1 Thumbs Up 1
  • v1.0.1 didnt get flagged as malware but 1.0.2 did whats up with that?

    • It's probably the same false positive that happens with many mods. No idea what triggers it but there's no big difference in the code other than a check to see if the cleaner ran already. You can check the source code on github, it's very simple and should be pretty easy for anyone to see it's not malicious.

    • all good just thought id let you know

  • Does garbage collector actually clear VRAM?

    I'm experiencing screen freezing with LS Frame Generation due to VRAM exhaustion and was hoping this mod would remedy this, but it didn't help much unfortunately.


    Also would be nice to have an option to limit video memory allocation and leave some headroom, kinda like how recent COD games have a memory target (85%, 90%, 95%). Not sure where to even begin with about making such a mod.

    • Garbage collection is just done before the method that is ran here that actually seems to "clear" vram usage. The method that is actually doing the work is Resources.unloadunusedassets();. Which to my knowledge looks through the scene and clears out textures, mesh's, and audio that is not being used for anything. But yeah, I wouldn't know how to actually adjust Tarkov's vram allocation, never looked into it and it's probably not a good idea to mess with it.

      Thumbs Up 1
  • Hello, I come with a problem that when I installed the spt mod (I also use the fika mod), when I play it freezes, when I'm in a raid it freezes all the time, I repeat it and it wasn't like that before that it freezes, I have a weak computer but it wasn't like that if I didn't install spt fika, what should I do in such a situation? 😕

    • I've only heard this happen for people when they install this mod on the headless client too. It should only be installed on your own client.

    • Well, I have the mod installed on my own client so I don't know what's going on...

    • This is the first time I'm hearing of this issue happening on Fika. This mod only runs something right at the start of the raid, so if this is happening mid raid, I'm not sure what's going on. If you can send over your logs that would be helpful. Also, are the freezes hard freezes or does it freeze for a few seconds then come back?


      What other mods do you have installed?

    • Sorry I didn't answer but I had some things on my mind so that's what I have (spt tarkov with fika) and the freezing lasts a few seconds and then comes back exactly like that on the streets of Tarkov I have more freezing and it lasts a few seconds and comes back on other maps yes I don't have more but yes I have freezing yes I have mods but I have so many of them that I don't know how to show them and since you write about logs please provide them: logi

    • If you have any UI mods, that could be what's causing it. Something might be triggering the preloaderUI to run the ShowRaidStartInfo method randomly throughout the raid which would cause this VRAMCleaner to run also every time it does. I'll put out a small update to make it check if the cleaner already ran during a raid and skip if it has.


      Also, that log file you sent is set to private. Let me just get this update out and then you can try it again, I have a feeling that's what's happening.

  • Will this mod remove the need to turn off Low texture Streety : )

    • download declutter mod.

    • Maybe it could help with running it at medium textures. It could possibly help with running at high if you have a card with 12GB of VRAM. I've tested high on my 3080 and was still maxing out at 9.7GB

    • Are you sure that the "usage" of VRAM, not "allocated"? I've seen Tarkov allocating all my 16gb vram, same as ARMA 3. You can easily check the usage by app with Rivatuner.

    • I'm not sure what you mean but all this mod does is clear assets that are not being used anywhere during gameplay like textures, audio, and meshes. So if tarkov is allocating VRAM, it's still allocating it.

    • Ii6pjyX.pngWhat I mean is this basically, you have the game reserving a chunk of your vram and then actually utilizing it. As you can see, Total VRAM is 10gigs, The reserved is 9.2 which is the max after Windows also using it in the background and then the actual usage which is between 4.9 and 5.2. Tarkov will just reserving almost whole your VRAM just to be safe but that doesn't mean it's gonna use it all.

      Apps like RTSS, nvidia or amd overlay will show the reserved by default, you can edit your RTSS overlay to make it show the actual usage. Or, just use the in game FPS 2 or whatever that brings out this statistics.

  • this thing is literal life saver and seems working pretty good also i have a lot of mods that contains new textures for now there is no problems i will report if i have any problems

    Heart 2
  • Is this the same "thing" as the Ram Cleaner Fix, or that one cleaning the PC's RAM and yours cleans the GPU's RAM?

    Crying 2 ? 3
    • The title says VRAM, the description says VRAM, the pinned comment says VRAM, 3 comments below I say it's different than ram cleaner, idk how much clearer I can be aquadesperate

      ? 1 Happy 3 Heart 1
    • I read the descriptions and a few comments they both say "this mod does what BSG should have done", which is why I asked because the wording of both mods is similar in some areas, but I must have skipped over relevant terms.

      However, no need to be snarky about it.

    • I mean, that's literally not said anywhere so that just tells me again that you didn't read anything. I wouldn't have been snarky if it wasn't blatantly obvious what this does and if I didn't give the exact answer to your question a few comments below yours.

      Heart 1
    • https://imgur.com/a/8AbwrFF

      Descriptions or comments from both mods saying, or at least heavily implying, that BSG should have been doing what both mods do from the start.

      ? 1
    • Okay well, that's not what was said. If you think that's what's "implied" then that's your own interpretation. However, you said we both "say" that and neither of us did say that. Not to mention, "ONLY" and "NEVER" are two very different words. I work on these mods for free and share what I'm working on with people.


      The absolute least I expect from people is to do a bit of reading into what they're downloading. Idk why you're trying so hard to prove your point here because nothing you're saying makes sense. Just read more when you download mods before asking questions. Like I said in the first reply, even the title says VRAM so why you're questioning whether this is for video card memory or normal memory is beyond me. Hell, even the picture for the mod has a graphics card in it, not a RAM stick.

  • Does this happen to be back-compatible with SPT 3.10.5? If not, can I request for one?

    • Wouldn't hurt to throw it in there and try, won't break anything. If it doesn't work just remove it and sorry I won't make a version for 3.10 if it doesn't.

    • Gotcha! I did and there seems to be no error so far for both the headless and server, but I have no way to test it for myself if it does actually work. This does not have an F12 config, right?

    • Idk if you mean that you have it installed on headless but it shouldn't be installed on the headless client, only your own client.


      One way you can tell if it's working is if you notice the game freeze for a second or two right after raid start countdown. Another way is by enabling console logging then restarting the game, after countdown finishes, you should see a warning log that says "Unused Assets have been unloaded - VRAM Usage cleaned" If it says that then it definitely should be working.

  • N O I C E

  • Just wanted clarification, is this different from the Ram Cleaner fix mod?

    • Yes

    • Very different, that mod just runs the RAM cleaner on an interval that BSG has running every time you open inventory. This is for VRAM which is different, VRAM is your video card memory and this only runs once at the start of each raid.

      Heart 1 Thinking 1
    • i play on integrated amd card without memory at all on hdd on old matebook huawei and i have 20 fps! can u imagine my stable and tail? RAWR! bugcatrainbow bugcatworking

  • can i still benefit from this mod even if i have enough vram left ?

    • I'd say try it and see if it makes any difference. I've got a 3080 10GB model so I'm pretty limited, I'd imagine this would help mostly for people with lower end cards with not much VRAM to spare. This should actually do a bit more than clear up VRAM but that seems to be the main benefit I've seen from it.

      Heart 1
  • can this be used with ram cleaner fix?

    • Yes, shouldn't conflict with that at all.

      Happy 1