Affects Version/s: Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w08a, Minecraft 19w08b, Minecraft 19w09a
Fix Version/s: Minecraft 19w11a
Environment:Linux 4.1.4-gentoo #1 SMP Mon Sep 21 04:48:00 EDT 2015 x86_64 Intel(R) Core(TM) i5-4430 CPU @ 3.00GHz GenuineIntel GNU/Linux
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (IcedTea 3.8.0) (Gentoo icedtea-3.8.0)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
The 1.14 snapshots have some severe performance problems. Servers fall behind continually, and users are regularly kicked. The first thing I noticed is that even when nobody is logged on to a server, 100% of one CPU sure is being used. As you'll see, this is a red herring, but it means that everyone else is stuck until this is implemented properly.
I profiled this, and I found that Thread::yield dominates the run time:
I only have obfuscated names, here's where that's called from in MinecraftServer.run():
There are multiple other places where Thread::yield is called from, including another place in MinecraftServer and in ty.java.
This may be decompiled code, but it looks intentional. Basically, it looks like a hack that was necessary to get a snapshot out in reasonable time. No negative judgement there; we all do cheap hacks to get alpha releases usable for others, and we're better off with having a snapshot than not!
Unfortunately, this makes it hard for anyone else to help with profiling the server, and as a result, we are unable to help the developers find the performance hotspots that their profiling tools miss.
This problem also makes it inadvisable or disallowed to run 1.14 snapshots in the cloud, as some VM hosts will kill CPU-hogging processes, and it also can cost more.
Therefore I urge the developers to please implement this properly sooner rather than later.