Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Limits with mobs and lower the tps #95

Closed
Espantonius opened this issue Sep 2, 2020 · 9 comments
Closed

Bug in Limits with mobs and lower the tps #95

Espantonius opened this issue Sep 2, 2020 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@Espantonius
Copy link

Description
After being several days i have seen that in the public server that i have drops of tps. Doing some research i have seen this problem.
With the Limits addon the mob spawn goes crazy. They appear and disappear quickly generating quite a few drops of tps.
I have tried to do it with several users at the same time and they got to lower the tps to 10.

Steps to reproduce the behavior:
Having the Limits addon, create a large flat area. In low light areas where mobs appear, this problem happens.

Screenshots
Here i show the problem visually so that it is understood.

Now we don't have the Limits addon installed and we see what happens:
https://gyazo.com/41e6fdea209f81bf95d3ff8cbe8f585a

When we have it installed and mobs start to appear, the problem happens:
https://gyazo.com/12354046d22de15b78ce0a1519bc7f6b

Server Information:

Running PAPER 1.16.2.
Plugins (1): BentoBox
BentoBox version: 1.15.0-SNAPSHOT-b1850
Database: JSON
Loaded Game Worlds:
skyblock (SkyBlock): Overworld, Nether, The End
Loaded Addons:
Biomes 1.13.0-SNAPSHOT-b181 (ENABLED)
BSkyBlock 1.14.1-SNAPSHOT-b670 (ENABLED)
Challenges 0.8.4-SNAPSHOT-b428 (ENABLED)
Chat 1.1.0-SNAPSHOT-b33 (ENABLED)
ControlPanel 1.13.0-SNAPSHOT-b41 (ENABLED)
DimensionalTrees 1.6.1-SNAPSHOT-b82 (ENABLED)
Level 2.4.1 (ENABLED)
Limits 1.15.0-SNAPSHOT-b228 (ENABLED)
MagicCobblestoneGenerator 2.2.0-SNAPSHOT-b159 (ENABLED)
Upgrades 0.2.0-SNAPSHOT-b64 (ENABLED)
Warps 1.10.0-SNAPSHOT-b265 (ENABLED)
@tastybento tastybento added the bug Something isn't working label Sep 3, 2020
@tastybento
Copy link
Member

@Espantonius Please share your Limit config.yml so I can see it.

@Espantonius
Copy link
Author

@Espantonius Please share your Limit config.yml so I can see it.

This is my config:
https://gist.github.com/Espantonius/d0c0edd4b8189008e338337e8862386a
I have tried removing and putting and the same thing happens with limited mobs.

@tastybento
Copy link
Member

Oh wait, so you're saying that even with no limits set, this occurs?

@tastybento tastybento self-assigned this Sep 6, 2020
@Espantonius
Copy link
Author

If I don't add the addon, this doesn't happen. If for example i limit zombies, skeleton and creepers it happens only with them.
With my config as they are all limited it happens with all.

@tastybento
Copy link
Member

There are a few things going on here:

  1. The default setting of the server (in bukkit.yml) is to try and spawn monsters every tick (see ticks-per -> monster-spawns: 1)
  2. By limiting monsters with the Limits addon, you are causing the addon to run a count of monsters on an island every time one spawns. This is done async, so does not lag, but you'll probably see excessive CPU usage on your machine.
  3. The flashing you see is just the Limit addon removing the limited monsters. But as the server tries every tick to make more, they arrive and are removed.

I would recommend either not limit naturally spawning monsters (the addon was originally meant to limit hoppers and other big lag producers), increase and/or increase the ticks-per to 4, which will slow down the spawning.

I'll look into trying to prevent monsters from popping up for 1 tick. Even so, the computation will still happen.

Also, can you run this for a while and share your timings report? There may be some plugin that is listening for mob-spawns.

@tastybento
Copy link
Member

Please try the latest snapshot build and let me know how it works for you. It removes the mob glitching.

@Espantonius
Copy link
Author

The config i modified it a long time ago. The "ticks-per > monster-spawns" i have it at 20.

I'm going to try the last snapshot to see how it goes and in a few hours I'll comment again.

@Espantonius
Copy link
Author

Okay. I have tried the last snapshot and that problem no longer occurs.

If it's not intended for the limitation of mobs, i will change the configuration of the base server for the issue of mob generation.

@tastybento
Copy link
Member

Good. Unfortunately, this snapshot has duplication issues and so I don't recommend using it in production yet. It'll need more work to prevent exploits. See the parrot bug #97 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants