Video memory leak
MotoFckr9k
When playing for a semi long time, vrchat uses up to 6,5gb of video memory on my system (the max it can get).
Changing to an empty world does not free up any of that.
Would be nice if someone could confirm this on their system as well. In theory you would just need to go to a fairly full public instance, check vram usage, go to an empty instance, check vram usage again.
Log In
Euan
The largest reason for high VRAM usage is avatars, it's not as such a memory leak. It's an issue we've made more clear to people recently by showing the "Texture Memory" stat on avatars, if you assume there's 60 people in an instance and they never change avatars and all the avatars aren't unoptimised and so using 100MB of texture memory each (hopefully less) that'd 6GB of VRAM used already, this not including base VRC or the world.
Unfortunately texture memory doesn't really nicely relate to file size or the currently calculated performance rank of avatars meaning you could have a good avatar that's 50MB but it has a bunch of crunch compressed 4-8K textures on it eating potentially over a gig of VRAM on it's own. An extreme case but I've seen various like it in some instances, often taking the high hundreds of MB.
The logical next step would be to integrate the texture memory stat into the performance stat system however the system needs improvement in a few aspects and it'd be annoying to keep changing performance optimisation goals for people so when the system is next touched it needs a proper look into rather than just adding a new stat, this is my personal view on things anyway, what direction actually taken may differ.
Additionally back when this post was made I'm pretty sure was when we still had a overaggressive in memory cache for loaded avatars, this mostly a relic from many years prior when loading in an avatar was synchronous (unity didn't allow async back then) this guaranteeing a hitch. Anyway this cache would only be emptied after two instance switches (this was real old logic), this combo'd with being in an instance with those changing avatars a lot meant a lot of build up. Some time ago we switched to be smarter and not keep much cached in memory and clear it after a short time rather than instance switch, the avatar load hitch is nothing like it was back then and unity offers smarter loading from disk. As such this new system doesn't allow a build up.
I will briefly note with the new main menu introduced recently the base VRAM usage has increased slightly, though for most users shouldn't make much of an impact. Since it's released the UI team has also worked hard to optimise the menu as much as possible (and still are).
So to summarise it's likely not a memory leak but rather mainly avatars mainly due to an aspect of them not made as clear to people as it should be. A stat now exists making it apparent however it's still a manual process to check each avatar which isn't great, so more work to make it easier to see an avatar isn't good needs to be done, both in-app and in sdk. Some people just blatantly don't optimise their avatars then go use them in crowded spaces but changes should help apply pressure to them to not do that.
Fairplex
Clearing memory after a short time is smart, but can lead to regular hitches, I wonder if it's not better to unload unused assets as soon as an avatar is changed? I mean, there is already a local cache, you don't have to keep things in memory.
A
Alvos
I got 16GB of ram and vrchat is taking 9GB of it until i get 11 FPS.
_Steve
This is interesting,
I'm running GTX 3070 with 8gb VRam.
AMD 3800x
16gb of RAM.
VRam is the bottle neck. Nothing else goes near limits...
All very poorly avatars disable, anything over 60mb disabled,
And yet over time frames drop to unplayable levels
(Sub 20 FPS)
MotoFckr9k
So after some tests I found out that for me the video memory leak only happens with other people.
When switching worlds and avatars by myself I was always within margin of error, but when going to a single world with people in it, I could already measure an increase in video memory usage after leaving for the empty world again.
DovahDoVolom
This may be the same problem I am having, I'll have to watch VRAM next time I play. I noticed that the framerate would slowly get lower until its almost unplayable and none of my system resources would be over used not going above ~70% usage. I'm also only in a world with one or two people. Restarting is the only fix until it starts its slow decent into unplayability.
Observer.
Can I ask what your setup is? I can confirm that I have to constantly monitor my gpu memory because vrchat will eventually eat up all 11GB of my GTX 1080ti. Changing worlds does free some but not all of it for me. It will continue to get higher until I restart the game.
There may be some fixes in the open beta but I am not around when the meetups happen to stress test with many people. I find that in current live build just sitting in a public world for too long will mean that all the avatars that load in and out will speed up the issue where the gpu memory will just climb or be higher even after leaving the world.
MotoFckr9k
Observer.: I am using a GTX 1080 with 8GB of video memory.
VRChat cannot get more than ~6,5GB in my situation, because the OS and SteamVR are already using almost 1,5GB.