The Paper project (fork of Spigot) has a pull request open to fix this problem:
https://github.com/PaperMC/Paper/pull/2342
Sadly, I haven't tried it since I no longer have access to the server that wasn't working properly.
Still happening on 1.14.4 pre-release 2.
Between 50% and 60% kernel CPU usage (red instead of green on htop), 0 players online, new world.
[media]Here is a /debug report, just in case it can be useful:
[media][media]
I bring slightly more information.
I just noticed that the clock on Server B (the one that isn't working properly) is running too slow.
minecraft@debian:~$ date && sleep 60 && date
Sun Jun 16 06:24:29 CEST 2019
Sun Jun 16 06:25:40 CEST 2019
It seems to be a common problem on virtual servers: https://serverfault.com/a/356934, but can also happen on dedicated CPUs.
Installing ntpd fixes the problem above.
minecraft@debian:~$ date && sleep 60 && date
Sun Jun 16 06:53:45 CEST 2019
Sun Jun 16 06:54:45 CEST 2019
No difference on Minecraft though, the server is still eating more than 50% CPU with 0 players, but I feel like this might be a good track.
@momcilo:
timerslack_ns is 50000 by default on both machines, no difference.
The CPU usage of the Server B is reduced from 70% to about 5% if I try to increase this value, to 200000 or more.
There is no change on Server A, no matter what I do with the value,
The processes are not running as root, but I get the same results as root anyway.
I tried to install Oracle Java instead of OpenJDK, I get more or less the same results, with less CPU usage.
The packages installed are the same (both are apt-get upgraded) and there is no hypervisor running on either machine.
There is a KVM over IP that can be used to control the machines but I don't think that matters.
Honestly, I'm starting to think the problem comes from the Xeon E-2146G, maybe because it's managing the mutex/sleep in a different way.
I can reproduce this problem on one of my dedicated servers.
My two servers have nearly the same configuration:
Server A: Intel i7-4770K, 32 GB DDR4 2666 MHz, SSD.
Server B: Intel Xeon E-2146G, 64 GB DDR4 2666 MHz, SSD.
They are both using Debian 9, with the same kernel version and the same OpenJDK version :
$ uname -r
4.9.0-9-amd64
$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-2~deb9u1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode
I am running vanilla Minecraft, version 1.14.2, with the following command:
java -Xmx1024M -Xms1024M -jar minecraft_server.1.14.2.jar nogui
Server A: about 5% cpu usage when idle (0 players online, new world).
Server B: about 70% cpu usage when idle (0 players online, new world).
Also confirmed, affects 1.14.4 and 19w35a. Always reproducible.
Doesn't happen using 1.14.3.