All 8 cores to 100% | Minecraft server is lagging 0?

Fo
- in Plugins
19

Hi! Thank you in advance for reading through my "question".
The following:

I run a Minecraft network which is about to open with a good expected 50-100 players. The problem with the whole thing is that all 8 cores of our root server (tube hosting) have recently been running at 100% and this, according to a statement from tube hosting, because of our lobby servers. When I restart this lobby server, the CPU goes down again, which is why it could only be because of that.

Plugins on Hub01 & Hub02:

PlugMan
LabyModAPI

LagMonitor (I used it to see if something could be found regarding the CPU. But I didn't find anything)

ViaVersion
SlowAPI (Selfcode)
EasyMapReset
ClanSystem (Selfcode)
ProtocolLib
LuckPerms
FAC AntiCrash
FramePicture
LobbySystem (Selfcode)
Holographic displays

All plug-ins EXCEPT the lobby system are also on the other sub-servers so it can only be due to the lobby system. Now the only honest question for me as a developer is: Where should I start looking?! I took a close look at the whole lobby system and didn't make anything different in the code than in other plugins. In addition, Tube-Hosting said that it is more likely to be due to an EXTERNAL thread because the Minecraft server is not lagging but just the CPU is busy.

Hope you can help me somehow. Maybe it's not because of my plugin but rather because of a defective CPU?

Other resources:

24GB RAM
100GB SSD
8 CPU cores

* Unfortunately I don't know more about the root server. *

PS: This problem usually occurs about 3-5 hours after starting the server, but until then, 1-3 core (s) are always used to 100%. No idea why!

Screenshot:

Many greetings! If you have any questions, please contact us.

Sh

I would first check my program code for loops that run continuously.

Fo

Do you mean the schedulers that are built into my plugin?

Sh

E.g. Yes.

Such behavior is often due to loops that you accidentally run permanently without "sleep", which then devour 100% of the CPU resources.

Fo

What I ask myself then, how is the Minecraft server actually not lagging?

Sh

The resources that the server process uses are probably not restricted by this. I'm assuming that your code will only be executed after the MC server is running or started.
However, other processes on the server should lag or start significantly slower.

Fo

Hmm That was already explained to me in a similar way by the hoster and to be honest, I'm not the best developer, especially when it comes to performance. I actually managed everything else just fine here with the lobby system, because I can't find out anywhere whether this is really damaging the server. Maybe I'm just blind and built in the simplest mistake there's

Fo

Is there a way to send you the lobby system via Discord with high confidence and that you take a quick look (of course only if you want)

Sh

Sorry, I have to refuse. I don't have time for that.

Fo

Okey no problem!

Po

If the servers are written in Java, I would guess that the heap memory of the Java VM is busy. When it is full, the garbage collection runs amok and utilizes all cores. Do you see whether it is the lobby server's Java process that is using all the cores?

Go

Is that a VServer or a dedicated server?

What do you think what do they mean with the statement: "In addition, Tube-Hosting meant that it is more likely to be due to an EXTERNAL thread because the Minecraft server is not lagging, but just the CPU is busy."

Because if you have a VServer, another Tube Hosting customer may be consuming these cores.

Alternatively you could try to throw out other plugins individually and put them back in again to try to understand which plugin could be the cause. Doesn't necessarily have to be a plugin, but then you know for sure.

Ma

Create timings for the affected server when it occurs and analyze where it occurs in your plugin:

https://shockbyte.com/billing/knowledgebase/198/How-to-take-a-timings-report-on-Minecraft.html

Analysis:

https://shockbyte.com/billing/knowledgebase/222/How-to-Analyze-any-Timings-Report.html

Fo

Hey With an external thread, tube hosting means, I guess, MySQL requests in a scheduler, for example. And I'm actually sure that there's either something defective with tube hosting, because they have already had failures etc. Or maybe my lobby system, because, as the name suggests, this is only on the lobby servers and all other plugins are identical to the other sub-servers.

Fo

It is definitely the lobby server because if I just restart it, it goes down again. When I restart other servers the CPU stays at 100%

Fo

I have already done this, but the timings and also the timings of the LagMonitor plug-in, which are 1/1 identical, are only reflected on the TPS and performance of the sub-server and, as mentioned, nothing can be determined there. In addition, the TPS is permanently 20 * and nothing is lagging. Not even the MySQL lagging.

Po

If you still have ram reserves, i would increase the heap by 1-2 GB.

Fo

The sub-server is set to a maximum of 5GB RAM and only uses what it needs and according to LagMonitor the server only uses 576MB ^^

Po

What does sub-server mean?

How are the Xms and XmX parameters of the Java process set?

Fo

I have already found the error and it was a download system. It was the anticrash that created a txt file for every single player and with around 150 registered players this is not exactly performant ^^ :)

Gaming PC config? cu cutenimble