Mod Details

VRAM Cleaner

VRAM Cleaner 1.0.2

Created by  matsix

23.6K Downloads

SPT 3.11.4 Compatible

Clears up unused assets after raid start timer finishes

Latest Version 1.0.2
SPT 3.11.4

Updated Jun 13, 6:04 PM

Version Notes

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.

This download is externally hosted.
Always scan for viruses.

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 https://ko-fi.com/matsix

Version 1.0.2
Download Mod Version
SPT 3.11.4
Latest Compatible SPT Version

19.7K Downloads

Created Jun 13, 6:04 PM

Updated Jun 13, 6:04 PM

Virus Total Results

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
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

3.4K Downloads

Created Jun 8, 12:07 AM

Updated Jun 8, 12:07 AM

Virus Total Results

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
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

460 Downloads

Created Jun 7, 6:49 PM

Updated Jun 7, 6:49 PM

Virus Total Results
matsix Pinned

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.

1 Like
DarkEsteves

is no options in f12 menu ?

0 Likes

No need for any options. It just does one thing and there’s nothing that can be configured with it.

1 Like

ha ok thanks

0 Likes
aeyasera

i have a 3070 and tarkov was maxing my vram every raid
this mod saved me and i have way better fps now, thank you so much

1 Like
Charlomako

Thanks for this mod, I want to test if it save the nvlddmkm.sys crashing bug for 50xx gpu.

0 Likes
NRS

gread work. It frees up 1GB to 3GB of my graphics card memory.

0 Likes
walshy7

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

0 Likes

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.

0 Likes

yeah makes sense, just a very strange coincidence indeed i deleted it and havent tripped the breaker since. Anyway great mod it works without this strange coincidence i would 100% be using it

0 Likes
DiaboIo

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.

2 Likes
Tweek9690

v1.0.1 didnt get flagged as malware but 1.0.2 did whats up with that?

0 Likes

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.

0 Likes

all good just thought id let you know

0 Likes
Mugnum

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.

0 Likes

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.

1 Like
Wojciech

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? 😕

0 Likes

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.

0 Likes

Well, I have the mod installed on my own client so I don’t know what’s going on…

0 Likes

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?

0 Likes

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

0 Likes

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.

0 Likes

I just added a new build, give it a try and see if you still have the same issue. There’s a check now to make sure the cleanup only runs once at the start of the raid even if another mod is regularly calling the same method I’m using to run the cleanup.

0 Likes

Well, please, my logs again about it: Logi

0 Likes

I would suggest removing the ram cleaner fix, not my mod, the other ram cleaner. That mod runs BSG’s ram cleaner on an interval and can cause stutters and freezes occasionally. It looks like my mod is only running once at the start of each of your raids so it shouldn’t be causing any freezing mid raid. If you still have freezing issues It’d be best to ask the support channel in the SPT discord.

0 Likes

Do you use Lossless Scaling by chance?

0 Likes

matsix Ok, I will remove this other ram cleaner and as you suggested on the technical support channel on Discord SPT I will ask again, thank you for your help!

Mugnum I don’t use Lossless Scaling

0 Likes

Details