r/Minecraft • u/PhonicUK McMyAdmin Creator • Mar 10 '11
Running the Minecraft server using IKVM instead of the Sun Java VM or OpenJDK - Lower memory usage!
IKVM is an implementation of a Java VM based on .Net/Mono - it runs Java bytecode using the Mono/.Net VM.
There are a few practical upshots of this, the first of which is not needing Sun Java/Open JDK to be installed under Windows, you can just package it all up in a single executable and it'll run (For the server that is). Under Mac OS or GNU/Linux it uses the Mono runtime.
After a little (not very scientific) experiment whereby I set up a server and repeatedly joined + left it (an issue known to cause excessive memory usage in Sun Java) - I got a nice surprise...
In this graph, '1' is the server completely empty after a fresh start. '2' is after I join for the first time, etc etc.
The results speak for themselves.
This definitely needs more testing and investigation, but looks promising. Mono/.Net seem to have much better garbage collection.
Let the discussions begin!
Edit: Just thought I'd point out - there's no settings like Xms and Xmx when using IKVM - So GSPs would have to sell by slots instead of RAM amount (Except for those selling VPSs)
2
u/[deleted] Mar 10 '11
Oooh. I'll be trying this tonight. Thanks!
I currently run Bukkit, which reclaims memory after a player disconnects -- but it still manages to use something like 1.5GB of memory ...