Haiku
Haiku
JCHJava Community | Help. Code. Learn.
Created by Haiku on 12/1/2024 in #java-help
Memory Leak Help
I'm the sysadmin for a heavily modded Minecraft server, keeping all of the different mods playing nice with each other through my own patch mod. I've been using Java for about 7 years now (sidenote: christ), and even worked with it professionally for a while. I'm trying to track down a memory leak that's running the thing to a halt. Basically, Player objects are getting retained even after the players they correspond to have already disconnected, causing their packets to back up and overflow the heap. I opened the heap dump in Eclipse MAT and was able to figure that out after a lot of OQL, but I can't see what's retaining them. The shortest paths to all GC roots are weak references, and the incoming connections page is crowded by objects that will be freed when the player is. Would anyone be willing to look over the heap dump with me, or otherwise help out through a call? I'm completely stumped, and I have 50 people relying on me to fix it, so I really need some help.
7 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 11/25/2024 in #java-help
Eclipse MAT - Remove Self-Referential Inbounds
I'm trying to track down a memory leak, and I can't figure out how to find what's retaining the object. Many of the object's members hold references to it, so the inbounds view is clogged up by those items that will get freed with the object. Doing "shortest path to GC root" zooms out to the massive top level of the classloader itself, making me dig all the way down to find the object in question. Does anyone know how to filter the inbounds of an object to just those that wouldn't get disposed with said object?
9 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/5/2024 in #java-help
Under what conditions is Off-Heap memory worth it?
What I've read about the off-heap memory interfaces like ByteBuffer and the FFMI make it sound like it's much harder to access than heap memory and incurs a significant performance penalty. But they also neglect to mention the cases where the penalty is mitigated or the trade-off is worth it. So I wanted to ask: under what circumstances is moving something off the heap beneficial?
- Does it specifically have to be something that's rarely accessed, or can it be relatively often? - Does the type of data matter, or can you store most objects there without issue? Which types are better? - What is the performance penalty from storing objects off the heap? Is it just "if it will never be GC'd, you can put it off heap", or is it only useful in certain situations? Basically, what types of memory are good candidates for being moved off the heap?
41 replies