Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 140
    • Issues 140
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #1711

Closed
Open
Created Sep 04, 2024 by DasLulilaan@DasLulilaan

extreme performance hit with cluster randomspawns when no spaces are found

Summary

On a server with cluster random spawning enabled and a randomspawn in add mode, if a player moves in a way where there are no spawnable spaces (air above blocks > 12 block from the player) but still blocks in the spawning radius, the server MSPT goes to above 50 and the world starts to lag. we have tried this in a custom-built map without caves and replicated the issue on a clean server with minimal plugins an configuration. I can send the plugins folder and other config as a .zip if needed.

Steps to reproduce

  1. create a superflat server map (papermc 1.20.1-196) (MythicMobs version 5.6.2 premium)

server.properties (defaults omitted):

level-type=minecraft\:flat
spawn-protection=0

plugins/MythicMobs/config/config-spawning.yml (defaults omitted):

# (defaults)
 RandomSpawning:
    
    # Generator used for ADD method. Can be NONE, CLUSTER, or LEGACY
    Generator: CLUSTER
# (defaults)

(make sure to restart the server so the config change takes effect)

  1. create a random spwaner with a config like the following
spawner:
  Cooldown: 0
  Type: test
  Chance: 0 # also tested with 0.1, same behavior
  Action: ADD
  Worlds: world
  PositionType: LAND

the mob has this config:

test:
  Type: ZOMBIE
  Display: Zombie
  1. use worldedit or similar to create a 200x200x200 cube of any solid block (tested with stone)
  2. use spectator mode to fly to the middle of the cube or mine in >12 blocks from the top
  3. watch the server MSPT go up (using TabTps)

Current behavior

the MSPT goes up to 50

Intended correct behavior

the MSPT should stay at a normal level

Server log file

https://pastebin.com/00yFvu3V

Debug log snippet

!! The MSPT is not as high, but still higher than usual when using debug level 9 (any lower level does not show any console output and don not affect MSPT)

https://pastebin.com/w1whFDZn

Proposed fixes

Mythic might be looping endlessly trying to find spawning spaces since there are some solid blocks, make sure this loop ends somehow.

Edited Sep 04, 2024 by DasLulilaan
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking