BentoBoxWorld / AcidIsland

AcidIsland™ add-on for BentoBox
Eclipse Public License 2.0
18 stars 15 forks source link

High CPU usage that doesn't level out when starting the server. #49

Closed robbiemcleod56 closed 5 years ago

robbiemcleod56 commented 5 years ago

Description Most of the times I start this server, the CPU usage goes up to full and remains there.

Steps to reproduce the behavior:

  1. Just starting the server.

Expected behavior For the server to finish loading and then level out to about 2%-5% CPU usage.

Screenshots https://timings.spigotmc.org/?url=itozatekuf image image

Server Information:

Additional context If there's a certain log you would like, let me know.

tastybento commented 5 years ago

You are actually conflating two separate things: CPU % and Spigot Timings.

CPU For 1.13.x, unfortunately, 100% CPU is what 1.13 servers do. It's a known issue with them: https://bugs.mojang.com/browse/MC-118106. You can bring up a spigot server, no plugins and then run top or look at your CPU and you'll see it takes 100% CPU, i.e., 100% of one of your machine cores.

Timings I looked at you timing report, and as it mentions - the high usage is coming from "TickEntities" in the AcidIsland world. Going to the bottom of the report, you see the breakdown of what entities are causing the issues. Click on the Learn More button next to Activated Entities for tips on how to reduce that number. If you haven't already look at editing spigot.yml to have something like this:

    entity-activation-range:
      animals: 12
      monsters: 24
      misc: 4
      tick-inactive-villagers: true
robbiemcleod56 commented 5 years ago

I'm running 1.13 Spigot for all my other servers, this is the only one that does this. And most of the other plugins installed along with it are also functioning fine on other servers. IslandBorder is the only one not being used actively on other servers.

And I was wondering since the startup tick is so high, maybe there is a bug that involves spawn area? Where perhaps my animal is always kept active while there is no one on the server?

robbiemcleod56 commented 5 years ago

Update: The only way I was able to fix the high CPU usage at startup from AcidIsland was to delete the entire world for that game. I'm assuming that this means that just as long as no one enters that world ever, it will never have the glitch. https://timings.spigotmc.org/?url=yozokojixa

tastybento commented 5 years ago

As I mentioned, timings and CPU usage are two different things.

Deleting the world of course deletes all the entities in that world that were being processed by the server every tick. Did you try to make any changes to the spigot.yml file? What settings do you have? Because those setting automatically disable entities in the world once players are not close to them. If those values are high then the server will still process them. If players go back to the world, the entity numbers will creep up.

robbiemcleod56 commented 5 years ago

I understand timings and CPU usage are different, but they do relate in a way. In the original post, the red text at the top of the timings stated that my server was under 99%+ load, which was true if you count the available CPU to the process. And to make the world start the high ticks on startup, all I had to do was create a single island. I later deleted that island to see if it fixed things, but it remained the same with every restart. It wasn't until I deleted the world that it was fixed. There is 0 people online on the server when these things are happening, so I assume it's because spawn area is always kept active (true for all MC servers) and there's some sort of entity in range of it. My Spigot activation ranges are default. My servers are still in development so I only have builders, and they aren't working on this server right now. The reason I didn't make any changes to my Spigot settings was because it doesn't make sense to me that the default settings would be incompatible with any plugin unless specifically stated. The only change made was to enable Bungee IP forwarding. If you want, I can try to make an island with my entity range as low as possible to see if it changes anything.

robbiemcleod56 commented 5 years ago

This is very odd. I'll provide a small amount of previous events to help guide any fixes that may be needed. I started the server off with just your SkyBlock addon. Everything with that worked wonderfully, and still does, never had any problems with it. A little while later, I added Acid Island. So far so good. Then one day I decided to give your other two games a try, so I added them both at once. SkyGrid, aside from it's large RAM consumption and a loop that I'm not so sure anymore where it's coming from (my other post,) has worked fine, but CaveBlock had caused me errors that made the server unusable so I removed it, and it's world, but left everything else intact. Even the database data. So, as I said, I fixed it by deleting the world and I had also went into the database and deleted all references of AcidIsland and CaveBlock while I was at it, and I'm not sure if it had something to do with it or not, but since CaveBlock didn't work, I removed that plugin a long time ago. So, now that I try to reproduce these steps, and mind you I have NOT edited a single configuration file for any of the games (or other plugins or server) since I started having these issues, I somehow can't. And just for fun, I just threw CaveBlock back on the server and it worked... I have no idea what has happened but it seems like the fix was removing AcidIsland's world and all references to it and CaveBlock from the database. I must note that there was a lot more data for CaveBlock than there was for any other of the plugins in the world.bentobox.bentobox.database.objects.island table, all of them with a different uniqueid and I haven't even had that many players on. It seems this may be an issue with the order the plugins must be installed, or something like that. I don't have the time to test further though. The fix though, simply delete the world and database references, and suddenly it all works.

robbiemcleod56 commented 5 years ago

Just following up as I'm updating the plugins now. I haven't had this issue since deleting the world and CaveBlock data a month ago. Thank you for your time and I still am unsure exactly what happened. Hopefully one day you encounter the same problem so it can be fixed.