Join 2,358+ Players and socialize together

Join the Community Today

Come hang out with us on the Minecraft Addicts Forums — it's the perfect place to chat, trade cool stuff, and connect with awesome builders just like you! Let's plan epic builds, create amazing worlds together, and then show off your masterpieces to everyone! Plus, we’re all about having fun, so feel free to talk about anything under the sun—games, hobbies, favorite snacks, you name it! Can't wait for you to join and share all the Minecraft magic!

Really helpful way to identify cause of memory leak.

Status
Not open for further replies.

RefinedCode

Well-known member
Joined
Feb 1, 2011
Messages
930
I know nothing of what the operators do on the server, so you might already know the cause of the memory leak. But I have a good tool that you could use on the server. Its the only tool i use when finding memory leaks. It is called visualVm and it comes with Java 6. Im not even sure if you have a GUI on the server but if you do this is what you can do to use it:

Add:
Code:
-Dcom.sun.management.jmxremote
to your server launch .bat or whatever you do to start the server.

Then goto the java bin directory. its java/bin/visualvm.exe on my computer.

Start visualvm.exe. And you should see a branch on the left sidebar with the server. If you click on it it will lot like this:
visualvm1.png


Click on the "Heap Dump" button in the "Monitor" tab when the server gets really bad lag.

Then you will have another tab for the heap dump like this :
visualvm2.png


Then you can see where abnormal memory usage is taken and if it belongs to a plugin you can do something about it. Works on any OS. You would just need a GUI which i have no idea if you do. Just thought i'd share this i found it to be a great tool. Maybe it will be fixed by the bukkit team I dont really follow bukkit anymore this is just a general java tip.

Oh also you could use this to compare when the server is not lagging to when it is to see the differences in memory usage for some classes since it can be hard to spot.
 
We've already used this, it has got us to where we are right now with it.
Pretty hard to dump heap when the server is lagging like crazy, it usually takes about 10 minutes to complete and kicks everyone out in the process.

Thanks for the suggestion though.
 
No problem. I was over excited when doing some work with it and realized its usefulness ;P
 
I think a dday is in order when we find this leak :)
 
Status
Not open for further replies.
Back
Top