11
endor
5y

Man, running a Minecraft server with 5 players on a VPS with 1 vCore and 1GB of ram is *really* pushing this thing to its limits!
Thank goodness Ubuntu Server doesn't need much ram to run, because Minecraft is a real resource hog.
I hope Hetzner approves my account on monday, so we can move to a 2 core VPS with 4GB of ram!

Comments
  • 5
    I'm running one with avg. 100 players online and it's not lagging at all. It also doesn't start to lag until 200 players, then the performance drops like shit... made some improvements today, we'll see the impact in about 3 minutes, when the daily restart happens.
    But yes Minecraft needs a lot of resources
  • 3
    @EaZyCode cool, what kind of hardware are you running on?
    My server runs mostly fine with 3-5 players, it's the active redstone and mob spawners that cause stuttering and heavy lag.
  • 5
    @endor
    Intel i7 4790k @4.4GHz
    32 GB RAM
    With 100 players the CPU sits at around 15% load, I also edited many Plugins and the Server jar as well to have better CPU usage and less RAM usage, because of that I don't even give Minecraft the 32GB, only 26 of which 4 are young gen, because Minecraft allocates many objects which don't have to stay in Memory for more then a second, which means the GC can make better use of the RAM.
    With 400 players, RAM is at 10GB for example, but the CPU is the problem here for me.
  • 4
    Iirc there is a native implmentaion of the minecraft server
  • 1
    🏕️
  • 2
  • 1
    @EaZyCode lucky for me, I don't plan to host that many players anytime soon 🤣 But at least that means I should be fine once I migrate to the new VM. I'll have to look into editing the server jar, didn't know you could do that
  • 2
    @terraria99 are you referring to Microsoft's new C++ version of Minecraft (which is not compatible with the classic Java Edition), or an actual reimplementation of the Java Edition (that supports all the latest features)?
  • 1
  • 1
    @EaZyCode

    But you have the map already generated + running an older version right?
  • 1
    @Linux which Map? I'm running spigot 1.8.8
  • 1
    @endor you can edit any jar file, the problem is just it is not that easy. There are basically two ways:
    1. Decompile one class, create a new Java project, add the real Minecraft jar as a library, rewrite that one decompiled class, compile, and put the new class files into the real Minecraft jar.
    2. Use a bytecode editor, works 100% of the time even with heavy obfuscation, it's faster to do so, but you have to understand how Java bytecode works.
  • 1
    @EaZyCode

    Yeah I am on 1.13.2, and with a non pre generated map. I lags when many chunks is loaded even if I have 16c/32threads.
  • 2
    @Linux you don't need a high number of threads, Minecraft has one main Thread which has to do everything and because of that you need a high CPU rate for a single thread
  • 2
    Someone recently asked how many players he could have on a server hosted on a Raspberry Pi. He didn't specify which model, but since I had the most powerful model at that time, I did a test. The answer is 0. It is barely able to run the server without any players online, even then it sometimes skips ticks. And that was in Minecraft 1.12.2, when performance was still good.
  • 1
    @Fabian as a former bukkit Dev, let me tell you that the internals of the MC server jar are hideous. There's little to no real concurrency for jobs on that main thread, and any slowdown from the Mojang internals cannot be mitigated well at all. It needs a serious internal overhaul Mojang is not going to do.
  • 0
    @Techno-Wizard Let's hope that the horrendous awfulness of 1.13 motivates them enough to optimise all the things for 1.14. There are also quite a lot of low hanging fruit, like for example not using the full CPU core if it doesn't need it! Don't busy wait, that's performance 101! </rant>
  • 1
    @Fabian yeah, it's absolutely awful. Frankly, go write the core in C/C++ instead of entering the polymorphic hellscape that is those internals. There's literally an entire class deticated to the server "heartbeat" as they call it, which is supposed to manage internal jobs but the data structures involved make absolutely no sense. Almost every internal process is single threaded. There's almost no concurrency.
  • 0
    @Techno-Wizard Well, they did rewrite it in C++ and you can see what came out of that. MCPE. Which is waaay worse.
  • 1
    @Fabian Well duh. If they're not going to release it on all platforms and make it specifically for a platform that it really isn't compatible with the kind of game play MC has, it's gonna suck.
Add Comment