Memory leaks
complete
Lather
During an event with 50-60 people in a room for 1.5 hours my framerate was very low so i took a screenshot of my memory usage which was rather absurdly high:
After event was over and people left the room my framerate was still shit (15-25FPS) so i'm certain of a memory leak:
Note that before the event started filling up i was doing 91 frames easily, the room is super optimized and has a single light source, baked lights and lightprobes.
Room was "Community MMD Club.
I was in desktop mode.
Message me on discord @Lather#1003 if you want my logs, i've saved them but there seems to be no upload function for canny. (pastebin has a 512 something limit, cant paste it there)
Log In
Tupper - VRChat Head of Community
complete
Oops, wrong status.
Tupper - VRChat Head of Community
open
I'm changing this to Complete for three reasons:
- Primarily, the particular bug the OP (Lather) was talking about was solved ages ago.It is long, long gone.
- VRChat keeps content in memory until you change scenes. This is how Unity works, and we cannot change it.As such, you can feasibly sit in an instance long enough with user/avatar churn and eventually run out of RAM. This isn't a memory leak-- or if you want to be pedantic, it isn't a memory leak in VRChat, nor is it one we can address directly.
- Many people will report high memory usage as a memory leak.This is not the case! VRChat consists of almost entirely user-generated content, and a lot of that content may be rather memory-hungry. Combine this point with point number 2, and you end up with cases where memory usage can climb to crazy numbers pretty fast. In these cases, we suggest changing instances or blocking avatars with very large download sizes. Download sizes are not the same as memory usage, but is often the case that large download size avatars take up a lot of RAM. (Not always, though)
All in all, this thread has long served its usefulness. If you find a case of a memory leak that does not collide with points 2 or 3 above, please make a new post!
Observer․
Tupper - VRChat Head of Community:The worlds most obvious counter, you have just described the definition of a memory leak.
If the application has not correctly managed the memory in a way where the allocated memory no longer needed is not removed, that is by definition a memory leak. Even if that wasn't enough, the fact that the system resources are being used and not released until far later than expected is another form of a leak. Despite it being by design one could argue that it is poor management and loop back to the first definition.
Not only would you be able to discuss this issue with Unity but you can also get the source code as last ditch effort to fix it yourself. Users can only be blamed partially for the excessive resource usage because no matter how low we get it, the application will always be at risk of using all the resources. In addition changing scenes does not actually fully clear the allocated memory, at least for vram.
Yes you can close this one but the issue is in no way resolved yet. The only way this could actually be put to rest is if Unity responds with a statement saying even if you had the source code it would be impossible.
MidnightsinVH
Sometimes it gets so bad that even Steam VR will just crash and you need to restart. I'm also running a 2080Ti and Ryzen 9 3900x. Even with everything I'm at about 10.6GB of my 11. Eventually frames will just go to nothing even with most avatars hidden. Never did have this issue until 3.0 came around and not as so bad that it would crash the headset and have to restart it. I'm also on an Index as well with 144hz enabled.
bingbongs
I have almost two identical laptops. The secondary one is kind of interesting as I'm using it as an idlebot in a public pug to offset the 'chair glitch' which has been happening in the last few months. In my findings i've noticed the client on the second laptop not only hasn't crashed in over 24 hours of the game being active, But it hasn't shown any sign of memory leak.
I see no point having anything enabled on this account so under safety settings everything is off on that account. Including voices, even for friends. I believe that it's actually the avatars we use that may be potentially causing this memory leak issue.
I can be in the same lobby as the second computer on my same network, almost identical specs, and I can't be in the lobby for more than two hours before I have to restart my client. My typical safety settings on my main is Friends = everything, All other ranks = Avatar, Voice, Icons.
K'nar
Been having the same issue for the last 3 days with random worlds working at times and not during others. Huge GPU frametime spikes and huge memory usage spikes. As stated, Midnight Rooftop seems to be the worst offender, Room in the Rain works on occasion, and other worlds work sometimes and sometimes not.
Hitori Ou
Is this memory leak world instance bound or system bound or world system bound?
If it is world instance bound the memory usage would drop as soon as you swap to a new instance of the same world.
If it's system bound even changing to a different world would not change it and after restart this leak would occur in any world under same conditions.
If it's world system bound it would rapidly start using memory as soon as players join and start being active interacting in/with the world.
For example if the world has some kind of excessive memory allocation in it's design/udon-code.
Chai Latte
I am having horrible memory leaks as of early August 2020. Some rooms seem better than others. Midnight Rooftop triggers it instantly while the Black Cat is not so bad.
EDIT: Drastically reduced the problem by manually deleting the cache (not using the buttons, either in SDK builder or in game). However, I am still seeing heavy memory leaks--now they just aren't crashing me.
Only able to play the game for about half an hour at a time before it tends to become too resource-heavy to use.
Places I've seen the leaks (99-100 percent GPU usage and 15-20 frames) in:
-Midnight Rooftop - (2 other players joined) (this one is the worst--other people have mentioned it as well)
-Deep Blue - (1 other player joined) (sometimes the leaks here don't carry over to other worlds, but sometimes they do.)
-Tunnel Music Visualizer - (alone) (cursed: this one is okay while I'm in it, but as soon as I leave I get it terribly no matter where I go).
-Moody (alone)
-Moonshine Penthouse (1 other player joined)
Places that I haven't had it:
-Rest and Sleep (1 other player joined)
-The Black Cat (even with 15 people!)
-Japan Shrine (even with 10 people!)
-Spirit Speak Game (2 other players joined)
-Poppy Street (2 other players joined)
-HomeBox (alone)
-VRChat Home (1 other player joined)
-MERoom (even with 19 people!)
-Inter-Action on the Math (1 other player joined)
Irix
I've noticed a video memory leak as well. It appears that VRC never clears Vram for avatars that are no longer being currently used. Until you ether rejoin or switch worlds. I'm using an AMD rx580 8GB.
Floatharr
64 GB of RAM. VRChat had close to 50 GB commit charge and 25 GB private working set today in a busy instance with lots of people passing through. Game was freezing for a couple of seconds every time someone joined or switched avatars. This is still a huge issue, more memory is not a solution.
Ozzy Helix
I have a proposal for a solution to the memory leaks maybe have VRChat periodically check for textures and models not in use by the game and unload them from memory and maybe cache things that need to stay in memory on the hard drive as a local temp directory
Load More
→